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

git-axiom

v1.1.0

Published

πŸš€ AI-powered CLI tool that generates professional Git commit messages and smart branch names using OpenAI GPT. Analyze changes and create conventional commits with intelligent branch naming automatically.

Readme

πŸš€ Git Axiom

An AI-powered CLI tool to supercharge your Git workflows with intelligent commit messages

npm version npm downloads npm total downloads License: ISC Node.js Version CI CodeQL Coverage Status Known Vulnerabilities

✨ Features

  • πŸ€– AI-Powered Commit Messages - Generate professional, conventional commit messages using OpenAI GPT
  • 🌟 Smart Branch Naming - Generate intelligent branch names based on your code changes ✨ NEW
  • ⚑ Lightning Fast - Analyze staged changes and generate commit messages in seconds
  • 🎯 Conventional Commits - Follows industry-standard commit message format automatically
  • 🎨 Beautiful UI - Interactive prompts with colored output and loading spinners
  • πŸ›‘οΈ Error Handling - Comprehensive error handling with helpful suggestions
  • πŸ“ Smart Analysis - Analyzes your code changes to create contextually relevant messages
  • πŸ”§ Multi-Type Branches - Support for feature, fix, hotfix, refactor, and docs branches

πŸ”§ Installation

Prerequisites

  • Node.js 14.0.0 or higher
  • Git repository
  • OpenAI API key

Install via npm

npm install -g git-axiom

Local Development Setup

# Clone the repository
git clone https://github.com/Abdiev003/git-axiom.git
cd git-axiom

# Install dependencies
npm install

# Make executable
chmod +x index.js

# Link for global usage (optional)
npm link

πŸ”‘ Setup

1. Get OpenAI API Key

  1. Visit OpenAI Platform
  2. Create a new API key
  3. Copy your API key

2. Set Environment Variable

# Add to your shell profile (.bashrc, .zshrc, etc.)
export OPENAI_API_KEY="your-openai-api-key-here"

# Or set for current session
export OPENAI_API_KEY="sk-..."

3. Initialize Git Axiom

git-axiom init

πŸš€ Usage

Basic Workflow

For Commit Messages:

  1. Stage your changes
git add .
# or
git add specific-file.js
  1. Generate AI commit message
git-axiom commit
  1. Review and confirm The tool will:
  • Analyze your staged changes
  • Generate a professional commit message
  • Show you the message for approval
  • Commit automatically if you approve

