CLI Reference
All commands, flags, and options available in the ctxe CLI.
Global options
All commands support these output formats via -f or --format:
human— readable output (default)json— structured JSON for scriptingcompact— minimal output
ctxe index
Index a project directory. Parses source into AST chunks, generates vector embeddings, and builds the knowledge graph.
ctxe index [path] [options] pathProject root (defaults to .)--forceFull reindex, ignore cached hashes--retry-errorsRetry chunks stuck in error state (embedding, summary, doc expansion)Indexing is incremental by default — only changed files are reprocessed.
ctxe status
Show index status for a workspace: file count, chunk count, embedding coverage, and capabilities.
ctxe status [path] pathProject root (defaults to .)ctxe ask
Goal-driven semantic search with LLM evidence planner. Performs multi-round retrieval (vector search, FTS5, graph expansion) and returns synthesized evidence.
ctxe ask <query> [options] queryNatural language question or objective--fullEmit full diagnostics in JSON output (planner history, scoring metadata)ctxe summarize
Generate or update LLM-powered chunk summaries for improved search relevance.
ctxe summarize [path] [options] pathProject root (defaults to .)--forceRe-summarize all chunks (ignore existing)--retry-errorsRetry chunks stuck in error state--chunk-ids <ids>Comma-separated list of specific chunk IDs--limit <n>Maximum number of chunks to processctxe config
Manage CtxE configuration.
config init
Create default config at ~/.ctxe/config.toml.
ctxe config init config show
Show the active (merged) configuration. Secret-bearing fields are redacted.
ctxe config show config path
Show config file paths and their status (exists / not found).
ctxe config path ctxe daemon
Background daemon for multi-workspace indexing. Manages workspace registry and keeps indexes fresh automatically.
daemon run
Start the daemon in foreground.
ctxe daemon run [paths...] pathsInitial workspace paths to registerdaemon add
ctxe daemon add <path> daemon remove
ctxe daemon remove <path> daemon list
ctxe daemon list daemon status
ctxe daemon status daemon stop
ctxe daemon stop ctxe serve
Start a local HTTP server for non-MCP clients.
ctxe serve [options] --host <addr>Bind address (default: 127.0.0.1)--port <port>Listen port (default: 4590)ctxe mcp
Start the MCP server on stdio. This is what AI clients (Claude Code, Cursor, etc.) invoke to communicate with CtxE.
ctxe mcp Typically invoked automatically by the MCP client — you rarely need to run this manually.
ctxe tool
Inspect and invoke tools from the unified tool registry (same tools exposed via MCP).
tool list
List all available tools.
ctxe tool list [--category <name>] tool describe
Show detailed info about a tool (parameters, description).
ctxe tool describe <name> tool run
Run a tool with JSON input.
ctxe tool run <name> --json '{"query": "..."}' Graph inspection
Debug and inspect the knowledge graph. These are advanced commands for understanding code relationships.
graph-neighbors
Query graph neighbors of a chunk.
ctxe graph-neighbors --chunk-id <id> [--edges <kinds>] [--direction <dir>] [--limit <n>] --edgesComma-separated edge kinds (calls, called_by, references, etc.)--directionincoming, outgoing, or both (default: both)--limitMaximum results (default: 20)graph-expand
Expand graph neighborhood from seed chunks.
ctxe graph-expand --chunk-id <ids> [--edges <kinds>] [--hops <n>] [--limit <n>] --chunk-idComma-separated seed chunk IDs--hopsMaximum hops (default: 2)--limitMaximum nodes to return (default: 50)graph-path
Find paths between two chunks in the graph.
ctxe graph-path --from <id> --to <id> [--edges <kinds>] [--max-hops <n>] [--max-paths <n>] [--strategy <s>] --max-hopsMaximum hops (default: 5)--max-pathsMaximum paths to return (default: 3)--strategyshortest or all_simple (default: shortest)graph-container
Show structural container metadata for a chunk (file, module, package).
ctxe graph-container --chunk-id <id> ctxe classify-chunks
Classify chunk embeddings using chunk-type exemplars (e.g., function, type definition, test, config).
ctxe classify-chunks [path] [--all] [--limit <n>] --allClassify all embedded chunks (default: stale/missing only)--limitMaximum chunks to classifyctxe classify-report
Show chunk-type classification distribution report.
ctxe classify-report [path] ctxe version
Show version and build info.
ctxe version