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

gsmart

v0.11.2

Published

CLI to generate smart commit messages using AI.

Readme

The smart way to write your commit messages using AI 🤖

GSmart is a CLI tool that automatically generates Conventional Commits by analyzing your staged git changes. Simply stage your files and let AI craft the perfect commit message for you.

Test codecov NPM Downloads NPM Version NPM License

GSmart Demo

✨ Features

  • 🎯 Smart Commit Messages: AI-generated conventional commits based on your changes
  • 🔄 Multiple AI Providers: Support for OpenAI, Anthropic, Google, Mistral, Fireworks AI, and PlataformIA
  • 📋 Interactive CLI: Easy-to-use command line interface with interactive prompts
  • 🧠 Rename-Aware Staging: Detects renames and copies so both sides get staged automatically
  • 🔒 Secure: API keys stored locally and securely
  • Fast: Quick analysis and generation of commit messages
  • 📖 Conventional Commits: Follows industry-standard commit message format

🚀 Quick Start

Installation

Install GSmart globally using npm or pnpm:

# Using npm
npm install -g gsmart

# Using pnpm
pnpm add -g gsmart

# Using yarn
yarn global add gsmart

Setup

  1. Configure your AI provider (one-time setup):
gsmart login

You'll be prompted to select a provider and enter your API key:

? Select a provider › Use arrow keys to navigate
❯ OpenAI
  Anthropic
  Google Gemini
  Mistral
  Fireworks AI
  PlataformIA
  1. Generate commit messages:
# Stage your changes
git add .

# Generate and apply commit message
gsmart

That's it! GSmart will analyze your staged changes and generate a conventional commit message.

💡 Usage Examples

Basic Usage

# Stage some files
git add src/components/Button.tsx

# Generate commit message
gsmart
# Output: "feat(components): add Button component with primary and secondary variants"

Advanced Options

# Use a specific provider
gsmart --provider anthropic

# Use a custom prompt
gsmart --prompt "Focus on the security implications of these changes"

# Run non-interactively (auto-stage + commit if possible)
gsmart --yes

# Show help
gsmart --help

When --yes is set, GSmart stages all detected changes—including renames—and skips interactive prompts so you can automate message generation.

📋 Command Reference

Usage: gsmart [options] [command]

CLI to generate smart commit messages using AI. generate command is the default command.

Options:
  -V, --version                    Output the version number
  -h, --help                       Display help for command

Commands:
  generate [options]               Generate a commit message based on staged changes (default)
    --provider <provider>          Use a specific AI provider
    --prompt <prompt>              Custom prompt for the AI model
    --yes                         Run non-interactively (auto stage + commit)

  login                           Configure AI provider and API key
  reset                           Reset all API keys and configuration
  help [command]                  Display help for command

🤖 Supported AI Providers

| Provider | Model | Get API Key | | ---------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------ | | OpenAI | GPT-5 Codex | Get Key | | Anthropic | Claude | Get Key | | Google | Gemini 2.0 Flash | Get Key | | Mistral | Mistral Large | Get Key | | Fireworks AI | FireFunction V1 | Get Key | | PlataformIA | Radiance | Get Key |

🛠️ Development

Requirements

  • Node.js 20+ with ESM support
  • pnpm (recommended) or npm

Scripts

# Install dependencies
pnpm install

# Development mode
pnpm run dev

# Build the project
pnpm run build

# Run tests
pnpm test

# Lint code
pnpm run lint

# Format code
pnpm run format

Project Structure

src/
├── commands/          # CLI command implementations
├── utils/
│   ├── ai.ts         # AI provider integrations
│   ├── git.ts        # Git operations
│   └── config.ts     # Configuration management
├── gsmart.ts         # Command registration
└── index.ts          # CLI entry point

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using GSmart! (gsmart)
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 Changelog

See CHANGELOG.md for details about releases and changes.

📝 License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.