Source control
git diff, git log, git show, git status. Keeps every change but
trims unchanged context, omits binary blobs, and collapses long history.
TokenShift sits between a coding agent and the shell. When the agent runs a
command — git diff, npm test, kubectl get pods — TokenShift intercepts
the call, runs the real command, rewrites the output into a shorter form, and
hands the trimmed text back to the agent. The full original is kept locally so
the agent can fetch it back at any time.
agent runs: git diff ↓TokenShift recognizes the command ↓runs the real command ↓keeps the changes, trims the noise ↓caches the full output on disk ↓returns the short version to the agentThat’s all that happens. Five steps, every invocation. None of it requires configuration from the user — the rules ship in the binary.
Source control
git diff, git log, git show, git status. Keeps every change but
trims unchanged context, omits binary blobs, and collapses long history.
Test output
pytest, jest, vitest, go test, cargo test. Keeps failing tests
with stack traces and assertion details; drops the wall of pass lines.
Build & lint
npm, cargo, go build, eslint, tsc. Keeps errors and warnings;
drops the noise around them.
Search
rg, grep, find. Groups results by file, trims duplicate matches.
Listings
ls, tree, git ls-files. Bounds depth, summarizes large directories.
Infrastructure
kubectl, docker, gh, aws, gcloud. Keeps the structure of
resources; drops boilerplate fields the model already knows.
Transparent, the default. A one-time install command writes hooks into the AI agent’s settings — currently Claude Code, Cursor, and GitHub Copilot CLI are supported. From then on, every command the agent runs flows through TokenShift automatically. The agent has no idea compression is happening; it just sees shorter output.
Explicit, for scripts and shells. You can also call TokenShift directly —
tokenshift git diff, tokenshift npm test. Useful for shell aliases or
quick checks. Rarely needed in normal use.
Every compressed response ends with one extra line:
… tokenshift recover <hash>That hash points to the full, uncompressed output, stored on the local machine. If the agent ever needs the original, it asks for it by hash and gets it back verbatim. The compressed view is a summary, not a truncation.