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

cmai

v0.4.0

Published

commits that write themselves

Readme

⚡️ cmai - commits that write themselves

Supports Ollama Supports Anthropic Supports OpenAI Supports Gemini NPM Version Codecov Install Size Build

cmai terminal example

What It Does

cmai analyzes your staged git changes and generates commit messages following your projects existing commit standards. Dynamically creating contextually appropriate messages in multiple languages.

  • ⚡ Provider flexibility – supports OpenAI, Anthropic, and local Llama (via Ollama)
  • 🧐 Smart commit generation – Context-aware messages from staged changes and git history
  • 🏃 Fast workflow – terminal, interactive, clipboard output modes with cross-platform support
  • ⚙️ Rule enforcement – define per-project or global rules to keep commits consistent
  • 📝 Multiple suggestions – generate and regenerate commit options until one fits
  • 🌍 Multi-language support – generate commits in 25+ languages
  • 🗜️ Commitlint compatibility – works seamlessly with existing commitlint setups
  • 🔒 Built-in safety – auto-redacts API keys, tokens, and secrets before sending to AI
  • 📊 Git-aware – branch context, recent commit analysis, and large diff handling

Installation

pnpm add -g cmai
npm install -g cmai
yarn global add cmai

Try Without Installing

You can also run cmai without installing it globally using pnpx (or npx):

pnpx cmai init
npx cmai init

Quick Start Guide

git add .
cmai

Usage Modes

| Mode | Description | | --------- | ----------------------------------------- | | clipboard | Copy to clipboard (default) | | commit | Create a Git commit directly | | terminal | Output a git commit command for editing | | display | Show the messages only |

General Usage

cmai init         # Set up provider and key
cmai settings     # Modify configuration
cmai              # Generate commit messages
cmai --dryrun     # Preview prompts before sending

cmai settings example

Configuration

⚠️ Warning: Settings are stored on a per project basis under .cmai/settings.json. Since this directory contains your private key, please ensure it’s listed in your .gitignore.

{
  "provider": "OLLAMA",
  "maxCommitLength": 72,
  "commitChoicesCount": 8,
  "usageMode": "TERMINAL",
  "redactSensitiveData": true,
  "customRules": [
    "all commit messages must be lowercase"
  ],

Environment Variables

All settings can be overridden with environment variables:

CMAI_PROVIDER=ANTHROPIC
CMAI_MODEL=claude-3-haiku-20240307
CMAI_USAGE_MODE=COMMIT
CMAI_COMMIT_LANGUAGE=es

Development

Prerequisites

  • node >=18.0.0
  • pnpm 10.14.0 (corepack enable to install)
  • SonarScanner (optional): brew install sonar-scanner
  • Docker/OrbStack (optional): for testing GitHub Actions locally

Setup

pnpm install

# Development mode (auto-rebuild on changes)
pnpm dev

Available Commands

Core Development

pnpm dev              # Watch mode with concurrent build & typecheck
pnpm build            # Production build
pnpm test             # Run tests in watch mode
pnpm test:ci          # Run tests once (for CI)
pnpm test:coverage    # Generate coverage report (80% threshold)

Code Quality

pnpm lint             # Check code style
pnpm lint:fix         # Auto-fix style issues
pnpm typecheck        # TypeScript type checking
pnpm knip             # Find unused code/dependencies
pnpm knip:fix         # Remove unused dependencies

Analysis & Debugging

pnpm sonar:local      # SonarCloud (requires project SONAR_TOKEN)
pnpm bundle:stats     # Analyze bundle size
pnpm analyze          # Package content analysis
pnpm act              # Test GitHub Actions locally (needs Docker)

Release Process

pnpm release          # Interactive release with version bump & changelog
pnpm release:dry      # Preview release without publishing

Contributing

Contributions, issues, and feature requests are welcome. If you would like to get involved, please open an issue or submit a pull request to help improve the project.

License

This project is released under the MIT License. Created and maintained by Alex Whinfield.