whereismyai
Shrink Anything
Shrink Anything is a command-line tool that deletes dead code and unused files from codebases while keeping edits that pass tests.
Shrink Anything is a command-line utility for cleaning up codebases by removing dead code, unused files, dead dependencies, and redundant assets. It scans projects across 19 supported languages, performs cuts, and runs your test suite after each change to verify that tests still pass, reverting any edits that break the build. It features commands for scanning, weighing build sizes, generating pull request reports, undoing changes, and integrating with AI agents like Claude Code or Codex via MCP servers or plugins. The tool is designed for developers who want to reduce codebase size and token counts for AI coding agents. It supports popular package managers and languages including Python, JavaScript, TypeScript, Rust, Go, PHP, and Ruby.
Shrink Anything at a glance
Key features
- Scans codebases for dead code and unused files
- Runs test suites after cuts to verify behavior
- Reverts changes that break tests automatically
- Integrates with AI agents for judgment calls
- Analyzes build weight and asset duplication
- Generates markdown and SVG reports for pull requests
- Supports multiple languages and package managers
Use it for
- Removing dead code and files from software projects
- Trimming unused dependencies and redundant assets
- Reducing token counts for AI coding assistants
- Measuring build weight and locating duplicates
Alternatives to Shrink Anything
- Fast Anything — Profiles code, uses agents to port slow functions to Rust, and verifies correctness.
- Craft Anything — Studies software with real inspection tools and builds custom versions with AI.
- Rust Anything — It replays recorded cases against Rust rewrites to ensure identical behavior.
- Redacted — It scrubs tool output locally to prevent secrets from entering AI contexts.
- REA — It gives your coding agent the tools to inspect programs and explain their internal logic.
- jevgrep — Reduces coding agent costs by providing targeted, relevant repository context.
- Agent Purge — Manage system prompts for multiple coding agents from one place.
- Squeeze — Cuts token usage for coding agents by shrinking verbose tool output while retaining key data.
- Understand Anything — Turns complex code into meaningful business domain flows and interactive stories.
- Entire CLI — Mirrors Git repositories globally to increase cloning speeds for AI agents.
- Claude Scrub — Removes exposed API keys, passwords, and tokens from local AI session history.
- Safe Anything — Finds vulnerabilities, secrets, and risky agent setups in one command.
All Shrink Anything alternatives