Skip to main content
This article explains the Codebase feature: what it does, how it works, and why it’s useful when exploring or modifying a repository. The Codebase feature indexes your project and enables context-aware searches so you can quickly find configuration, I/O, and initialization logic without manually scanning files. Key search benefits:
  • Find where configuration and connections are defined (e.g., database settings).
  • Locate file-handling and I/O logic such as CSV readers or upload handlers.
  • Surface CLI helpers and initialization routines so you can set up or rebuild runtime state.
When interacting
  • Click the regular Submit button to send your prompt to the chat LLM.
  • Press Command-Enter (macOS) or Control-Enter (Windows/Linux) to submit the prompt to the codebase indexer/search, which searches across your repository.
A dark-themed code editor screenshot showing a chat/documentation panel titled "Database Connection Code in KodeKloudTaskMan." The panel mentions SQLite and "Database Configuration," with source code visible on the left and a hand cursor on the right.
Overview: example repository excerpt Below is a concise, cleaned-up excerpt from a Flask-based task manager that demonstrates the types of artifacts the Codebase feature surfaces: configuration values, CSV handling, DB connection helpers, and initialization commands.
Run the database initialization from your shell:
Quick reference: what the Codebase will find in this example Examples of useful natural-language queries
  • “Show me all code that opens the SQLite database” — returns files and snippets referencing sqlite3.connect, app.config['DATABASE'], and get_db.
  • “Where do we handle CSV files?” — returns occurrences of csv.reader, read_csv, and any upload/processing routes.
  • “How does the application initialize the database?” — returns init_db() and the CLI command.
Fine-grained search and scope controls
  • Use @Codebase (or the codebase submission shortcut) to target repository-wide searches explicitly.
  • Narrow or expand searches by file patterns (e.g., restrict to .js files or exclude vendor//node_modules/) so results are focused and relevant.
  • Use @mentions or include specific files to pull those files into the chat context for a single query.
What the Codebase feature helps you do
  • Rapidly locate code paths affected by a change (e.g., migrating from SQLite to PostgreSQL or introducing SQLAlchemy).
  • Speed up refactors by showing where CSV or other I/O occurs across the repo.
  • Improve onboarding and code reviews by surfacing relevant snippets and the files that matter for a given change.
When preparing for production, never leave app.config['SECRET_KEY'] = 'dev' in place. Store secrets and DB credentials in environment variables or a secrets manager, and ensure correct file permissions for your instance path and database file.
Search tips and best practices
  • Be explicit with search scope: include or exclude directories and file extensions to reduce noise.
  • Combine natural-language queries with code symbols (e.g., get_db, sqlite3.connect) for high-precision results.
  • When investigating behavior across multiple files, pull a small set of files into context first, then expand if needed.
Why this is helpful (summary)
  • Quickly find all code paths that need change when swapping databases or libraries.
  • Uncover I/O and data-processing hotspots for performance or security reviews.
  • Reduce time-to-insight for new team members by surfacing the exact files and snippets tied to a question.
Links and references Finally, remember you can combine natural-language queries with scope directives (like file includes/excludes) to make searches precise and actionable when working through large or unfamiliar codebases.

Watch Video