GitAI is a terminal-first assistant for generating Conventional Commit messages from staged Git changes, reviewing the result, committing it, and optionally pushing it to one or more remotes.
- Conventional Commit title + description generated from staged changes.
- Providers: AvalAI, OpenRouter, Cloudflare Workers AI, and Google AI Studio (Gemini).
- First-run credential setup when no usable API key is found.
gum-based terminal UI with plain-shell fallback.- Multi-remote push selection, including All remotes.
- Works cleanly in Warp without using a full-screen alternate buffer.
- Config discovery for old and new installations.
- Versioned Homebrew formula, while keeping
--HEADavailable for development builds.
Add the tap once:
brew tap jaavid/gitai https://github.com/jaavid/gitaiInstall the stable version:
brew install jaavid/gitai/gitaiNormal upgrades then work with:
brew update
brew upgrade gitaiOlder GitAI instructions used:
brew install --HEAD jaavid/gitai/gitaiThat produces versions such as HEAD-e7f82ea, so Homebrew tracks Git commits rather than semantic releases. Switch once to the stable channel after this release is merged:
brew reinstall jaavid/gitai/gitaiThen verify:
gitai --versionExpected for this release:
gitai 0.3.0
If you intentionally want the newest main commit instead of a release, use:
brew reinstall --HEAD jaavid/gitai/gitai
brew upgrade --fetch-HEAD gitaiHomebrew installs jq and gum automatically.
GitAI reads config in this order; later files override earlier values:
.gitainext to the executable.~/.bin/gitai/.gitai— historical GitAI location.~/.config/gitai/configor$XDG_CONFIG_HOME/gitai/config.<repo>/.gitai.
So an existing file such as:
/Users/javid/.bin/gitai/.gitai
continues to work without migration.
If no usable key exists for the configured provider(s), GitAI starts an interactive setup wizard. It asks for the provider and API key, masks the key while typing, and stores it in:
~/.config/gitai/config
with mode 600.
Run setup manually at any time:
gitai --setupExample config:
export GITAI_PROVIDER="google,openrouter,cloudflare,avalapis"
export GITAI_GOOGLE_API_KEY="your-google-key"
export GITAI_OPENROUTER_API_KEY="your-openrouter-key"
export GITAI_CLOUDFLARE_API_KEY="your-cloudflare-key"
export GITAI_AVALAPIS_API_KEY="your-avalapis-key"
export GITAI_CLOUDFLARE_ACCOUNT_ID="your-cloudflare-account-id"Supported providers:
googleopenroutercloudflareavalapis
A comma-separated value in GITAI_PROVIDER acts as a fallback chain.
From any Git repository:
gitaiTypical flow:
- Load credentials or run setup.
- Show branch and Git status.
- Stage changes if needed.
- Generate a commit message from the staged diff.
- Review and confirm the commit.
- Select a remote, all remotes, or skip pushing.
Useful options:
--setup Configure provider and API key
--push Push after committing; choose remote if needed
--push-all Push to every configured remote
--no-push Never ask to push
--no-tui Use plain prompts instead of Gum
-v, --version
-h, --help
GitAI uses normal terminal input/output rather than a curses-style full-screen interface. In Warp, each run remains a regular command block, and Git/GitAI output stays searchable and copyable.
git clone https://github.com/jaavid/gitai.git
cd gitai
install -m 755 gitai /usr/local/bin/gitaiMIT — see LICENSE.