Skip to main content

CLI wrapper that compresses command output for AI agents, reducing token usage by 60-97%

Project description

tidyout

A CLI wrapper that sits between you (or your AI agent) and the terminal. Prefix any command with tidyout and tidyout executes it, strips the noise, and returns a compressed version with a token savings summary.

✂️  tidyout: 312 lines → 18 lines | saved ~2376 tokens (94% reduction)

Built for AI coding sessions (Claude Code, Cursor, Copilot) where terminal output burns tokens fast.

Install

pip install tidyout-cli

Usage

tidyout pytest tests/
tidyout git status
tidyout git log
tidyout ls -la
tidyout find . -name "*.py"
tidyout docker logs mycontainer
tidyout npm install
tidyout cargo build

Every run ends with a summary line:

✂️  tidyout: {original} lines → {compressed} lines | saved ~{tokens} tokens ({percent}% reduction)

Commands without a matching rule pass through unchanged and still show the summary (0% reduction).

Supported commands

Command What gets stripped Typical savings
pytest PASSED lines, platform info, separators ~80%
git status hints, up-to-date messages, blank lines ~60%
git log Author email, full hashes, blank lines ~50%
ls permissions, owner, group, timestamp — reformatted to DIR:name / F:name:size ~70%
find .git/, node_modules/, __pycache__/, ./ prefix ~40%
tree entries beyond depth 3, node_modules, .git, __pycache__ ~50%
pip install progress bars, Collecting/Downloading, already-satisfied ~90%
npm install warn/notice lines, blank lines ~85%
docker logs health check noise, keeps last 50 lines ~70%
docker ps header, full IDs, padding — reformatted to name:status:ports ~60%
jest passing test names, keeps failures and summary ~80%
make Entering/Leaving directory noise ~40%
cargo build dependency Compiling lines, Downloading ~75%

tidyout init — inject rules into your AI agent config

Running tidyout init in your project directory automatically tells your AI agent to always use tidyout:

tidyout init

It writes to all major AI agent config files at once — creating missing ones and appending to existing ones:

File AI tool
CLAUDE.md Claude Code
.cursorrules Cursor
.windsurfrules Windsurf
.github/copilot-instructions.md GitHub Copilot

Injected block:

## Token Optimization with tidyout
Always prefix the following commands with `tidyout` when running in terminal:
pytest, npm test, jest, rspec, git status, git log, ls, find, tree,
pip install, npm install, docker logs, docker ps, make, cargo build
This reduces token usage by 60-97% on command outputs.

Contributing a new rule

See CONTRIBUTING.md — it's just one YAML file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tidyout_cli-0.2.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tidyout_cli-0.2.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file tidyout_cli-0.2.0.tar.gz.

File metadata

  • Download URL: tidyout_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for tidyout_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 65388404a31f8105e54669f14a902283877c0edea7496ba397082140ce4658a2
MD5 d91ff9bdb01c47e6f4821b2c3ba9e7c8
BLAKE2b-256 197bdd89c7e67057abf57ee8613bccb37e6f6aac8d2a68ec0ffb9d3596436673

See more details on using hashes here.

File details

Details for the file tidyout_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tidyout_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for tidyout_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7dacd9de2ad2663a9d15f47b076e401b1db2688755cdefb094b7f39b998a308
MD5 969f3bc3c3a70443960544d103ff418a
BLAKE2b-256 33e5c9046a5076c24ec428d5231ab12987131022545516c6f8103edda7da09fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page