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

CLI

Every command runs against a project root given by --path (default .). Commands that print human output also accept --json for machine-readable output. Start agent navigation with context, symbols, and files; reach for raw query only when you know the shape you want.

Index and status

CommandWhat it does
indexRebuild the project index into .oxcode/index.oxgdb/. Re-runs are O(change).
statusReport index state: element/relation/incidence counts, catalog summary, paths.
languagesList the registered language extractors (--json for the full table).
mcpRun the stdio MCP server.

Navigation

CommandWhat it doesKey flags
context <query>Rank entry-point symbols for a task, then expand nearby relationships. Deterministic and graph-derived.--limit 8, --depth 1, --max-bytes 20000
symbols [query]Keyword discovery over symbols.--limit 50, repeatable --kind
files [query]Find files relevant to a query.--limit 50
symbol <selector>Resolve a single selector to its definition, signature, and source.
calls <selector>Walk the call graph outward (functions this symbol calls).--depth 1, --limit 100
callers <selector>Walk the call graph inward (functions that call this symbol).--depth 1, --limit 100
walk <selector>Walk the call graph in a chosen direction.--depth, --limit, --direction outgoing|incoming|both

context ranks entry-point symbols for the task text, then expands nearby calls, contains, references, and implements relationships. For keyword discovery use symbols; do not pass plain English phrases to query.

Raw query

CommandWhat it doesKey flags
query <oxql>Execute raw OxQL.--format json|table|expand (default json)
explain <oxql>Show the query plan for an OxQL query.

--format expand expands OxGraph IDs back into function names, definition ranges, signatures, and source context — the same enrichment the navigation commands apply.

Selectors

Navigation commands accept several selector forms:

  • element:<id> — a concrete OxGraph element ID.
  • an exact crate-qualified name such as my_crate::auth::tenant_middleware (qualified names are anchored at the crate, so the first segment is the package name with - normalized to _).
  • name:<name> — a simple function name.
  • file:<path>:<line> — the innermost symbol covering a source line.

An ambiguous selector returns its candidate matches rather than guessing.

Symbol kinds

symbols accepts repeatable --kind <kind> filters. Valid kinds:

file, module, namespace, package, class, struct, enum, trait, interface, impl_block, function, method, field, variable, constant, type_alias, macro.