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

commitghost

v0.6.0

Published

AI-powered commit message suggestions from your staged diff, right in the terminal.

Readme

commitghost

AI-powered commit message suggestions from your staged diff, right in the terminal. I made this for myself because I was consistently forgetting to commit often enough and English is hard sometimes.

$ git add -A
$ commitghost

┌  commitghost
◇  Read diff across 3 file(s)
◇  Got candidates
●  Pick a commit message
   feat: add config wizard for interactive setup
   feat(config): add --config flag with interactive TUI
   ✎  Edit a candidate
   ↻  Regenerate
   ✕  Cancel

Install

npm install -g commitghost

This gives you three equivalent commands: commitghost, the shorter commitg, and git commitg (git resolves any git commitg invocation to the git-commitg executable on your PATH, the same mechanism behind tools like hub).

Setup

Run the config wizard and paste in your API key when prompted:

commitghost --config

The key is saved to ~/.commitghost/credentials (created with chmod 600, readable only by you) and picked up automatically on future runs — no shell profile editing required.

Prefer an environment variable instead? That still works and takes priority over the stored key:

export ANTHROPIC_API_KEY=sk-ant-...
# or
export OPENAI_API_KEY=sk-...

Usage

git add -A
commitghost                 # generate candidates, pick one, commit
git commitg                 # same thing, as a git subcommand
commitghost --dry-run        # preview without committing
commitghost -p openai        # use OpenAI instead of Anthropic
commitghost -n 5              # generate 5 candidates instead of 3
commitghost -v                 # show file stats, token usage, cost, and timing
commitghost --config          # open the interactive config wizard

Config

Run commitghost --config for an interactive setup wizard, or hand-write a .commitghost.json in your repo root:

{
  "provider": "anthropic",
  "model": "claude-haiku-4-5-20251001",
  "style": "conventional commits, no body",
  "candidateCount": 3,
  "warnLines": 150,
  "verbose": false
}

| Field | Description | | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | provider | anthropic or openai | | model | Override the default model for the chosen provider | | style | Force a specific commit style; omit to auto-match your repo's recent commit history | | candidateCount | Number of candidates to generate (1–10) | | warnLines | Line-change threshold for the shell prompt ghost (see below) | | verbose | Always show file stats, token usage, cost, and timing (same as passing -v every time). Override per-run with -v or --no-verbose. |

The ghost

commitghost can print a little 👻 above your prompt when your working tree diff grows past a threshold — a nudge to commit before things get out of hand.

Set it up in one step:

commitghost install-ghost

This auto-detects your shell and appends a hook to ~/.zshrc or ~/.bashrc. Restart your terminal (or source the file) and you're done — no manual editing of PROMPT/PS1 required, and it won't break existing prompt themes since the ghost prints on its own line rather than being spliced into your prompt string. Safe to run more than once; it won't install itself twice.

Prefer to wire it in by hand (e.g. to control exactly where it prints)? Run commitghost shell-init zsh (or bash) to print the raw snippet and paste it into your rc file yourself.

The ghost appears once your staged + unstaged diff exceeds warnLines (default 150), and disappears once you commit.

To remove it:

commitghost uninstall-ghost

Environment variables

| Variable | Purpose | | ------------------------ | -------------------------------------------- | | ANTHROPIC_API_KEY | Required when using the anthropic provider | | OPENAI_API_KEY | Required when using the openai provider | | COMMITGHOST_PROVIDER | Default provider if not set in config | | COMMITGHOST_WARN_LINES | Default ghost threshold if not set in config |

License

MIT