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

commic

v1.0.2

Published

AI-powered Git commit message generator with Conventional Commits support

Readme

Commic ✨

AI-powered Git commit message generator that creates beautiful, Conventional Commits compliant messages using Google's Gemini API.

Features

🤖 AI-Powered: Leverages Google Gemini to analyze your changes and generate contextual commit messages
📝 Conventional Commits: All messages follow the Conventional Commits specification
🎨 Beautiful UI: Colorful, emoji-enhanced terminal interface
Fast & Easy: Interactive selection from 3-5 AI-generated suggestions
🔧 Flexible: Works with any Git repository, supports custom paths

Installation

Global Installation

npm install -g commic

Local Development

git clone <repository-url>
cd commic
npm install
npm link

First-Time Setup

On your first run, Commic will guide you through a quick setup:

  1. API Key: You'll be prompted to enter your Google Gemini API key
  2. Model Selection: Choose your preferred Gemini model
    • Currently supports: Gemini 3 Flash Preview

Your configuration is saved to ~/.commic/config.json for future use.

Usage

Basic Usage

Run in your current Git repository:

commic .

Specify a Repository Path

Commit to a different repository:

# Relative path
commic ../other-repo/

# Absolute path
commic /path/to/repository/

Reconfigure

Update your API key or model preference:

commic --reconfigure

How It Works

  1. 🔍 Analyzes your Git changes (staged and unstaged)
  2. 🤖 Generates 5 commit message suggestions using AI
  3. 🎯 Validates all messages against Conventional Commits spec
  4. Presents an interactive menu for selection
  5. 🚀 Commits automatically with your chosen message

Conventional Commits Format

All generated messages follow this format:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks
  • perf: Performance improvements
  • ci: CI/CD changes
  • build: Build system changes

Examples

feat(auth): add JWT authentication

fix: resolve memory leak in event handler

docs: update installation instructions

refactor(api)!: restructure endpoint handlers

BREAKING CHANGE: API endpoints now require authentication

Troubleshooting

"No Git repository found"

Make sure you're running the command in a Git repository or providing a valid path to one.

git init  # Initialize a new repository if needed

"Repository has no commits"

Create an initial commit first:

git add .
git commit -m "Initial commit"

"API key invalid"

Reconfigure with a valid API key:

commic --reconfigure

"No changes to commit"

Make some changes to your files first, or check if everything is already committed:

git status

Configuration

Configuration is stored at ~/.commic/config.json:

{
  "apiKey": "your-api-key",
  "model": "gemini-3-flash-preview",
  "version": "1.0.0"
}

Requirements

  • Node.js >= 18.0.0
  • Git installed and configured
  • Google Gemini API key

Contributing

We welcome contributions from the open-source community! This guide will help you get started.

Development Setup

  1. Fork and clone the repository

    git clone https://github.com/your-username/commic.git
    cd commic
  2. Install dependencies and set up Git hooks

    npm install

    Note: npm install automatically runs the prepare script which sets up Git hooks via Husky. If Git hooks don't work after installation, manually run npm run prepare to set them up.

  3. Link the package locally for testing

    npm link

Code Quality & Linting

This project uses Biome for linting and formatting to ensure consistent code quality.

Automatic Linting on Commit

We use Husky to automatically run linting and auto-fix issues before each commit. This ensures all code follows our standards:

  • Pre-commit hook: Automatically runs biome check --write --unsafe before every commit
  • Auto-fix: Automatically fixes linting issues that can be auto-fixed
  • Commit blocked: If there are unfixable errors, the commit will be blocked

Setup: Git hooks are automatically set up when you run npm install (via the prepare script). If hooks don't work, run npm run prepare manually.

You don't need to do anything special - just commit as normal, and the hook will handle the rest!

Manual Linting Commands

You can also run linting manually:

# Check for linting issues
npm run lint

# Auto-fix linting issues
npm run lint:fix

# Format code only
npm run format

Linting Rules

Our Biome configuration enforces:

  • Code formatting: Consistent indentation, spacing, and line breaks
  • Import organization: Automatic import sorting
  • Unused code detection: Flags unused variables and imports
  • Best practices: Enforces const usage, template literals, and more
  • ⚠️ TypeScript: Warns on explicit any types

Making Changes

  1. Create a feature branch

    git checkout -b feat/your-feature-name
    # or
    git checkout -b fix/your-bug-fix
  2. Make your changes

    • Write clean, readable code
    • Follow existing code patterns
    • Add comments for complex logic
  3. Test your changes

    npm run build
    npm run link  # Test locally
  4. Commit your changes

    commic .

    The pre-commit hook will automatically:

    • Format your code
    • Fix linting issues
    • Organize imports

    If there are errors that can't be auto-fixed, fix them manually and try again.

  5. Push and create a Pull Request

    git push origin feat/your-feature-name

Commit Message Guidelines

We follow Conventional Commits specification:

  • feat: - New features
  • fix: - Bug fixes
  • docs: - Documentation changes
  • style: - Code style changes (formatting, etc.)
  • refactor: - Code refactoring
  • test: - Adding or updating tests
  • chore: - Maintenance tasks
  • ci: - CI/CD changes
  • build: - Build system changes

Pull Request Process

  1. Ensure your code passes all linting checks (handled automatically)
  2. Update documentation if needed
  3. Write clear commit messages
  4. Reference any related issues in your PR description
  5. Wait for code review and address feedback

Questions?

If you have questions or need help, feel free to:

  • Open an issue for discussion
  • Check existing issues and PRs
  • Review the codebase to understand patterns

Thank you for contributing! 🎉

License

MIT