Skip to content

pivanov/ctx-wire

Repository files navigation

ctx-wire

Stop paying tokens for noisy command output.

AI coding agents run constant shell commands, build, test, install, lint, search, git, and read every line of the output into their context. Most of it is noise you pay tokens for. ctx-wire sits between the agent and the shell: it compresses that output with declarative filters, scrubs secrets, and hands back a short result, while keeping the full (scrubbed) log on disk for when a command fails. Wire it into your agent once; from then on it works transparently.

ctx-wire.dev

Why ctx-wire

  • Automatic token savings. The noisiest commands, package installs, test runs, linters, searches, collapse to the signal the agent actually needs.
  • Transparent. One ctx-wire init <agent> and commands are filtered through the agent's hook (or PATH shims for steering-only agents). Nothing changes about how you or the agent work.
  • Nothing important is lost. Output is scrubbed of secrets before the model sees it, the full scrubbed log is spooled to disk so failures stay debuggable, and valid JSON is never broken mid-structure.
  • Measurable. ctx-wire gain reports exactly how many bytes and tokens were saved, broken down by program and by agent.
  • MCP output too. ctx-wire init claude automatically relays known snapshot-heavy MCP servers (chrome-devtools, Playwright) through mcp-wrap --compress, which measures what each tool costs in tokens and reduces verbose browser snapshots with the raw result spooled locally. Any other server can be wrapped with ctx-wire mcp-wrap install <server>.
  • Extensible. Filters are declarative TOML. Pull community filters, publish your own, or scaffold a new one from a real command transcript.
  • Works with your stack. Claude Code, Cursor, Codex, Gemini, GitHub Copilot, Cline, Windsurf, Kilo Code, and more, plus MCP for editors that prefer tools.

Quick start

curl -fsSL https://ctx-wire.dev/install.sh | sh   # installs to ~/.local/bin
ctx-wire init claude                              # or codex, cursor, gemini, copilot, ...
ctx-wire gain                                     # watch the savings add up

Upgrade anytime with ctx-wire update (checksum-verified, atomic, with rollback) on macOS, Linux, and Windows.

Documentation

  • COMMANDS.md - every command, with deep dives on explain, tune, doctor, the agent integrations behind init, and filters & trust.
  • CONFIGURATION.md - config.toml, gain storage, telemetry, and environment variables.
  • FILTERS.md covers writing your own filters: the TOML schema, the transform pipeline, inline tests, and the publish flow.
  • TROUBLESHOOTING.md - common problems and known limitations.
  • DEVELOPMENT.md - build from source, the just tasks, and release packaging.
  • ctx-wire.dev - website and impact stats.

Backed by

LogicStar AI · SashiDo.io

About

ctx-wire runs your commands, compresses the output with declarative filters, scrubs secrets, and hands your agent a short result. The full log stays on disk for when something actually fails. Cut the noise on the wire.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors