Gitty
Use gitty as the commit-message interface while keeping Git state changes within the user's authorization.
Run the workflow
- Confirm the working directory is the intended Git repository. Use
gitty -C <path> ...when operating outside its root. - Run
gitty providersif provider availability is unknown. Auto mode falls through installed Codex, Claude Code, and OpenCode providers when one fails; an explicit--providerdoes not fall back. Ifgittyis missing, tell the user and offer the installation command from CLI reference; do not silently install software. - Inspect the input with
gitty diffbefore generation. Usegitty diff --statfor a compact view orgitty diff --allonly when unstaged and untracked changes belong in scope. - Generate with
gitty gen. Add constraints such as--type,--scope,--hint,--style, or--provideronly when they reflect the repository or user request. - Return the generated message. Copy, commit, stage all changes, or push only when the user asked for that mutation.
Preserve repository safety
- Treat plain
gitty genas read-only: it prints a message and does not modify the repository or remote. - Prefer staged changes for an authorized commit. Run
gitty gen --commitonly after confirming the intended changes are staged. - Use
--allcarefully because it includes and may stage staged, unstaged, and untracked changes. Inspectgitty diff --allfirst and exclude secrets, local configuration, generated artifacts, and unrelated user work. - Use
--pushonly when the user explicitly asked to push. It implies a commit and pushes the current branch to its configured upstream. - Do not use
--commit,--all, or--pushmerely because they are convenient. If authorization is ambiguous, generate the message and stop. - Rely on default credential redaction and inspect the exact redacted provider payload with
gitty diff. Use--allow-secretsonly when the user explicitly authorizes sending the raw diff and understands which provider will receive it. - Use
--dry-runwhen the user wants to review the exact provider prompt. The prompt preserves the same default secret redaction. - Never invent success. Verify the resulting commit with
git status --shortandgit log -1 --oneline; verify a requested push from command output or the remote state.
Choose inputs and output
- Let the default
autoselection use staged changes when present and otherwise visible working-tree changes. - Use
--changes stagedto force staged-only input. - Use
--allor--changes allfor every visible change only after checking scope. - Use
-ifor terminal-based selection, editing, regeneration, copy, commit, or push. Do not use interactive mode in a non-interactive shell. - Use
--jsonwhen another program will consume candidate messages and-n 2through-n 5when alternatives help. A non-interactive commit requires exactly one candidate. - Use Conventional Commit
--typeand--scopeonly with--style conventional.
Read CLI reference for installation, configuration, providers, flags, and common command recipes.