# ctx

A local CLI toolchain that indexes months of existing coding-agent session history on a developer's machine so it can be searched, blamed to code, and cut down before feeding it back to an agent.

ctx is an open, local, fast command-line toolchain for context engineering that searches the coding-agent session history already sitting on a developer's machine, in files under directories such as `~/.claude` and `~/.codex`. `ctx setup` discovers those history sources and converts each provider's own format into consistent local records for sessions, messages, tool calls, relationships, and repository activity, without modifying the originals, then keeps that index current automatically as history changes.

`ctx graph` maps relationships across a codebase, and `ctx sift` cuts noisy tool output before an agent reads it. Unlike agent memory that compacts what happened into a summary that can go stale, ctx keeps the real transcripts, letting a session recover earlier decisions, constraints, prior investigations and failed approaches, and letting attribution point at the session that wrote a given piece of code; it also understands how parent sessions, subagents, and forks relate to each other.

It is written in Rust and installs through a shell or PowerShell script.

Website: https://ctx.rs
