Skip to content

CLI overview

devtidy is the same engine as the app, for terminals, scripts and CI.

Terminal window
devtidy scan # what is using space
devtidy explain gradle.caches # what an item is and what removing it costs
devtidy clean --safe --dry-run # what would be removed
devtidy clean --safe # remove everything marked safe (asks first)
devtidy history # past cleanups and what they freed
devtidy rules # every known location

These work with every command.

Option Environment Meaning
--json Print machine-readable JSON instead of a table. See JSON output.
--home <HOME> DEVTIDY_HOME Home directory to scan.
--rules-dir <DIR> DEVTIDY_RULES_DIR Directory with extra custom rules. Defaults to ~/.config/devtidy/rules.
DEVTIDY_DATA_DIR Where the history database lives. Defaults to ~/Library/Application Support/devtidy on macOS.
NO_COLOR Disable colors.
Code Meaning
0 Success.
1 Error, or a cleanup action failed.
2 Invalid usage.
3 scan --fail-above threshold exceeded.

Progress messages go to stderr and data to stdout, so piping is always safe:

Terminal window
devtidy scan --json | jq '.totals.reclaimable'