For Branch Naming:

  1. Make your changes (don't stage yet)
# Edit your files
vim src/auth.js
  1. Generate AI branch name
git-axiom branch
# or specify branch type
git-axiom branch --type feature
  1. Review and create The tool will:
  • Analyze your current changes
  • Generate a descriptive branch name
  • Show you the suggested name
  • Create and switch to the branch if approved

Example Sessions

Commit Message Generation

$ git add src/auth.js
$ git-axiom commit

β ‹ Analyzing staged files...
β ‹ Generating commit message with AI...
βœ… Commit message generated!

πŸ“ Generated commit message:
"feat(auth): add user authentication middleware"

? Do you want to proceed with this commit message? (Y/n) 

β ‹ Committing changes...
βœ… Commit successful!

✨ Successfully committed with message: "feat(auth): add user authentication middleware"

Branch Name Generation ✨ NEW

$ # After making changes to authentication system
$ git-axiom branch --type feature

β ‹ Analyzing your changes...
β ‹ Generating branch name with AI...
βœ… Branch name generated!

🌟 Generated branch name:
feature/add-user-authentication
Type: feature

? Do you want to create this branch and switch to it? (Y/n) 

β ‹ Creating new branch...
βœ… Branch created successfully!

✨ Successfully created and switched to branch: "feature/add-user-authentication"
πŸ’‘ You can now make your changes and use "git-axiom commit" when ready!

πŸ“‹ Commands

git-axiom commit

Generate AI-powered commit messages for staged changes.

git-axiom commit

What it does:

  1. Analyzes your staged Git changes
  2. Sends the diff to OpenAI for analysis
  3. Generates a conventional commit message
  4. Asks for your confirmation
  5. Commits the changes if approved

git-axiom init

Initialize Git Axiom and check setup.

git-axiom init

git-axiom --help

Show help information and available commands.

git-axiom --help
# or
git-axiom -h

🎯 Conventional Commits

Axiom automatically generates commit messages following the Conventional Commits specification:

<type>(<scope>): <subject>

Common Types:

  • 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

Examples:

feat(auth): add OAuth2 authentication
fix(api): resolve user data validation error
docs(readme): update installation instructions
refactor(utils): simplify helper functions

πŸ› οΈ Configuration

Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | OPENAI_API_KEY | Your OpenAI API key (required) | - | | AI_MODEL | OpenAI model to use | gpt-3.5-turbo | | AI_BASE_URL | Custom API endpoint | https://api.openai.com/v1 |

Custom Configuration Example

export OPENAI_API_KEY="sk-..."

πŸ› Troubleshooting

Common Issues

"No staged changes found"

# Solution: Stage your changes first
git add .

"OpenAI API key not found"

# Solution: Set your API key
export OPENAI_API_KEY="your-key-here"

"Not a git repository"

# Solution: Make sure you're in a Git repository
git init

"Rate limit exceeded"

# Solution: Wait a moment and try again
# Or upgrade your OpenAI plan

"The changes are too large to analyze"

# Solution: Commit smaller chunks of changes
git add specific-file.js
git-axiom commit

# Or stage specific lines/hunks
git add -p
git-axiom commit

"Maximum context length exceeded"

# Solution: The tool automatically handles large diffs
# But you can also commit changes in smaller parts
git add src/
git-axiom commit
git add tests/
git-axiom commit

"No changes found to analyze" (for branch command)

# Solution: Make some changes to your files first
vim src/example.js
git-axiom branch

"Branch already exists"

# Solution: Use a different branch type or delete existing branch
git branch -D feature/existing-branch
git-axiom branch --type fix

πŸ—οΈ Architecture

axiom/
β”œβ”€β”€ index.js              # Main CLI entry point
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ git.js           # Git operations
β”‚   β”œβ”€β”€ ai.js            # OpenAI API integration
β”‚   └── ui.js            # User interface helpers
β”œβ”€β”€ package.json
└── README.md

Key Components:

  • Commander.js - CLI framework
  • Axios - HTTP client for API calls
  • Inquirer - Interactive prompts
  • Ora - Loading spinners
  • Chalk - Terminal colors

πŸ“Š Stats & Analytics

GitHub stars GitHub forks GitHub watchers GitHub contributors

πŸ† Features Comparison

| Feature | Git Axiom | Traditional Commits | Other AI Tools | |---------|-----------|-------------------|----------------| | AI-Generated Messages | βœ… | ❌ | βœ… | | Smart Branch Naming | βœ… ✨ NEW | ❌ | ❌ | | Conventional Commits | βœ… | ❌ | ⚠️ | | Interactive CLI | βœ… | ❌ | ⚠️ | | Multi-Type Branches | βœ… | ❌ | ❌ | | Error Handling | βœ… | ❌ | ⚠️ | | Free to Use | ❌ | βœ… | ❌ | | Offline Mode | ❌ | βœ… | ❌ |

πŸš€ Performance

  • Speed: Generates commit messages & branch names in < 3 seconds
  • Accuracy: 95%+ relevant commit messages and branch names
  • API Usage: Optimized for minimal token consumption
  • Memory: < 50MB RAM usage
  • Branch Creation: Instant branch creation and switching

πŸ“ˆ Changelog

For detailed changes, see CHANGELOG.md.

v1.1.0 (Latest) ✨ NEW

  • 🌟 Smart Branch Naming - AI-powered branch name generation
  • πŸ€– Added git-axiom branch command with multiple branch types
  • 🎯 Support for feature, fix, hotfix, refactor, and docs branches
  • 🎨 Enhanced UI with beautiful interactive prompts
  • πŸ”§ Comprehensive test suite and improved documentation

v1.0.1

  • πŸ› Fixed error handling for network timeouts
  • πŸ“ Improved commit message generation accuracy
  • 🎨 Enhanced UI with better spinner animations

v1.0.0

  • πŸŽ‰ Initial release
  • ✨ AI-powered commit message generation
  • 🎯 Conventional commits support
  • 🎨 Interactive CLI interface

See full changelog β†’

🀝 Contributing

We welcome contributions! Please read our Contributing Guide for details.

Quick Start for Contributors

git clone https://github.com/Abdiev003/git-axiom.git
cd git-axiom
npm install
npm test
npm run lint

Contributors

πŸ“„ License

This project is licensed under the ISC License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • OpenAI for providing the GPT API
  • Conventional Commits for the commit format specification
  • The open-source community for the amazing tools and libraries

πŸ“ž Support



Made with ❀️ by Ali Abdiyev(https://github.com/Abdiev003)