Proven in day-to-day engineering workflows

CLI for high-signal code context

ctx turns any repo into a context pack for you and your AI tools.

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.

Built for engineers, friendly to agents

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

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.

For AI workflows

High‑signal prompts without manual curation

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

Repeatable, scriptable context

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

MCP & CI ready

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.


Four commands, one mental model

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.

  • Respects .gitignore and .ignore files at every directory level.
  • Streams output so large repositories stay responsive.
  • Generates Toon, JSON, or XML output for humans and machines.
  • Optional documentation enrichment for local and remote packages.
ctx tree

See the structure, not just the size

Summarize repositories, filter out generated noise, and get per‑directory token estimates. Ideal for onboarding, PR reviews, and “what even is this repo?” moments.

ctx content

Stream the files that matter

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.

ctx callchain

Follow behaviour through the stack

Explore who calls what without opening an IDE. ctx traces call chains through Go packages and presents them in a compact, streaming view.

ctx doc

Harvest real documentation

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”.


Drop ctx into your existing tooling

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.