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

@aliklc/smart-commit

v2.4.0

Published

AI-powered Conventional Commits CLI — generates commit messages from git diff (Gemini)

Readme

smart-commit

AI-powered CLI that generates Conventional Commits (emoji + subject + optional bullet body) from your staged git diff using Google Gemini. No more blank or generic commit messages.


Features

| Feature | Description | |--------|-------------| | One-time setup | Paste your Gemini API key when asked; it’s saved to .env in the project. | | No manual .env | First run prompts for the key and creates/updates .env for you. | | Length-aware | Small changes → short message; large changes → subject + bullet list. | | Edit before commit | Open the suggested message in your editor (e.g. Notepad, VS Code), edit, save, then confirm. | | Git integration | Optional git sc / git smart-commit alias so you run it like a Git command. |


Install

| Method | Command | When to use | |--------|---------|-------------| | Global | npm install -g @aliklc/smart-commit | Use smart-commit in any repo. | | No install | npx @aliklc/smart-commit | One-off or CI; no global install. |


Quick start

  1. Stage changes:
    git add . (or specific files)

  2. Run the CLI:
    smart-commit or npx @aliklc/smart-commit

  3. First time only:
    You’ll be asked for a Gemini API key (free). Paste it; the tool saves it to .env and won’t ask again.

  4. Choose an action:

    | Choice | What it does | |--------|----------------| | Yes | Commit with the suggested (or edited) message. | | Edit | Open the message in your editor; save and close to use the edited text. | | Regenerate | Ask AI for a new message (same diff). | | No | Cancel; no commit. |


How it works

flowchart TD
    A[Run smart-commit] --> B[Read staged diff]
    B --> C{Staged files?}
    C -->|No| D[Error: run git add first]
    C -->|Yes| E{API key in .env?}
    E -->|No| F[Prompt for key → save to .env]
    F --> G[Call Gemini with diff]
    E -->|Yes| G
    G --> H[Show suggested message]
    H --> I{Your choice?}
    I -->|Yes| J[git commit -m message]
    I -->|Edit| K[Open in editor]
    K --> H
    I -->|Regenerate| G
    I -->|No| L[Cancel]
  • Input: git diff --staged (only what you staged).
  • AI: Gemini gets the diff + a prompt (Conventional Commits, emoji, length by change size).
  • Output: You get one suggested message; you can accept, edit in your editor, or regenerate.

Use as a Git command (optional)

Use git sc or git smart-commit from any terminal (e.g. Git Bash) after a one-time setup:

| Where | Command | |-------|---------| | Any terminal | npx @aliklc/smart-commit --setup-git-alias | | If installed globally | smart-commit -s or smart-commit --setup-git-alias |

Then in any repo:

git add .
git sc

Editing the message

When you choose Edit:

  • The suggested message is opened in your default editor (e.g. Notepad on Windows if EDITOR is not set).
  • You change the text directly, save, and close the editor.
  • The CLI reads the file and shows the updated message; you can then Yes / Edit / Regenerate / No.

To use VS Code as the editor (optional):

# Windows (cmd)
set EDITOR=code --wait

# Git Bash / Linux / macOS
export EDITOR="code --wait"

Requirements

| Requirement | Details | |-------------|---------| | Node.js | 20+ | | Git | Repo with staged changes (git add before running). | | Gemini API key | Free at Google AI Studio. |


License

ISC