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

@aayush0821/commit-ai

v1.0.0

Published

AI powered Git workflow assistant that generates commits and creates PRs

Downloads

95

Readme

Commit-AI

AI-powered Git workflow assistant that generates intelligent commit messages, manages branches, pushes changes, and creates GitHub Pull Requests — all from your terminal.

alt text

Overview

Commit-AI is a developer productivity CLI tool that automates the repetitive parts of the Git workflow.

Instead of manually:

  • checking your changes
  • writing commit messages
  • creating branches
  • committing code
  • pushing changes
  • opening Pull Requests

Commit-AI turns the entire process into a single command:

commit-ai pr

It analyzes your repository changes, understands your code diff using AI, generates a conventional commit message, prepares a PR description, safely handles branches, pushes your code, and creates a GitHub Pull Request.

Problem

Every Developer has faced this :

git status

git diff

"what should I name this commit?"

git add .

git commit -m "update"

git push

go to GitHub

create PR

write description

The Git workflow is powerful, but repetitive. Commit-AI removes that friction.

Features

AI Commit Message Generation

Commit-AI analyzes your git diff and creates meaningful conventional commits.

Example :

Before :

git commit -m "changes"

After :

feat(auth) : add jwt authentication middleware

Supported Formats :

feat
fix
chore
refactor
docs
test

AI Generated Pull Request

  • feat
  • fix
  • chore
  • refactor
  • docs
  • test

Example :

Title:

feat(auth): add jwt authentication


Body:

## Summary

Added JWT based authentication flow.

## Changes

- Added token validation
- Added middleware
- Updated auth routes

## Risks

- Existing users need migration

Smart Branch Management

Commit-AI understands Git Branches.

  • Use Current Branch
main
  • Switch Existing Branch

Example :

main
develop
feature/payment
feature/dashboard

Commit-AI safely moves your changes.

  • Create new Branch Automatically

Example :

fix/payment-validation
feat/user-authentication
refactor/api-layer

Generated from your changes.

One Command WorkFlow

The complete PR flow :

commit-ai pr

Does :

Analyze repository
        ↓
Read git diff
        ↓
Generate AI commit
        ↓
Generate PR description
        ↓
Select branch
        ↓
Commit changes
        ↓
Push changes
        ↓
Create GitHub PR

Installation

Install globally using npm

npm install -g commit-ai

Verify Installtion :

commit-ai --version

Configuration

Before using commit-AI, initialize your setup.

Run :

commit-ai init

You will configure:

  • GitHub repository access
  • AI API key

Commands

1) commit-ai init

Initialize commit-ai Configuration.

Usage :

commit-ai init

Creates Configuration :

~/.commit-ai/config.json

Stores :

  • Github Token
  • AI Settings
  • Preferences

2) commit-ai status

Analyze Repository State.

Example :

commit-ai status

Output :

Commit-AI Repository Analysis

Branch:
feature/auth

Status:
✔ Working directory clean

Files:
0 modified

3) commit-ai commit

Generate an AI Commit Message.

Example :

commit-ai commit

Flow :

Read diff

AI analyzes changes

Generate message

Confirm

Commit

Example Output :

Generated:

feat(api): add user validation endpoint

Commit?

4) commit-ai pr

The Main Command.

Example :

commit-ai pr

Full WorkFlow

✔ Repository detected

✔ Changes analyzed

✔ Commit generated


Where should PR be created?

1. Current branch
2. Existing branch
3. New branch


✔ Commit created

✔ Code pushed

✔ Pull Request created


GitHub URL:
https://github.com/user/repo/pull/10

Architecture

Commit-AI is built with a modular Architecture.

src

├── ai
│   └── commitAI.ts
│
├── core
│   ├── diffAnalyzer.ts
│   ├── branchGenerator.ts
│   └── statusAnalyzer.ts
│
├── git
│   ├── actions.ts
│   ├── branch.ts
│   ├── diff.ts
│   └── remote.ts
│
├── github
│   ├── parser.ts
│   ├── pullRequest.ts
│   └── prGenerator.ts
│
└── workflow

    ├── prWorkflow.ts
    └── branchManager.ts

Internal WorkFlow

When running :

commit-ai pr

Internally :

1) Repository Detection

Reads :

git remote -v

Extracts :

owner
repository

2) Diff Analysis

Runs :

git diff

Analysis :

  • changed files
  • additions
  • removals
  • modifications

3) AI Processing

The diff is sent to AI.

AI Returns :

commit message

PR Title

PR Description

4) Branch Handling

Commit-AI checks :

current branch

working tree status

available branches

Then safely switches or creates.

5) Git Execution

Runs :

git add .

git commit

git push

6) Github API

Creates :

Pull Request

using Github REST API.

Testing

Commit-AI uses :

  • Vitest
  • Unit Testing

Run Tests :

npm test

Current Coverage :

✓ Commit message validation

✓ Diff analyzer

✓ Branch generator

Tech Stack

Runtime

  • Node.js
  • TypeScript

Git Integration

  • simple-git

CLI

  • commander
  • inquirer
  • chalk
  • ora

AI

  • OpenRouter API

Github

  • Octokit

Testing

  • Vitest

Contributing

Contributions are Welcome.

Steps :

git clone https://github.com/Aayush-0821/commit-ai.git

npm install

npm run build

npm test

Create a Branch :

git checkout -b feature/new-feature

Make Changes.

Create PR :

commit-ai pr

License

MIT License

Author

Built by Aayush Vats