Node.js CLI  ·  npm install -g gemit-cli

AI-powered Git workflow, from your terminal.

gemit suggests commits, branch names, PR text, code reviews, stash messages, releases, and more — with confirmation before running any Git command.

New commands & features

Everything added in the latest update — all the features below are available now.

gemit undo

Soft-reset last commit, keep files staged.

gemit review

AI code review before committing.

gemit stash

Stash with AI-generated message.

gemit release 1.2.0

Full release: bump, changelog, tag.

gemit ignore "..."

AI-generated .gitignore entries.

gemit squash 3

Squash N commits with AI message.

commit --amend

Rewrite last commit message with AI.

commit --dry-run

Preview message without committing.

gemit config --set KEY=value

Change any config key without re-running init.

GEMIT_LANGUAGE=pt-br

AI responses in your preferred language (en / pt-br).

Global npm install

Works on Windows, Linux, and macOS.

npm sync: v... · updated ...

npm install -g gemit-cli

Getting started

  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
  • GEMIT_LANGUAGE — en, pt-br (default: en)
  • GOOGLE_API_KEY (or GEMINI_API_KEY)
  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY

init defaults

  • googlegemini-2.5-flash
  • openaigpt-4o-mini
  • anthropicclaude-3-5-sonnet-latest

GEMIT_LANGUAGE defaults to en. Set to pt-br for Portuguese output on commit, branch, and PR commands.

Prompt customization

gemit works out of the box with built-in prompts. If you want to adjust the AI instructions for any command, you can override them globally — files are stored in your OS config directory, never inside your projects.

How it works

  1. 1. No setup needed — built-in defaults are always active.
  2. 2. Run gemit prompts --edit commit to customize.
  3. 3. gemit detects the file and uses it instead of the built-in.
  4. 4. Delete the file to revert to the default.

Global config location

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

Available 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}}

gemit prompts
gemit prompts # list status of all prompts gemit prompts --init # export all defaults to global config folder gemit prompts --edit commit # open commit prompt in default editor

CLI commands

-v, --version

Show version.

-h, --help

General help.

help [command]

Help for a specific command.

gemit

Shortcut to the commit flow using current staged changes.

gemit commit [options]

Flow: stage → summary → AI suggestion → confirmation → git commit -m. Then asks whether to push.

--all runs git add . first.

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

--amend rewrites the last commit message using AI.

--dry-run previews the suggested message without committing.

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> — recent commits to include (default: 20, max: 200).

gemit init

Configures provider, model, language, and API key in the global .env. Supports en and pt-br output language.

gemit doctor

Validates current config and reports missing values, including the language setting.

gemit update

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

gemit prompts

Manages AI prompt templates. Works out of the box with built-in defaults — customize only if needed, without touching your project.

--init exports all defaults to the global config folder and opens it.

--edit <name> opens a specific prompt in your default editor.

--show <name> prints the built-in template in the terminal.

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.

gemit undo

Soft-resets the last commit, keeping all changes staged. Asks for confirmation before running.

gemit review

AI code review of staged changes before you commit. Findings are labeled [CRITICAL], [WARNING], [INFO], or [OK].

gemit stash

AI generates a descriptive message for git stash based on your working-tree changes, then runs git stash push -u -m.

gemit release <version>

Full release flow in one command: updates package.json, generates a changelog with AI, commits as chore(release): vX.Y.Z, and creates an annotated git tag.

gemit ignore <description...>

AI generates .gitignore entries based on your project description. Skips duplicates and appends to the existing file.

gemit squash <count>

Squashes the last N commits into one. AI generates a unified Conventional Commit message covering all squashed changes.

gemit config --set <KEY=value>

Updates a single value in the global config without re-running the full gemit init wizard.

--set LLM_MODEL=gpt-4o — change the model.

--set GEMIT_LANGUAGE=pt-br — switch AI output language.

--list — shows all current config values (alias for gemit doctor).

.env file

.env
LLM_PROVIDER="google" LLM_MODEL="gemini-2.5-flash" GEMIT_LANGUAGE="en" 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

Share improvements, ask questions, and follow gemit updates on Discord.

Join Discord
Community logo