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

gemit-cli

v2.3.0

Published

CLI para sugerir commit/branch com IA, com config global e fluxo opcional de push

Readme

gemit-cli

gemit logo

AI-powered Git workflow automation from your terminal

npm version npm downloads License

WebsiteNPM StatsDiscord Community

Overview

Gemit is a Node.js CLI that leverages AI to streamline your Git workflow. It generates conventional commit messages, branch names, PR descriptions, code reviews, changelogs, and more — with confirmation before executing any Git command.

Key Features

  • AI-Powered Suggestions - Generate commit messages, branch names, and PR descriptions
  • Code Review - Get AI feedback on staged changes before committing
  • Smart Pull - Pull current branch and get an AI breakdown of new routes, DTOs, and breaking changes
  • Conventional Commits - Automatic conventional commit format with type detection
  • Smart Branching - Create semantic branches in <type>/<kebab-case> format
  • Changelog Generation - Automatic changelog creation from commit history
  • Workflow Automation - 4-step commit flow with lint/test integration
  • Multi-Language - Support for English and Portuguese (pt-br)
  • Auto-Updates - Periodic version checks with automatic updates
  • Customizable Prompts - Override AI instructions globally without touching projects
  • Multiple AI Providers - Support for Google (Gemini), OpenAI (GPT), and Anthropic (Claude)

Table of Contents



Prerequisites

Installation

Global Installation (Recommended)

npm install -g gemit-cli

Works on Windows, Linux, and macOS.

Verify Installation

gemit --version
gemit doctor

Quick Start

1. Initialize Configuration

gemit init

This interactive wizard will prompt you to:

  • Select AI provider (google, openai, or anthropic)
  • Choose model
  • Enter API key
  • Set language preference (en or pt-br)

2. Make Your First AI-Powered Commit

# Stage your changes
git add .

# Get AI-suggested commit message
gemit

# Or use the full flow with automatic staging
gemit commit --all

3. Create a Semantic Branch

gemit branch "add user authentication feature"
# Suggests: feat/add-user-authentication-feature

Configuration

Configuration File Location

gemit stores configuration globally in a .env file:

  • Windows: %APPDATA%\gemit\.env
  • macOS: ~/Library/Application Support/gemit/.env
  • Linux: ~/.config/gemit/.env

Supported Environment Variables

# Provider Configuration
LLM_PROVIDER="google"              # google, openai, or anthropic
LLM_MODEL="gemini-2.5-flash"       # Model name
GEMIT_LANGUAGE="en"                # en or pt-br

# API Keys (set only the one for your provider)
GOOGLE_API_KEY="your-key-here"
GEMINI_API_KEY="your-key-here"     # Alternative to GOOGLE_API_KEY
OPENAI_API_KEY="your-key-here"
ANTHROPIC_API_KEY="your-key-here"

Default Models by Provider

| Provider | Default Model | |----------|--------------| | google | gemini-2.5-flash | | openai | gpt-4o-mini | | anthropic | claude-3-5-sonnet-latest |

Update Configuration

# Update a single value without re-running init
gemit config --set LLM_MODEL=gpt-4o
gemit config --set GEMIT_LANGUAGE=pt-br

# List all current settings
gemit config --list

Commands Reference

Core Commands

gemit (Default)

Suggest commit message using currently staged files.

gemit

gemit commit [options]

Full commit workflow: stage → summary → AI suggestion → confirmation → commit → push prompt.

Options:

  • --all - Run git add . before the flow
  • --check - Run lint and test scripts before committing
  • --amend - Rewrite the last commit message with AI
  • --dry-run - Preview suggested message without committing

Examples:

gemit commit --all          # Stage all + commit flow
gemit commit --check        # With lint/test validation
gemit commit --amend        # Rewrite last commit
gemit commit --dry-run      # Preview only

gemit branch <description>

Generate semantic branch name and optionally create it.

gemit branch "implement user authentication"
# Suggests: feat/implement-user-authentication

gemit branch "fix login bug with OAuth"
# Suggests: fix/login-bug-with-oauth

Branch Types: feat, fix, chore, docs, refactor, test

gemit pr

Generate PR title and markdown description from branch commits.

gemit pr

Output includes:

  • Conventional commit-style title
  • Detailed description of changes
  • List of commits included

gemit log

Summarize all work done in the current branch.

gemit log

gemit changelog [name]

Generate changelog file in changelogs/<name>-YYYY-MM-DD.md.

Options:

  • -c, --commits <number> - Number of recent commits to include (default: 20, max: 200)
gemit changelog              # Default: 20 commits
gemit changelog v2.0.0 -c 50 # Custom name, 50 commits

New Commands

gemit pull

Pull the current branch and get an AI breakdown of what changed.

gemit pull

What it does:

  1. Detects current branch and remote automatically
  2. Runs git pull <remote> <branch> with live output
  3. Compares HEAD before/after — if already up to date, exits cleanly
  4. Sends the full diff to AI for analysis

AI output sections:

  • Summary — 2-3 sentence overview of what changed
  • New / Changed Endpoints — HTTP method, path, headers, request body, response shape
  • Breaking Changes — renamed fields, removed routes, changed required params, migrations
  • Other Changes — env vars, config, dependencies

Supported backend frameworks: Express, NestJS, FastAPI, Flask, Spring Boot, Laravel, Rails, Hono, Elysia, Fastify, and more.

