

agentdisk
English | Español
Website · Get agentdisk · Connect your agent
The honest disk report for AI coding agents: what Claude Code, Cursor, Codex and friends left on your disk, and a cleanup you can undo.
Real output on a test machine with sample projects.
agentdisk is a single-binary CLI and MCP server that finds the git worktrees, checkpoints,
transcripts and duplicate node_modules, .venv, target/ and .godot/ folders that AI coding
agents leave behind. It shows what is really reclaimable and cleans up only what is safe, with undo.
Quickstart
agentdisk scan -p ~/Projects
You get three tables (agent and tool data, worktrees, dependency and build folders), a summary of
what is reclaimable, and what each agent already cleans up by itself. Nothing on disk changes.
Then, if you want space back:
agentdisk plan -p ~/Projects # a plan; moves nothing
agentdisk apply <plan-id> # you type a code; items move to quarantine
agentdisk restore <plan-id> # changed your mind? everything goes back
Why agentdisk?
- See the real cost of parallel agents. Every agent worktree gets its own
node_modules, .venv, target/ or .godot/. agentdisk puts them in one table, per agent.
- Trust the numbers. Hardlinked files (pnpm, uv) are counted once, and "reclaimable" only counts bytes that actually come back.
- Clean up without losing work. Worktrees with uncommitted files, a
.env, a lock from a running agent, or commits on no branch are never touched. Transcripts and memories are never planned.
- Undo anything. Cleanup moves items to quarantine first; deletion is a separate, later step.
- Keep the human in charge. Only a person at a terminal can apply a plan. AI agents can scan, explain and plan, nothing more.
Install
Download a prebuilt binary for Windows, macOS or Linux from the
Releases page, unpack it and put
agentdisk on your PATH. SHA256SUMS.txt lists the checksums.
Or build from source with Rust 1.82 or newer:
git clone https://github.com/laaielichter/agentdisk
cd agentdisk
cargo install --locked --path crates/agentdisk-cli
On Windows you can run .\scripts\install.ps1 instead. Check it works: agentdisk --version
Commands
| Command | What it does | Changes disk? |
|---|
scan [-p dir] | Agent and tool data, worktrees, build folders | No |
explain <dir> | What a folder is, who made it, may it be cleaned, and why | No |
size <dir> | Size, size on disk, freed if deleted | No |
advise [-p dir] | Shared stores (pnpm, uv), duplicates, caches, Docker/WSL disks, agent settings | No |
check | Fast warning when space is low or worktrees pile up (for hooks) | No |
adapters | Which agents and tools are known, and found here | No |
plan [-p dir] | Saves a cleanup plan | Writes a plan file |
plans | Saved plans, newest first, with size and whether they were applied | No |
apply <id> | Moves plan items to quarantine (asks you for a code) | Moves files |
restore <id> | Puts them back | Moves files |
purge | Deletes quarantined items older than 7 days (asks you) | Deletes |
compact <dir> | Windows WOF compression for read-mostly folders | Compresses |
mcp | MCP server on stdio | No |
Every read command has --json. Save your projects folder once with agentdisk config --init.
The fast check also uses configured adapter folders and the min_free_gb and
max_worktrees warning limits (both default to 20). Its CLI flags override those limits.
What is safe to clean