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 🙏

© 2025 – Pkg Stats / Ryan Hefner

commit-muse

v1.0.3

Published

Transform your Git commit messages into poetic or styled text using Gemini.

Downloads

17

Readme

Commit-Muse

A Git commit-message hook installer that rewrites your commit messages in any style using Google’s Gemini AI.

commit-muse hooks into your project’s Git workflow to automatically “bardify” (rewrite) your commit messages in the style of your choice. Powered by Google’s Gemini API, it transforms raw commit text into a single concise sentence in fun or formal styles—all without leaving your terminal.


Features

  • 📜 Automated rewriting of Git commit messages
  • 🎭 Custom styles: Shakespeare, Haiku, Formal, and more
  • 🔧 Easy installation via npm / npx
  • 🔒 Configurable via environment variables
  • ⚙️ Built‑in installer to place the commit-msg hook

Installation

Install globally:

npm install -g commit-muse

or install per-project as a dev dependency:

npm install --save-dev commit-muse

Then run the installer to register the Git hook:

npx commit-muse

This copies hook.sh into .git/hooks/commit-msg and makes it executable.


Configuration

Before using, set your Gemini API key and optionally choose a style:

| Variable | Default | Description | | ---------------- | ------------- | ----------------------------------------------------- | | GEMINI_API_KEY | (required) | Your Google Gemini API key | | COMMIT_STYLE | Shakespeare | The writing style to apply (e.g., Shakespeare, Haiku) |

You can set these in your shell:

export GEMINI_API_KEY="YOUR_API_KEY_HERE"
export COMMIT_STYLE="Haiku"

To persist these across sessions, add them to ~/.bashrc, ~/.zshrc, or ~/.bash_profile.

set GEMINI_API_KEY=your-api-key-here
set COMMIT_STYLE=Haiku

To make it permanent, use System Environment Variables or setx.

$env:GEMINI_API_KEY="your-api-key-here"
$env:COMMIT_STYLE="Haiku"

Usage

  1. Stage your changes:

    git add .
  2. Commit as usual:

    git commit -m "fix user login validation"

    The hook will automatically run, rewriting your message. To try another style, just set COMMIT_STYLE:

    export COMMIT_STYLE="Pirate"
    git commit -m "add user profile page"
  3. Observe the output:

    Using style: Haiku
    ✅ Commit message bardified!
  4. Push to remote:

    git push

Your AI-enhanced message is now in the commit history.


How It Works

  • Installer (bin/install.js): Copies hook.sh into your repo’s .git/hooks/commit-msg and sets the right permissions.

  • Commit Hook (hook.sh):

    1. Reads your original commit message.
    2. Sends a prompt (including COMMIT_STYLE) and the message to the Gemini API.
    3. Overwrites the commit message file with the AI’s single-sentence rewrite.

Requirements

  • Node.js v12+ (for the installer script)
  • jq CLI (for JSON construction and parsing in hook.sh)
  • A Git repository with a .git folder

Contributing

Contributions, issues, and feature requests are welcome! Fork the repo and send a PR:

  1. Fork and clone
  2. Create a feature branch: git checkout -b feature/new-style
  3. Commit your changes: git commit -m "feat: add whimsical style option"
  4. Push and open a PR

License

MIT © [Your Name]

Made with ❤️ by Sarita