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

format-commit

v1.1.0

Published

Lightweight CLI to standardize commit messages with AI-powered suggestions

Readme

format-commit

Node.js Version npm downloads License: MIT

Lightweight CLI for consistent Git workflow & and optional AI support.

Standardize your commit messages and branch naming with configurable rules, and guide your development workflow through automated scripts. No bloat, no complexity - just clean, consistent Git practices. Feel free to let AI suggest commit titles for you in the expected format.

Installation

npm i format-commit --save-dev

Usage

Add to your package.json scripts:

"scripts": {
  "commit": "format-commit",
  "branch": "format-commit --branch"
}

And use:

npm run commit # to commit
npm run branch # to create a branch

Global Installation

Or install globally:

npm i -g format-commit
format-commit
format-commit --branch

Initial Setup

On first use, format-commit will prompt you to configure your commit and branch.

If you want to reconfigure later from scratch, run:

format-commit --config

Configuration

All configuration is stored in the commit-config.json file. Here is the list of all options.

format

Commit title format:

  • 1: (type) Description / 2: (type) description
  • 3: type: Description / 4: type: description
  • 5: type(scope) Description / 6: type(scope) description
  • 7: type(scope): Description / 8: type(scope): description
  • "custom"

customFormat

Custom commit format pattern. Uses keywords type, scope, description and custom field(s) with {field} placeholders. Keywords are case-sensitive.

Example: {Issue ID} - type - scope - Description.

branchFormat

Branch naming format:

  • 1: type/description
  • 2: type/scope/description
  • "custom"

customBranchFormat

Custom branch format pattern. Uses keywords type, scope, description and custom fields with {field} placeholders. Keywords are case-sensitive. Separators must be valid in Git branch names (no spaces, ~, ^, :, ?, *, [, \, .. or //). Dynamic parts (description, custom fields) are automatically sanitized to be branch-safe.

Example: type/{Issue ID}-Description.

types

Allowed commit and branch types (default: feat, fix, core, test, config, doc)

scopes

Scopes for commit and branch categorization (used in formats 5-8 for commits, format 2 for branches, or when a custom format includes the scope keyword)

minLength

Minimum length required for the commit title.

maxLength

Maximum length required for the commit title and branch description.

changeVersion

Version change policy:

  • never (ignore): Never change version, skip prompt (default)
  • never (always ask): Always prompt for version change
  • only on release branch: Only release branch commits require version change
  • always: All commits require version change

releaseBranch

Main/release branch name (used if changeVersion = only on release branch)

showAllVersionTypes

Show all version types or only main ones (major/minor/patch/custom)

ai.enabled

Enable AI commit title suggestions (default: false)

ai.provider

AI provider:

  • anthropic (Claude)
  • openai (GPT)
  • google (Gemini)

ai.model

Model identifier (e.g., claude-haiku-4-5 or gpt-4o-mini)

ai.envPath

Path to .env file containing the AI provider API key (e.g., .env)

ai.envKeyName

Name of the environment variable for the API key (e.g., OPENAI_API_KEY)

ai.largeDiffTokenThreshold

Number of tokens from which not to use AI automatically.

AI Suggestions

When AI is enabled, your staged changes will be processed by the defined model to suggest commit titles that:

  • Follow your configured format and naming conventions
  • Automatically select appropriate types and scopes
  • Respect your min/max length constraints
  • Describe the actual changes in your code

You can either:

  • Choose one of the 4 AI suggestions for quick commits (and can edit it)
  • Select "Custom" to enter commit details manually (classic flow)

Security: AI provider API key is stored in a .env file automatically added to .gitignore.

CLI Options

| Short | Long | Description | | :---- | :--- | :---------- | | -c | --config | Generate or update configuration file | | -b | --branch | Create a new standardized branch | | -t | --test | Preview without executing Git commands | | -d | --debug | Display additional logs |

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.