Commands

Every command and option, including scripts and CI.

gitmit [options]               Suggest messages for staged changes and commit
gitmit split                   Split staged changes into several focused commits
gitmit pr                      Write a pull request title and description for this branch
gitmit pr --create [--draft]   ...then push the branch and open the pull request
gitmit pr --update             ...then replace the open pull request's title and description
gitmit check                   Check this branch's commit messages (and a PR title) against your rules
gitmit release                 Changelog, next version and tag from the commits since the last release
gitmit init [--force]          Create a starter .gitmitrc.json
gitmit config                  Show the settings gitmit will use here
gitmit hook install [--force]  Fill in a suggestion whenever you run `git commit`
gitmit hook uninstall          Remove the hook
gitmit login                   Sign in with GitHub to use the key saved in your gitmit account
gitmit logout                  Sign out on this computer
gitmit account                 Show your account and saved keys
OptionWhat it does
--dry-runShow suggestions (or the split plan) without committing.
-y, --yesCommit the top suggestion (or apply the split) without asking.
--provider <name>account, openai, anthropic, ollama or rules.
--model <name>Model for the provider, e.g. --model gpt-5.
--config <path>Use this config file instead of searching the repository.
--redactWhen a secret is found, send a redacted version instead of stopping.
--pushPush to the remote after committing. A new branch gets its upstream set, like git push -u.
--no-pushDon't push, even if the config has "push": true.
--base <branch>For pr: the branch to compare with. Defaults to the remote's default branch.
--range <a..b>For check: the commits to check, instead of the branch compared with --base.
--title <text>For check: also check a pull request title. Add --no-commits to check only the title.
--suggestFor check: suggest a fixed message for each problem.
--jsonFor check: print the results as JSON.
--bump <level>For release: major, minor, patch or an exact version like 1.0.0, instead of the suggestion.
--githubFor release: push, then create a GitHub release with GitHub's CLI.
--create, --draft, --updateFor pr: open the pull request (or a draft), or update the open one, with GitHub's CLI.
--forceFor init and hook install: overwrite an existing file.
-h, --helpShow help.
-v, --versionShow the version.

Scripts and CI

When gitmit isn't running in an interactive terminal, it never prompts:

gitmit --dry-run            # print suggestions, separated by ---
gitmit --yes                # commit the top suggestion
gitmit split --dry-run      # print the split plan
gitmit split --yes          # apply the split plan
gitmit pr                   # print the PR title, a blank line, then the description
gitmit pr --create          # ...and open the pull request
gitmit check                # exit code 1 if a commit message breaks the rules
gitmit release --dry-run    # print the next version and its notes
gitmit release --yes --github   # release, push and create a GitHub release

Without --yes or --dry-run, a non-interactive run prints the suggestions and commits nothing.