gemit logo

gemit

AI CLI for Git

Node.js CLI

gemit is a CLI to speed up your Git workflow with AI

It suggests commits, branch names, PR text, branch summaries, and changelogs with confirmation before running Git commands.

Installation

Global npm install on Windows, Linux, and macOS.

npm sync: v... • updated ...

npm install -g gemit-cli

Prerequisites

  1. 1. Be inside a Git repository.
  2. 2. Configure provider/model/API key with gemit init.
gemit init
gemit doctor

Configuration (init) and variables

Load order

  1. 1. .env global.

Global path on Windows: %APPDATA%\gemit\.env

Supported variables

  • - LLM_PROVIDER (google, openai, anthropic)
  • - LLM_MODEL
  • - GOOGLE_API_KEY (or GEMINI_API_KEY)
  • - OPENAI_API_KEY
  • - ANTHROPIC_API_KEY

init defaults

  • - google -> gemini-2.5-flash
  • - openai -> gpt-4o-mini
  • - anthropic -> claude-3-5-sonnet-latest

CLI commands

Global options

-v, --version

Show version.

-h, --help

General help.

help [command]

Help for a specific command.

Main flows

gemit

Shortcut to the commit flow using current staged changes.

gemit commit [--all] [--check]

Flow: stage -> summary -> AI suggestion -> optional edit -> confirmation -> git commit -m. Then it asks whether to push.

- --all: runs git add . first.

- --check: runs npm run lint --if-present and npm run test --if-present.

gemit branch <description...>

Generates a branch in <type>/<kebab-case> (feat, fix, chore, docs, refactor, test) and asks whether to create it with git checkout -b.

gemit pr

Generates a markdown PR title and description from branch commits.

gemit log

Summarizes what was done in the current branch.

gemit changelog [name]

Generates a file in changelogs/<name>-YYYY-MM-DD.md using recent commit history.

- -c, --commits <number>: number of recent commits to include (default: 20, max: 200).

gemit init

Configures provider/model/key in the global .env.

gemit doctor

Validates current config and reports missing values.

gemit update

Forces an update check and installs the latest global version when available.

gemit add [--all] [--check]

Stages changes and enters the same commit suggestion flow. In practice, this flow requires --all.

- --all: required; runs git add ..

- --check: runs lint and test with --if-present.

.env example

LLM_PROVIDER="google"
LLM_MODEL="gemini-2.5-flash"

GOOGLE_API_KEY=""
GEMINI_API_KEY=""
OPENAI_API_KEY=""
ANTHROPIC_API_KEY=""

Project scripts (package.json)

  1. 1. gemit commit --check runs npm run lint --if-present.
  2. 2. gemit commit --check runs npm run test --if-present.
  3. 3. If scripts do not exist, npm skips them safely because of --if-present.

Join the community

Join the Discord community to share improvements, ask questions, and follow gemit updates.

Join Discord
Community logo