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-aic

v1.1.0

Published

AI-powered Git commit generator using Google Gemini

Downloads

209

Readme

Git Aic

git-aic is a command-line interface (CLI) tool built in TypeScript that upgrades your Git workflow by automatically generating high-quality, conventional commit messages.

Powered by Google Gemini, it analyzes your staged code changes and produces concise, descriptive, and standard-compliant commit messages, helping you maintain a clean and consistent Git history.

You define the rules.
You customize the system prompt.
You decide when it runs.

Your workflow. Your control.

Features

  • AI-Powered Message Generation
    Uses Google Gemini API to generate commit messages from your Git diff.

  • Self-Hosted & On-Demand
    Runs locally in your terminal. No background processes. No editor lock-in.

  • Full Control Over Rules
    Modify the system prompt to enforce your own commit conventions and formatting style.

  • Conventional Commits Compliance
    Strictly follows formats like feat:, fix:, refactor:, chore:.

  • Commit Confirmation & Editing
    Before committing, you can:

    • Accept the suggested commit message
    • Edit the message
    • Reject it
    • Retry generation
  • Issue Linking
    Attach commits to GitHub issues with --issue <number>.

  • Optional Push After Commit
    Use -p or --push to push after committing.

  • Config Management
    Set your Gemini API key or view your config:

    • git aic config --key <key>
    • git aic config
  • TypeScript & Type Safety
    Built with TypeScript for maintainability and reliability.

  • Seamless Git Integration
    Directly integrates with Git using a CLI.

Why Not Just Use Copilot?

Many AI commit tools:

  • Depend on editor integrations
  • Limit customization
  • Enforce their defaults
  • Restrict usage
  • Run continuously in the background

This tool is different.

It runs only when you call it.
It follows your prompt rules.
It generates commits exactly how you define them.
It stays out of your way.

There are no forced conventions.
No hidden behavior.
No unnecessary background processes.

If needed, you can rotate API keys later. You stay in control.

This is controlled automation — not passive AI assistance.

User Installation

To install git-aic globally via npm:

npm i -g git-aic
git aic --help

Developer Installation (For Contributors)

1. Clone the Repository

git clone https://github.com/Spectra010s/git-aic.git
cd git-aic

2. Install Dependencies

npm install

3. Build the Project

npm run build

Configuration

Set API Key (Primary)

Use the CLI config command to save your Google Gemini API key:

git aic config --key <your_api_key>

To view your current config:

git aic config

"*Note:** it's masked by default for security reasons

To view the whole current config api key

git aic config --show

Environment Variable (Fallback)

If you prefer not to use the config system, you can set it manually in your environment:

  • macOS / Linux:
export GEMINI_COMMIT_MESSAGE_API_KEY=your_api_key_here
  • Windows (PowerShell):
setx GEMINI_COMMIT_MESSAGE_API_KEY "your_api_key_here"

After setting the variable, restart your terminal.

Note: This method works, but using the CLI config is safer and easier for long-term usage.

Usage

Commit With AI Assistance

git aic
  • Prompts you with a generated commit message.
  • You can accept, edit, reject, or retry the message.

Commit and Link to Issue

git aic --issue 123
  • Attaches the commit to GitHub issue #123.

Commit and Push

git aic -p
  • Pushes automatically after committing.

Configure API Key

git aic config --key <key>
  • Saves your Google Gemini API key.
git aic config
  • Displays your saved config.

That’s it.

No need to manually write commit messages anymore.

How It Works

  1. Captures your staged Git diff
  2. Builds a strict system prompt
  3. Sends the diff to Gemini
  4. Enforces Conventional Commit formatting
  5. Prompts for commit confirmation (accept, edit, retry, reject)
  6. Executes git commit automatically
  7. Optionally pushes if -p flag is used

You can modify commit behavior by editing:

src/prompt.ts

Technologies Used

| Technology | Purpose | | ----------------- | ---------------------- | | TypeScript | Core language | | Node.js | Runtime | | Axios | HTTP client | | Chalk | Styled terminal output | | Commander.js | CLI framework | | Simple-Git | Git integration | | Google Gemini API | LLM text generation |

Final Takeaway

Automating repetitive tasks like commit messages saves time — but the real win here is ownership.

git-aic:

  • Self-hosted — runs entirely on your machine
  • On-demand — only runs when you call it
  • Fully customizable — prompts, commit format, workflow
  • Under your control — you decide every step

It runs when you need it, follows your rules, and generates commits the way you want.

Choose your model. Define your prompt. Control the format. Extend or optimize anytime.

Instead of adapting to someone else's defaults, you built a system tailored to your workflow.

You are not just using AI tools.
You are building them to fit your process.

License

ISC License

Author

Spectra010s

Parent Repository

This project is a fork and standalone version of:

https://github.com/samueltuoyo15/Commit-Message-Tool


License TypeScript Node.js