For humans
Fast, focused code reading
Jump into unfamiliar repositories with a clear tree view, immediate file content, and cross‑referenced call chains. ctx keeps the noise down so you can reason about behaviour instead of fighting the file system.
CLI for high-signal code context
Stop copy‑pasting trees and snippets. ctx walks your codebase once and streams a precise, compact view of the files, call chains, and docs you actually care about — ready for reviews, refactors, and AI sessions.
Why ctx
ctx is a small Go binary designed to be the “context generator” for your day‑to‑day work. It understands directory trees, call chains, documentation, and token budgets so you don’t have to maintain ad‑hoc scripts or huge copy‑paste buffers when pairing with an LLM.
For humans
Jump into unfamiliar repositories with a clear tree view, immediate file content, and cross‑referenced call chains. ctx keeps the noise down so you can reason about behaviour instead of fighting the file system.
For AI workflows
Feed agents and chat models a compact, structured snapshot of the code that matters. ctx estimates tokens, respects ignore rules, and can enrich content with documentation to keep prompts sharp and affordable.
For teams
Capture onboarding, debugging, and release review workflows in a single command you can commit to the repo. Everyone runs the same ctx invocation and gets the same trustworthy view.
For automation
Use ctx as a standalone CLI or run it as an MCP server so agents can ask for trees, content, and docs on demand. Integrate it into CI to snapshot context for regression investigations or release notes.
Core capabilities
ctx is intentionally small. Each command focuses on a single kind of context, and all of them share the same ignore rules, output formats, and documentation settings.
Summarize repositories, filter out generated noise, and get per‑directory token estimates. Ideal for onboarding, PR reviews, and “what even is this repo?” moments.
Dump the exact subset of files you care about — by directory, glob, or explicit path — with optional embedded docs. Perfect for feeding into an LLM or attaching to a ticket.
Explore who calls what without opening an IDE. ctx traces call chains through Go packages and presents them in a compact, streaming view.
Discover READMEs and external docs for your dependencies (Go, JavaScript, Python) and emit them alongside your code context so humans and AI always see the “why”, not just the “what”.
Workflows
ctx is designed to live next to your editor, issue tracker, and agent stack. You decide how much context to collect; ctx keeps it consistent and reproducible.