ctx-agent

A Rust CLI that turns a repository into queryable memory for AI coding agents.

Why it exists

An agent working in a large repository loses most of its time walking files to answer a single question: if I change this file, what breaks? Symbol indexes such as ctags return a list but are not shaped for an agent, and server-backed code intelligence needs infrastructure. ctx-agent scans the project once, writes it to SQLite, and answers the agent locally — no LLM, no cloud, no API key.

What it does

Stack

Usage

cd your-project && ctx init
ctx status
ctx map
ctx query "parse"
ctx blast-radius src/db/mod.rs
ctx decisions
ctx warnings
ctx watch
ctx status --json

Engineering notes

The stated non-goals carry as much weight as the features: it does not write code, does not guarantee that a build or lint passes, does not observe runtime behaviour and is not an LSP. What it does is static structural analysis, and saying so is what keeps the output trustworthy. Re-scans are incremental — only changed files are analysed again. A paranoid mode is on by default and reports BLOCK or PASS for changes that touch auth, session, token or crypto paths, and every MCP call is appended to a per-project activity log.

Limitations

Source: Ahmetshbzz/ctx-agent