GitHub 0
Skip to content

Sources

Every place whatfrees looks for space, what it finds there, who it asks, and the verdict it gives.

A source is one place that holds space. Each one has an id, the platforms it runs on, a cheap detect and an entries step. A source whose tool isn't on the machine reports nothing and raises no error.

whatfrees sources prints the sources your installed version has. Run whatfrees --only pnpm-store --all to list detected pnpm stores, or whatfrees --only worktrees,pnpm-store,docker --all to include entries from all three built-in sources.

The worktrees source looks in the folders where coding agents keep checkouts.

AgentFolder
T3 Code~/.t3/worktrees
Codex$CODEX_HOME/worktrees, else ~/.codex/worktrees
Conductor~/conductor/workspaces
Cursor~/.cursor/worktrees
Claude Code<project>/.claude/worktrees, for each project in ~/.claude.json and each repository found in the folders above
Anything elseEach folder you pass with --root

Under each folder, a git checkout is judged with git. A folder that holds checkouts, such as <bucket>/<repo>, is listed by its children. Anything else is a leftover: a folder that isn't a checkout is ask, and a regular file in an agent's folder is orphan after 30 days without a change.

For a checkout under ~/.t3/worktrees, whatfrees also reads T3 Code's thread database in read-only, immutable mode. An open thread makes the checkout ask. So does a database it can't read safely. A deleted or archived thread adds a line of evidence and changes nothing else.

The pnpm-store source looks for versioned stores, such as v10. It checks environment variables, settings files and the usual store folders without starting pnpm.

The verdict is ask and the size is unmeasured: link counts don't tell what pnpm store prune keeps. The entry points you to pnpm store path, which identifies the store your project uses without removing anything. Use --all to include entries whose unmeasured savings would otherwise fall below the CLI's minimum.

The docker source asks the Docker daemon what its images, containers, volumes and build cache take, over its socket, or through the docker CLI for a named context. Every command targets the host or context that supplied the sizes, so scan again after you change a context's endpoint. OrbStack and Docker Desktop are read through their Docker sockets. Podman isn't read yet: querying its disk usage can initialize or update its store.

EntryVerdictCommand
Idle build cachesafe, or ask with an upper-bound size when Buildx may prune another builderdocker builder prune -a -f, without -f when it asks
Dangling imagessafedocker image prune -f
Unused imagesaskdocker image prune -a
Stopped containersask: their writable layers may hold datadocker container prune
Unused volumesaskdocker volume rm <name>

A daemon on another machine, through tcp://, ssh://, a bare host:port or a context that points there, is skipped with reason remote: its bytes aren't on this disk.

A source is a plain object built with defineSource. See the JavaScript API.