Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Getting started

oxcode indexes source code into a native OxGraph database. It uses tree-sitter for extraction, resolves code references into graph relations, and stores the result in a native OxGraph database under .oxcode/index.oxgdb/. It is the first downstream consumer of the oxgraph engine.

The CLI keeps raw OxQL available, but agent navigation should usually start with context, symbols, files, and the call-graph commands, because they expand graph IDs back into function names, definition ranges, signatures, docstrings, source previews, and call-site source context.

Quick start

cargo run -p oxcode -- index --path path/to/rust/project
cargo run -p oxcode -- status --path path/to/rust/project
cargo run -p oxcode -- context "How does entry reach helper?" --path path/to/rust/project --limit 8 --json
cargo run -p oxcode -- symbols "entry helper" --path path/to/rust/project --limit 20 --json
cargo run -p oxcode -- symbol crate::entry --path path/to/rust/project --json
cargo run -p oxcode -- calls crate::entry --depth 2 --path path/to/rust/project
cargo run -p oxcode -- callers crate::helper --depth 2 --path path/to/rust/project

The generated .oxcode/ directory writes its own .gitignore, so the index is never committed by accident.

Architecture

The workspace uses a hybrid Rust architecture:

  • oxcode-model — storage-neutral vocabulary: code-graph kinds, identifier newtypes, the graph schema catalog, the selector grammar, the extraction/resolution IR, and agent-facing report DTOs.
  • oxcode-core — indexing, extraction, reference resolution, OxGraph storage, navigation, formatting, and the public ProjectIndex facade.
  • oxcode — thin CLI package and binary.
  • oxcode-mcp — MCP server (stdio) exposing oxcode's read-only queries to coding agents.

The model crate's typed schema is the single source of truth that the storage layer derives property registration, read-key caching, and indexes from.

Next