v 1.2.3 IS OUT NOWNETWORK REQUIRED

AI-Powered Conventional Commits

Stop wasting brain power on commit messages. Generate semantic, high-quality conventional commits and markdown diff reports directly from your terminal.

View on GitHub
git-aic — commit flow
➜git aic
? Select files to include in commit:
● src/index.ts
○ package.json
○ README.md
Analyzing diff with Gemini Pro...
feat: integrate @clack/prompts for interactive file selection
- Updated src/index.ts
- Added file selector logic

Engineered for Velocity

Eliminate Block

Never struggle to describe your changes again. Let AI generate professional commit messages instantly.

Standardize

Automatically enforced Conventional Commits format ensures a clean, readable project history.

Code Reviews

Generate "Diff Reports" that explain what changed and why it matters, before showing the raw code.

Safe by Default

Review every message before it lands, keep secrets out of commits, and get your staging area back if anything stops.

WORKFLOW 01

The Intelligence
Commit Flow

Experience the future of development. Selective staging, deep analysis, and instant perfection.

  • Interactive file selection, from any folder in the repo
  • Deep code analysis via Google Gemini
  • Strict Conventional Commits formatting
  • Review, edit, or regenerate before committing
  • Secrets and build folders caught before they are committed
  • One-step push with --push, including sign-in for private repos
TERM latest
➜git aic
? Select files to commit:
● src/engine.ts
○ package.json
Gemini Analysis:
feat(engine/main): optimize prompt structure
? Use this commit message?
● Commit
○ Edit · ○ Regenerate · ○ Cancel
➜git aic --pushPUSHED
feat-auth-flow.md
➜git aic --diff
Generated: git-diffs/feat-auth-flow.md

# AI Diff Report

Implemented a robust JWT-based authentication system with secure token storage.

Metadata: branch[master] hash[a7f3d...] time[2026-03-22 12:45]
Workflow 02

Markdown
Diff Reports

Capture your entire thought process in a structured document. Perfect for documentation, PR descriptions, and code reviews.

Non-Destructive

Analyze your changes without affecting your git stage or history.

AI Insight

Get concise, human-readable summaries for every modified file.

Built with high-performance tools

BUNBUN
NODE.JSNODE.JS
TYPESCRIPTTYPESCRIPT
GEMINI PROGEMINI PRO

Get Your Gemini API Key

Git AIC uses Google Gemini for commit generation and diff explanations, so you will need a Gemini API key before setup.

Prerequisite

Grab the key once, then continue into installation.

The fastest path is Google AI Studio. Create the key there, copy it, and then use the install instructions below to save it in Git AIC.

Open Google AI Studio

Keep it private

Treat your Gemini API key like a password. Do not commit it to Git or expose it in client-side code.

Some users may need to create, import, or select a Google Cloud project in AI Studio before creating a key.

1

Step 1

Open AI Studio

Head to Google AI Studio to manage Gemini access and create API keys.

ai.google.dev/aistudio
2

Step 2

Sign In to Google

Sign in, accept the current terms if prompted, then open the API key flow from AI Studio.

Google account required
3

Step 3

Create or Reuse a Key

Generate a Gemini API key, or use the default project and key AI Studio may create for new users.

Some users may need to select or import a Cloud project
4

Step 4

Copy It Into Git AIC

Run git-aic set-key and paste the key when asked, or just run git aic: it asks for the key the first time. Keep it private.

git-aic set-key

Get Started in seconds

Path A: Global Install

NPM PACKAGE

1

Install:

npm install -g @amnesia2k/git-aic
2

Config Key:

git-aic set-key
3

Set Alias:

git-aic alias
4

Run Now:

$ git aic
Requires active internet connection

Path B: Local Clone

DEVELOPMENT

1

Clone & Install:

git clone https://github.com/amnesia2k/git-aic.git && bun install
2

Environment:

export GEMINI_COMMIT_MESSAGE_API_KEY=your_key
3

Manual Alias:

git config --global alias.aic '!npx tsx "/path/to/cli.ts"'
4

Run Now:

$ git aic
Requires active internet connection
REFERENCE

Every command, one place

Options combine freely. git aic and git-aic are the same program once the alias is set up.

git aic

Pick files, let Gemini write the message, review it, and commit.

Review: Commit · Edit in your editor · Regenerate · Cancel

-p, --push

Push after committing.

Sets up origin, the upstream and sign-in when needed. With nothing new, pushes your unpushed commits.

-d, --diff

Write an AI-explained markdown report to git-diffs/ instead of committing.

Never stages or unstages anything.

-a, --all

Use every changed file and skip the file selector.

-y, --yes

Skip confirmations.

Commits without review, sets the upstream, pulls before pushing, and leaves out secret-looking files and un-ignored build folders.

--dry-run

Print the generated message without committing.

Your staging area is restored.

-v, --version

Print the installed version.

-V and -version also work.

-h, --help

Print help.

Use git aic -h or git aic help: Git reserves git aic --help for its manual pages.

git-aic set-key [key]

Save your Gemini API key.

Leave out the key to be prompted, which keeps it out of your shell history.

git-aic set-model <model>

Use another Gemini model, e.g. gemini-2.5-pro.

"default" goes back to gemini-2.5-flash.

git-aic set-branch-prompt <on|off>

Offer to create a new branch before committing on main or master.

Off by default.

git-aic show

Show the masked key and its source, the model, settings, and the config path.

git-aic alias

Set up the global git aic alias.

git-aic help [command]

Help for git-aic or one command.

$
git aic

Pick files, review, commit

$
git aic -p

Commit, then push

$
git aic -a

Commit every changed file

$
git aic --dry-run

Preview the message only

$
git aic -d

Diff report for files you pick

$
git aic -d -a

Diff report for every change

$
git aic -a -y -p

No prompts: commit everything and push (CI)

$
git-aic set-model gemini-2.5-pro

Switch the Gemini model

GEMINI_COMMIT_MESSAGE_API_KEY

Gemini API key. Takes precedence over set-key.

GIT_AIC_MODEL

Gemini model for this shell. Takes precedence over set-model.

GIT_AIC_DEBUG=1

Print full error details.

  • --push and --dry-run cannot be combined with --diff.
  • Everything else combines freely, e.g. git aic -a -y -p.
  • --yes never answers questions only you can: API key, Git name/email, remote URL, or credentials.