Purpose: CTX provides codebase intelligence and context for AI programming agents. AI tools often suffer from problems such as path hallucination, reading entire directories, missing cascading impacts, and wasting tokens; CTX solves these through a local code graph.
Main capabilities: Build a queryable code graph that records files, symbols, signatures, and imports; incremental updates, writing to SQLite (.ctx/index.db) only where files change; reliable dependency resolution, resolving relative imports, Python dotted modules, Rust use paths, and Go imports to real files, otherwise marking them as external/unresolved without fabricating edges; skeleton-style context, outputting signatures, types, and exports without function bodies; explainable ranked context, scoring by keywords, hubs, recency, paths, and git and giving reasons for inclusion; impact analysis, performing cycle-safe BFS based on the dependency graph and grouping by direct/indirect/tests/unknown; git-aware symbol-level diff. Fully local, offline, no telemetry, and does not execute code.
Usage: Install the same native Rust binary through each ecosystem, for example winget install halloffame12.CTX; the repository provides scripts/install.sh and scripts/install.ps1. Building from source requires Rust 1.85+ (edition 2024); on Windows the GNU toolchain is recommended. Connect as an MCP server via stdio to MCP clients such as Claude, Cursor, Copilot, and opencode; configuration is via a stdio command, and an npx form can also be used to avoid a global installation. Common commands include ctx context, ctx doctor, ctx stats, ctx version, and ctx benchmark; most queries provide deterministic JSON output, stdout outputs only JSON or protocol messages, and diagnostic information goes to stderr.
Limitations and notes: This is the local engine itself and does not call external AI APIs; paths that escape the project root are rejected; some corrupted files are recovered by tree-sitter and recorded in parse_errors. The materials do not provide specific fee or pricing information.