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 detects which config file to update:

  • CLAUDE.md exists → appends tidyout usage rules
  • .cursorrules exists → appends tidyout usage rules
  • Neither exists → creates CLAUDE.md with the rules

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.0.tar.gz (12.4 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.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tidyout_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1f2f1ef47f48587f71fb6dc78c849a2578ce760d59513546a9e3bff890c177c2
MD5 c7e879ff1fb9e0a5e540539ab51dd04b
BLAKE2b-256 b27e9e1539008d035a62acd7ca3a49170ee17173ff10f49047ee20b22b68cb9c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tidyout_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c7f62842325c26643aea231181f1083a7a874e81299200e8acbb07a048dec5f
MD5 3de5dece83381a642cb7a6d9f411ad78
BLAKE2b-256 088bb40b6f6c060d8bdd5ec49c46985e09447f03dbacf0103e5de08bb5fc0d29

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