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

@chof64/aicommit

v0.4.0

Published

AI-powered commit message generator using opencode.ai zen

Readme

@chof64/aicommit

CI

AI-powered commit message generator. Reads your staged git diff, sends it to any OpenAI-compatible chat completions endpoint (default: opencode.ai zen), and writes a conventional-commit message after a quick confirmation prompt.

Requirements

  • Node.js 20+ (uses native fetch)
  • git on PATH

An API key is optional. The default endpoint (opencode.ai zen) and model (big-pickle) accept anonymous requests, so aicommit works out of the box without any configuration. Set AICOMMIT_API_KEY only if your provider requires one, or for access to paid models or higher rate limits.

Install

npm i -g @chof64/aicommit

Configure (optional)

All settings come from environment variables. Defaults target opencode.ai zen; to authenticate, export your key:

export AICOMMIT_API_KEY=<your-key>

| Variable | Default | Description | | -------------------- | ----------------------------- | -------------------------------------------------- | | AICOMMIT_API_KEY | — (optional) | API key sent as Authorization: Bearer <key>. | | AICOMMIT_BASE_URL | https://opencode.ai/zen/v1 | OpenAI-compatible root URL of the endpoint. | | AICOMMIT_MODEL | big-pickle | Model id served at the endpoint. | | AICOMMIT_CONTEXT_TOKENS | 16000 | Assumed model context window, used to size the diff sent to the model. |

OPENCODE_API_KEY is still honored as a fallback for AICOMMIT_API_KEY.

Any OpenAI-compatible provider works — for example, a local Ollama:

export AICOMMIT_BASE_URL=http://localhost:11434/v1
export AICOMMIT_MODEL=llama3.2
export AICOMMIT_API_KEY=ollama

Note: during the free-period of Big Pickle, requests may be used to improve the model. Avoid sending diffs that contain personal or confidential data.

Usage

Stage your changes as usual, then run aicommit:

git add .
aicommit

Add a hint to steer the message — useful for non-obvious diffs:

git add src/auth.ts
aicommit fix race in token refresh

Flags:

| Flag | Description | | ----------------- | -------------------------------------------------------- | | --dry-run | Print the generated message, do not commit. | | -v / --verbose| Echo verbose progress to stderr (network, retries). | | -V / --version| Print the version and exit. | | -h / --help | Print the help text and exit. |

You will always be asked to confirm before git commit runs. Press n (or N) to abort; anything else (including just hitting Enter) confirms.

How it works

  1. Runs git diff --cached and aborts if nothing is staged.
  2. Sizes the diff against the model's assumed context window (see AICOMMIT_CONTEXT_TOKENS): large diffs are trimmed hunk-by-hunk before anything is sent, and a short scope summary (files changed, +/- lines per file) is prepended so the model sees the full size of the change.
  3. Sends the diff (plus any hint) to the configured OpenAI-compatible chat-completions endpoint (default: opencode.ai zen, big-pickle) via the Vercel AI SDK (@ai-sdk/openai-compatible).
  4. Asks the LLM for a single conventional-commit message (<type>: <description>).
  5. Shows you the result, waits for Y/n, then runs git commit -m.

The full prompt sent to the model is in src/api.ts — see SYSTEM_PROMPT and USER_PROMPT_TAIL.

About

aicommit was created as a personal script to use AI in writing commit messages. It was a simple tool, and a way for me to learn scripting. It started as a Python script (with a shebang) on my Mac, but I found good use for it, so I migrated it to TypeScript and published it to npm.

It may not be as feature rich as other similar tools — still new, and under development — but it's the first project of mine on npm, and the first with (planned) CI/CD workflows that automate development, testing and deployment.

What's next

I'm planning to add a few features as time goes on:

  • Customizable commit types — including support for the Angular convention
  • Hierarchical diff summarization — for changes too large to fit even a trimmed diff, summarize each file's diff in its own call, then combine the summaries (currently, oversized diffs are trimmed to the model's context window instead)
  • Tests — coverage for the core flow

License

MIT