# Example output for a backend update
# [POST] /api/v2/users
#   Headers: Authorization: Bearer <token>
#   Body: { "name": "string", "email": "string", "role": "admin|user" }
#   Response: { "id": "uuid", "createdAt": "ISO date" }

gemit undo

Soft-reset the last commit, keeping files staged.

gemit undo

gemit review

AI code review of staged changes before committing.

git add .
gemit review

Review Levels:

  • [CRITICAL] - Must fix before committing
  • [WARNING] - Should review
  • [INFO] - Suggestions for improvement
  • [OK] - Looks good

gemit stash

Create stash with AI-generated descriptive message.

gemit stash
# Generates message based on working tree changes
# Runs: git stash push -u -m "<AI-generated-message>"

gemit release <version>

Complete release workflow: version bump → changelog → commit → tag.

gemit release 1.2.0

What it does:

  1. Updates package.json version
  2. Generates changelog with AI
  3. Commits as chore(release): v1.2.0
  4. Creates annotated git tag

gemit ignore <description>

Generate .gitignore entries based on project description.

gemit ignore "node project with typescript and jest"
gemit ignore "python project with django"

Automatically:

  • Skips duplicate entries
  • Appends to existing .gitignore
  • Creates file if it doesn't exist

gemit squash <count>

Squash last N commits with unified AI-generated message.

gemit squash 3
# Squashes last 3 commits
# AI generates single conventional commit message

Utility Commands

gemit add [options]

Stage changes and enter commit flow.

Note: Requires --all flag in practice.

gemit add --all         # git add . + commit flow
gemit add --all --check # With lint/test

gemit doctor

Validate configuration and report issues.

gemit doctor

Checks:

  • Provider and model configuration
  • API key presence
  • Language setting
  • Git repository status

gemit update

Force version check and install latest release.

gemit update

gemit prompts

Manage AI prompt templates.

gemit prompts                    # List status of all prompts
gemit prompts --init            # Export defaults to config folder
gemit prompts --edit commit     # Edit commit prompt
gemit prompts --show branch     # Display built-in template

gemit config

Manage configuration values.

gemit config --set KEY=value    # Update single value
gemit config --list             # Show all settings

Global Options

gemit -v, --version    # Show version
gemit -h, --help       # Show help
gemit help <command>   # Command-specific help

Advanced Usage

4-Step Commit Flow

When using gemit commit --all, you get a comprehensive workflow:

  1. Stage - Automatically runs git add .
  2. Summary - Shows what files changed
  3. AI Suggestion - Generates conventional commit message
  4. Confirmation - Review and confirm/edit before committing
  5. Push Prompt - Asks if you want to push changes

Lint and Test Integration

The --check flag integrates with your project's scripts:

gemit commit --check

Runs (if present):

  1. npm run lint --if-present
  2. npm run test --if-present

In package.json:

{
  "scripts": {
    "lint": "eslint .",
    "test": "jest"
  }
}

If scripts don't exist, they're safely skipped due to --if-present flag.

Prompt Customization

gemit works out of the box with built-in prompts. Customize only if you need specific AI behavior.

How It Works

  1. No setup needed - Built-in defaults always active
  2. Override globally - Customize at OS config level (not per-project)
  3. Revert anytime - Delete custom file to restore default

Customizable Prompts

| Prompt | Template Variables | |--------|-------------------| | commit.txt | {{detected_type}}, {{staged_files}}, {{summary}}, {{diff_stat}}, {{patch}} | | branch.txt | {{description}} | | pr.txt | {{branch_data}} | | changelog.txt | {{commit_limit}}, {{commit_history}} | | log.txt | {{branch_context}} |

Custom Prompt Location

  • Windows: %APPDATA%\gemit\prompts\
  • macOS: ~/Library/Application Support/gemit/prompts/
  • Linux: ~/.config/gemit/prompts/

Managing Prompts

# List all prompts and their status
gemit prompts

# Export all defaults to config folder
gemit prompts --init

# Edit specific prompt in default editor
gemit prompts --edit commit

# View built-in template
gemit prompts --show branch

Troubleshooting

Common Issues

"Not in a Git repository"

Solution: Ensure you're inside a Git-initialized directory:

git init

"API key not configured"

Solution: Run initialization or set key manually:

gemit init
# or
gemit config --set GOOGLE_API_KEY=your-key-here

"No staged changes"

Solution: Stage files before running gemit:

git add .
gemit
# or
gemit commit --all  # Auto-stages everything

Auto-update fails

Solution: Update manually:

npm install -g gemit-cli@latest
# or
gemit update

Debugging

Enable verbose output:

DEBUG=* gemit commit

Check configuration:

gemit doctor
gemit config --list

Contributing

Contributions are welcome! Here's how you can help:

Reporting Issues

  • Use GitHub Issues
  • Include gemit version (gemit -v)
  • Describe steps to reproduce
  • Share relevant configuration (without API keys)

Development Setup

# Clone repository
git clone https://github.com/erickn-dev/gemit.git
cd gemit

# Install dependencies
npm install

# Link for local testing
npm link

# Test changes
gemit doctor

Pull Requests

  1. Fork the repository
  2. Create feature branch: gemit branch "your feature"
  3. Make changes with conventional commits: gemit commit --all
  4. Push and create PR: gemit pr (for PR text inspiration)

Community

Join the Discussion

Share improvements, ask questions, and follow updates:

Showcase

Using gemit in your project? Share your experience and get featured!

License

Check License


Acknowledgments

Built with ❤️ by Erick Novaes

AI Providers:


⬆ Back to Top

Made with Node.js • Powered by AI • Open Source