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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@capsulescodes/flint

v0.2.0

Published

Auto-format utility for local and remote ease of development

Readme

Write code your way while ensuring remote consistency.

Flint empowers developers to use their personal style and formatting preferences locally, while maintaining a consistent remote codebase. By integrating with Git, Flint automatically formats code during pull and push operations. This approach prevents commits from being cluttered with formatting changes, making code reviews cleaner and collaboration smoother.

[!NOTE] Flint is currently in alpha. Contributions are warmly welcomed.

Table of Contents

  1. Installation
  2. Usage
  3. Caveats
  4. Configuration
  5. Options
  6. Package Managers
  7. Testing
  8. Credits
  9. License

Installation

1. Install Flint using your package manager

# npm
npm install --save-dev @capsulescodes/flint

2. Initialize Flint

# npm
node_modules/.bin/flint init
  • The command creates a .flint directory in your project's root [ unless already present ].
  • The command creates a flint.config.json file in your project's root [ unless already present ].

3. Optional - Copy the Flint git wrapper inside your local shell configuration file

# Flint git wrapper
git() {
  if [[ -f "$PWD/.flint/git.sh" ]]; then
    bash "$PWD/.flint/git.sh" "$@";
  else
    command git "$@";
  fi
}
  • The function calls flint around git if a .flint/git.sh file is present inside the current working directory. If not, it will call git as usual.

[!NOTE] Running flint init --wrap integrates the wrapper during setup.

You can also use flint as a git alternative.

More options below.

Usage

Once initialized, Flint integrates with your Git workflow to streamline coding practices.

  • Local Development : Format your code according to personal preferences.
  • Pulling Code : Flint adapts remote code to your local style for easier readability.
  • Committing and Pushing Code : Flint reformats your code to align with remote style guidelines.

This ensures :

  • Maintaining Code Consistency :Ensures the repository always adheres to agreed-upon styles.
  • Improving Readability : Local preferences don’t impact others' workflows.
  • Cleaner Commits : Keeps formatting changes separate from logic changes.

Caveats

Flint creates a hidden temporary commit during certain git operations, which may result in the following message to appear when running git status :

On branch main
+ Your branch is ahead of 'origin/main' by 1 commit.
+     (use "git push" to publish your local commits)

nothing to commit, working tree clean

This message indicates that your local branch is configured to track the remote branch, and Flint's hidden temporary commit makes your local branch appear ahead by one commit. If it bothers you, you can unset the upstream tracking for your branch by running :

git branch --unset-upstream <branch-name>

Configuration

Flint uses a flint.config.json file to manage formatting commands. Specify your local and remote formatting commands here.

Below is an example configuration file formatting Javascript files with ESLint. It formats locally based on eslint.local.config.js file and remotely based on eslint.remote.config.js :

{
    "linters" :
    [
        {
            "extensions" : [ "js" ],
            "binary" : "node_modules/.bin/eslint",
            "commands" : {
                "local" : "--fix --config eslint.local.config.js --quiet",
                "remote" : "--fix --config eslint.remote.config.js --quiet"
            }
        }
    ]
}

Options

- Include Flint hooks during initialization

If you want to access Flint hooks, use the init argument with the --hooks option.

# npm
node_modules/.bin/flint init --hooks

- Include Git wrapper function during initialization

If you want to run Flint while using Git, use the init argument with the --wrap option.

# npm
node_modules/.bin/flint init --wrap

- Skip adding default configuration file during initialization

If you don't want to add a configuration file template to your project, use the init argument with the --no-config option.

# npm
node_modules/.bin/flint init --no-config

- Run Flint command manually

If you want to run a specific command from configuration file property commands, use your command after the run argument. Default is local.

# npm
node_modules/.bin/flint run

node_modules/.bin/flint run remote

node_modules/.bin/flint run local foo.js

- Use Flint as a Git alternative

Flint can act as a Git wrapper, allowing you to seamlessly use Git commands while benefiting from Flint's formatting hooks. To enable this, simply replace git with flint in your commands.

# npm
node_modules/.bin/flint status

Currently supported Package Managers

  • [x] Flint is available on npm.

[!NOTE] Flint is written entirely in Bash, making it highly adaptable.

Adding support for new package managers primarily involves creating the appropriate configuration files.

Additional package managers are expected to be supported in future updates.

Contributing

Contributions are warmly welcomed. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

Testing

# npm
npm run test

# bash
bash tests/runner.sh

Credits

Capsules Codes

License

MIT