Skip to content

CtxCtl

Your coding agent pays for every byte of context.

A stateless context layer for coding agents: AST symbol slices instead of whole-file dumps, exec output compression instead of raw log walls — byte-stable output that keeps provider prompt caches hot. Optional ctxctl mcp adapter.

Read the docs

Scripted-agent benchmark, deepseek-v4-flash via OpenRouter, single run per arm.

Read only the symbol you need, compress what your commands print, never re-send a byte you already paid for.

outline

Symbol map of any file — names, kinds, line ranges, signatures — with token-savings stats.

Terminal window
ctxctl outline src/server.rs

symbol

One symbol’s verbatim slice from the original source by AST byte range. --compact folds the body.

Terminal window
ctxctl symbol src/server.rs --name handle_request --compact

read

Raw line-range slices when you know exactly which lines you want. No AST needed.

Terminal window
ctxctl read src/main.rs --lines 40-80

deps

Import/module dependency graph of a file, split into local and external targets.

Terminal window
ctxctl deps src/main.rs

exec

Run a command, collapse its output to key lines plus head/tail summary. The least conditional win.

Terminal window
ctxctl exec "cargo test" --keep "FAILED|passed"

mcp

Serve the same five commands as MCP tools over stdio for MCP-native agents.

Terminal window
ctxctl mcp

14 language backends via tree-sitter

.rs.ts.tsx.js.jsx.py.go.c.h.cpp.java.cs.rb.lua.html/.htm.css/.scss.md
Terminal window
cargo install ctxctl