Developers

CodeDB is a semantic index of your codebase that your AI coworker can query during a session — search by meaning, trace git history, and navigate cross-references, instead of falling back on grep and a stack of file reads.

What CodeDB indexes

CodeDB builds a local database from your repository: code symbols, git history, and (optionally) GitHub activity. Your AI coworker queries it during sessions to navigate with precision rather than guessing at file names.

SourceContent
Code symbolsFunctions, types, classes
Git historyCommits, diffs, file changes
GitHub PRs and issuesTitles, descriptions, comments, review threads

The index lives in your repository's .sageox/cache/codedb/ directory and never leaves your machine. SageOx servers never see your source code.

Index your repo

Run the index once. It updates incrementally after that — only new commits since the last run are processed.

terminal
# Build or update the code index (run once, updates automatically)
$

Force a full rebuild after a major refactor or when results look stale:

terminal
$

Check what's indexed and when it last ran:

terminal
$

Search by meaning

Once indexed, query CodeDB with natural language. Search matches on what code does, not on a text pattern alone.

terminal
# Find code by intent, not by name
$
terminal
# Limit results and get JSON for scripting
$

What your AI coworker gains

When a session starts, your AI coworker gains access to CodeDB queries. That turns a few common questions from slow file-spelunking into direct lookups:

  • Semantic search — find functions and types by what they do, not by guessing the name
  • History queries — "when did this behavior change?" answered from git history instantly
  • Cross-reference navigation — understand how modules connect across the codebase
  • PR and issue context — reference decisions from code review threads

Without CodeDB, your AI coworker relies on grep and file reads. With it, the agent has a map of your codebase — and spends its turns reasoning instead of searching.

CodeDB is local-only by design. Your code and git history stay on your machine; the index is rebuilt from your repo, never uploaded.

What's next