fallow fix removes unused exports and unused dependencies from your codebase.
In agent workflows, fallow fix --yes --format json cleans up dead code non-interactively after code generation.
Recommended workflow
Preview changes
Run a dry run to see exactly what would be removed without making any changes.
$ fallow fix --dry-run
Review the output
Check that every proposed removal is safe. Pay attention to exports consumed by external packages or dynamic imports that fallow can’t detect statically.
Apply fixes
Once you’re satisfied, apply the changes. In interactive terminals, fallow asks for confirmation before writing.In CI or non-TTY environments, use
--yes to skip confirmation:Agents typically use
fallow fix --yes --format json to apply fixes non-interactively. The JSON output confirms exactly what was changed, so the agent can verify the result.What gets fixed
- Unused exports: the
exportkeyword is removed, keeping the declaration - Unused dependencies: removed from
package.json
JSON output
For scripting, CI, and agent workflows:See also
CLI: fix
Full reference for the
fallow fix command and its flags.Dead Code Analysis
Understand what fallow detects before auto-fixing.