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

autocommit-forge

v0.5.40

Published

AI-powered git commit generator with single-entry quick mode and preview confirmation

Downloads

5,411

Readme

AutoCommit Forge

Generate clear Git commit messages from your staged changes using the AI provider you choose.

AutoCommit Forge reads git diff --cached, applies your saved rules and style preferences, generates one commit message, and lets you accept or regenerate it before committing.

Features

  • Generate commit messages from staged Git changes.
  • Preview, accept, or regenerate suggestions before committing.
  • Use Conventional Commits automatically.
  • Choose a tone: neutral, casual, formal, funny, professional, or direct.
  • Add matching emojis for Conventional Commit types.
  • Match your existing commit-message style using examples.
  • Add custom rules for your project or team.
  • Limit generated message length.
  • Install a Git prepare-commit-msg hook.
  • Use hosted AI providers or fully local Ollama models.
  • Connect to an Ollama server running on another machine in your LAN.

Installation

Install AutoCommit Forge globally:

npm install -g autocommit-forge@latest

Confirm that it is available:

autocommit-forge --help

For local development from source:

npm install
npm run build
npm link

Quick Start

1. Setup the CLI (only needed once to configure your provider, model, and rules):

autocommit-forge setup

2. Navigate to your project folder:

cd your-project

3. Stage the files you want to commit:

git add src/index.ts

4. Generate the commit message:

autocommit-forge generate

Basic Workflow

1. Stage your changes

AutoCommit Forge only reads staged changes. You can stage files using the command line:

git add src/index.ts

Using a Git GUI? You can easily use third-party Git programs like Sourcetree, Fork, GitKraken, or VS Code. Simply select and stage your files using the GUI. Once the files are staged, open a terminal in that project folder and run:

autocommit-forge generate

2. Generate a message

autocommit-forge generate

3. Review the result

feat: add user validation

? Are you happy with this commit message, or would you like to regenerate it?
❯ Yes, use this message
  No, regenerate a different message

After acceptance, AutoCommit Forge creates the Git commit using the selected message.

Commit Message Examples

The generated message depends on the staged diff, provider, model, tone, and configured rules.

Conventional Commits

feat: add user authentication
fix: prevent duplicate form submissions
docs: update installation instructions
refactor(api): simplify request validation
test: add coverage for authentication flow
chore: update development dependencies

With fixed emojis

When emoji support is enabled, AutoCommit Forge adds an emoji based on the detected Conventional Commit type.

✨ feat: add user authentication
🐛 fix: prevent duplicate form submissions
📚 docs: update installation instructions
♻️ refactor(api): simplify request validation
🚨 test: add coverage for authentication flow

Commands

| Command | Description | | --- | --- | | autocommit-forge | Quick mode: generate, review, and commit using saved configuration | | autocommit-forge setup | Configure provider, model, tone, rules, and defaults | | autocommit-forge generate | Generate a commit message from staged changes | | autocommit-forge install-hook | Install a prepare-commit-msg Git hook in the current repository |

Generate Options

Preview without committing

Generate and review a message while keeping changes staged:

autocommit-forge generate --no-commit

Skip the confirmation prompt

Generate and commit immediately:

autocommit-forge generate --auto

Use this only when you trust the active provider, model, and configuration.

Override tone

autocommit-forge generate --tone formal

Available tones:

neutral
casual
formal
funny
professional
direct

Enable emojis for one run

autocommit-forge generate --with-emotes

Match existing commit style

Provide two examples from your repository or team convention:

autocommit-forge generate \
  --example-1 "feat(auth): add passkey login" \
  --example-2 "fix(api): handle empty response"

AutoCommit Forge uses them as style guidance while keeping the generated message grounded in the staged diff.

AI Providers

AutoCommit Forge supports the following providers:

| Provider | API key required | Notes | | --- | ---: | --- | | perplexity-agent | Yes | Perplexity Agent API | | perplexity | Yes | Legacy Perplexity Sonar API | | openai | Yes | OpenAI-compatible chat completion API | | anthropic | Yes | Anthropic Messages API | | openrouter | Yes | OpenRouter chat completion API | | ollama | No | Fully local or LAN-hosted models |

Run the setup wizard to select a provider and model:

autocommit-forge setup

Ollama

Ollama lets you generate commit messages with local models and no cloud API key.

Local Ollama

Install and start Ollama, then pull a model:

ollama pull llama3.1
ollama run llama3.1 "Say hello"

Run setup and select ollama as the provider:

autocommit-forge setup

Use the default host when Ollama runs on the same machine:

http://localhost:11434

Ollama on another LAN machine

If Ollama runs on another machine in your trusted local network, expose the Ollama server on that machine and use its LAN IP address during setup:

http://192.168.0.221:11434

AutoCommit Forge stores the chat endpoint automatically:

http://192.168.0.221:11434/api/chat

For security, do not expose an unauthenticated Ollama API directly to the public internet.

Git Hook

Install the hook from inside the repository where you want automatic commit-message generation:

cd your-project
autocommit-forge install-hook

Then create a normal Git commit:

git add .
git commit

The prepare-commit-msg hook generates and writes a commit message automatically.

Environment Variables

Use these variables for temporary overrides or scripts:

export AUTOCOMMIT_TONE=casual
export AUTOCOMMIT_FORGE_AUTO=1

Then run:

autocommit-forge generate

| Variable | Description | | --- | --- | | AUTOCOMMIT_TONE | Override the configured tone | | AUTOCOMMIT_FORGE_AUTO=1 | Skip the accept/regenerate prompt | | AUTOCOMMIT_FORGE_DEBUG=1 | Print Perplexity request and response debug output |

Troubleshooting

No staged changes found

Stage files before generating a commit message:

git add .
autocommit-forge generate

Missing configuration

Run the setup wizard:

autocommit-forge setup

Ollama cannot be reached

First verify that Ollama is available:

curl http://localhost:11434/api/tags

For a LAN-hosted Ollama instance, replace localhost with the server IP address:

curl http://192.168.0.221:11434/api/tags

Check the installed version

autocommit-forge --version

Support

After every 15 successful uses, AutoCommit Forge may show a support message.

If the project helps you, consider buying me a coffee:

https://buymeacoffee.com/gregu90