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 tidy 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

tidy pytest tests/
tidy git status
tidy git log
tidy ls -la
tidy find . -name "*.py"
tidy docker logs mycontainer
tidy npm install
tidy 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%

tidy init — inject rules into your AI agent config

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

tidy 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 `tidy` 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.1.1.tar.gz (12.8 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.1.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tidyout_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tidyout_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b9ffbac38c712f0f7e1fa07be7b502af445614359d6c8d41a6347ebf75fb9a12
MD5 e5615ec93e1f2d1e01e1279bb532b3ba
BLAKE2b-256 d26587f3951279767bd3fa8edb5979a1a7165fbc4dea0042b3d96fb050a52614

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tidyout_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c42188501c06bc866b423c7c156679bb7032b64a2d9d5825f1698696f2a9b783
MD5 4124a256c577bd62777c0a6d1bae13d4
BLAKE2b-256 eeba84a18bd9488bd0408431aa822ca4aae607c4b5adb9231e17c7d497a24d07

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