Automatically fix all software bugs.
npm install autofix

Automatically fix all software bugs.
Automatically fix bugs in the current directory:
``bash`
autofix
Preview all the commands this would run, but don't actually do anything:
`bash`
autofix --dry
Autofix bugs, commit fixes into separate branches, push branches to a GitHub remote:
`bash`
autofix --branches --push=myremote
Autofix bugs in a GitHub repository:
`bash`
autofix https://github.com/nodejs/node
Autofix bugs in a GitHub repository, commit fixes, and automatically send pull requests (requires hub):
`bash`
autofix https://github.com/nodejs/node --pull-request

If you have npm, you can run autofix via npx:
`bash`
npx autofix
`bash`
autofix (DIRECTORY|REPOSITORY) [OPTIONS]
- [ ] DIRECTORY: Run autofix in a particular directory (defaults to .).REPOSITORY
- [ ] : Clone a Git repository, then run autofix in it.
OPTIONS:
- [x] --dry: Simulate without actually running any fix commands--branches
- [x] : Commit fixes of different types into different branches (e.g. autofix-codespell)--tiers=0,1,2
- [x] : Choose which types of bugs should be autofixed (see details about tiers below)--verbose
- [x] : Log additional information to the console (e.g. for troubleshooting autofix bugs)--push=REMOTE
- [x] : Push fixes to a given GitHub remote (e.g. your GitHub username)--pull-request
- [x] : Automatically open pull requests with pushed commits (requires hub, implies --push=origin if unspecified)--pull-request-description=FILENAME
- [x] : Customize pull request descriptions by providing a markdown file (use with --pull-request)--branch-suffix=SUFFIX
- [x] : Add a common suffix to generated branch names (i.e. autofix-codespell-SUFFIX)--signoff
- [x] : Use Git's --signoff (or -s) feature when creating commits
Tier 0 (default - no rework needed):
- [x] Remove trailing whitespace (uses git, xargs and sed)pyenv
- [x] Update pinned pyenv tool versions in Dockerfiles (requires )nvm
- [x] Update pinned nvm tool versions in Dockerfiles (requires )
- [x] Update pinned sdkman tool versions in Dockerfiles (requires sdkman)
- [x] Update pinned rr versions in Dockerfiles
- [x] Update some pinned Go module versions in Dockerfiles
- [x] Update Git submodules
Tier 1 (some rework might be needed):
- [x] Fix typos & spelling mistakes (requires codespell)
Tier 2 (experimental, use with caution):
- [x] Fix C++ bugs with clang-tidy (requires clang-tidy)clippy
- [ ] Fix Rust bugs with (requires rust-clippy)
Tier 3 (you probably don't want to run these):
- [ ] TODO
You can also implement your own fixers (similar to the ones found in the ./fixers/ directory) and commit them to your repository under a .autofix/fixers/` directory. Autofix will automatically pick them up; run them on your codebase; and commit new fixes when relevant.