npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

autofix

v0.6.0

Published

Automatically fix all software bugs.

Downloads

575

Readme

Autofix

Gitpod Ready-to-Code NPM version

Automatically fix all software bugs.

Examples

Automatically fix bugs in the current directory:

autofix

Preview all the commands this would run, but don't actually do anything:

autofix --dry

Autofix bugs, commit fixes into separate branches, push branches to a GitHub remote:

autofix --branches --push=myremote

Autofix bugs in a GitHub repository:

autofix https://github.com/nodejs/node

Autofix bugs in a GitHub repository, commit fixes, and automatically send pull requests (requires hub):

autofix https://github.com/nodejs/node --pull-request

Try it online

Open in Gitpod

Try it locally

If you have npm, you can run autofix via npx:

npx autofix

Command line options

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
  • [x] --branches: Commit fixes of different types into different branches (e.g. autofix-codespell)
  • [x] --tiers=0,1,2: Choose which types of bugs should be autofixed (see details about tiers below)
  • [x] --verbose: Log additional information to the console (e.g. for troubleshooting autofix bugs)
  • [x] --push=REMOTE: Push fixes to a given GitHub remote (e.g. your GitHub username)
  • [x] --pull-request: Automatically open pull requests with pushed commits (requires hub, implies --push=origin if unspecified)
  • [x] --pull-request-description=FILENAME: Customize pull request descriptions by providing a markdown file (use with --pull-request)
  • [x] --branch-suffix=SUFFIX: Add a common suffix to generated branch names (i.e. autofix-codespell-SUFFIX)
  • [x] --signoff: Use Git's --signoff (or -s) feature when creating commits

Types of bugs that can be fixed

Tier 0 (default - no rework needed):

  • [x] Remove trailing whitespace (uses git, xargs and sed)
  • [x] Update pinned pyenv tool versions in Dockerfiles (requires pyenv)
  • [x] Update pinned nvm tool versions in Dockerfiles (requires nvm)
  • [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)
  • [ ] Fix Rust bugs with clippy (requires rust-clippy)

Tier 3 (you probably don't want to run these):

  • [ ] TODO

Custom fixers

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.