git-agent CLI

A CLI that splits changes into atomic commits and writes conventional commit messages through an LLM, plus a skill for agents.

  • 80 ★ on the repository
  • Last commit
CLI

Extended access

Why this level

  • The command makes commits in the repository by itself, and the diff goes to the LLM provider whose key is stored in the config.
All reasons and checks

gitagenthq/git-agent-cli

Install

Manual install

brew install gitagenthq/brew/git-agent

The first README option. Also `go install github.com/gitagenthq/git-agent@latest`. The skill installs through `npx skills add`.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The command makes commits in the repository by itself, and the diff goes to the LLM provider whose key is stored in the config.

This is third-party code. Review the repository files before installing.

What it does

The `git-agent` command reads staged and unstaged changes, groups them into atomic commits, generates a message for each group and commits in sequence. The bare `git-agent --intent "fix auth bug"` runs an autonomous agent workflow, while `git-agent commit` keeps an explicit path. The `--dry-run`, `--amend`, `--co-author` and `--trailer` flags cover a trial run, amending the last commit and trailers, and `-o json` prints SHAs and the hook result. `git-agent init` sets up a repository: it creates `.gitignore`, generates allowed commit scopes from git history and writes `.git-agent/config.yml` with a `conventional` hook. The `using-git-agent` skill teaches agents to commit on your behalf, and the full guide ships in the binary: `git-agent skills get core`.

Who it is for. Developers with a messy working tree who want a clean history of small meaningful commits, and agents that commit for a user.

Good fit when

  • A day gathered an auth fix and a refactor and they must be split into separate commits.
  • Messages are checked by the `conventional` hook before they are written.
  • The last commit is rebuilt with `git-agent commit --amend`.
  • An agent finishes a task and commits the result through the `using-git-agent` skill.

Not a fit when

  • You need manual control over every line of the message with no LLM.
  • The diff cannot go to an external model provider.
  • History should stay as one large commit.

Example request

Split my current changes into atomic commits and show the messages first with `--dry-run`.

Limitations

Generation needs an LLM provider key saved with `git-agent config set --user api-key ...`, and the diff goes to that provider. The key is stored in `~/.config/git-agent/config.yml`, project settings in `.git-agent/config.yml` and personal ones in `.git-agent/config.local.yml`. Default diff limits are raised with `max-diff-lines`, `max-diff-bytes` and `max-plan-files`. The command commits by itself, including in the autonomous bare-command mode, so run `--dry-run` first. Building from source needs Go 1.26 or newer.

How to disable. Remove the binary (`brew uninstall git-agent`), the `.git-agent/` directory in the repository and the `using-git-agent` skill from the agent skills directory. Revoke the key in `~/.config/git-agent/config.yml` with the provider.

FAQ

How do I install git-agent?

With Homebrew: `brew install gitagenthq/brew/git-agent`, or `go install github.com/gitagenthq/git-agent@latest`. Prebuilt binaries are on the releases page.

How do I connect it to an agent?

Run `npx skills add https://github.com/GitAgentHQ/git-agent-cli --skill using-git-agent`. The skill is a stub, and `git-agent skills get core` prints the full guide.

What language are messages written in?

By default `language: auto`: the language comes from a clear `--intent` directive, otherwise English. Set an explicit one with `git-agent config set language Japanese`.

How do I preview without committing?

Run `git-agent commit --dry-run`: it prints the messages and writes nothing. With `-o json` the output is structured.

Where are settings stored?

In three scopes: `--user` in `~/.config/git-agent/config.yml` for keys, `--project` in `.git-agent/config.yml` for shared ones and `--local` in `.git-agent/config.local.yml` for personal ones.

Discussion

No questions or reviews yet.

CLI tools

Git commands and agent skills: a JIRA branch, an AI commit, a pull request, a description, review and comment fixes.

CLIExtended access80Repository stars

A CLI and skill that record an agent's goals, decisions and rejected paths in Git so the next agent does not repeat them

CLIExtended access204Repository stars

Agentic OS adds a five-step workflow and checks in git hooks and CI so that a step without evidence does not count as done

WorkflowExtended access234Repository stars

AGENTS.md instructions and skills with a test-first process that scales to the task, for Cursor, Codex CLI, Gemini CLI.

SkillExtended access51Repository stars

A CLI that writes Conventional Commits messages from the diff and keeps the changelog, using Claude or an OpenAI-compatible API.

CLIExtended access62Repository stars

A terminal coding agent in Go: GLM, DeepSeek and local Ollama models, 59 built-in tools and MCP

CLIBroad access110Repository stars

README in short

The README covers three install paths, the agent skill, a quick start, the `init`, `commit`, `config`, `completion` and `version` commands with flags and a settings scope table. The JSON output object is spelled out.

README badge

Report a problem