Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Commands

git std <command> [options]

Global Flags

FlagDescription
--help / -hPrint help
--version / -VPrint version
--color <when>auto (default), always, never
--completions <shell>Generate shell completions to stdout
--updateUpdate git-std to the latest release

git std lint

Validate commit messages against the Conventional Commits specification.

Input modes:

git std lint "feat: add login"                    # inline message
git std lint --file .git/COMMIT_EDITMSG           # from file (strips # comments)
git std lint --range main..HEAD                   # all commits in a range

Flags:

FlagDescription
--file <path>Read message from file
--range <range>Validate all commits in a git revision range
--strictEnforce types/scopes from .git-std.toml
--format <fmt>Output format: text (default) or json

Exit codes: 0 = valid, 1 = invalid, 2 = I/O or usage error.

Examples:

# Validate a single message
git std lint "feat(auth): add OAuth2 PKCE flow"

# Validate all commits on a branch
git std lint --range main..HEAD

# Strict mode — reject unknown types and scopes
git std lint --strict --range main..HEAD

# As a commit-msg hook
git std lint --file "$1"

git std commit

Interactive conventional commit builder. Prompts for type, scope, description, body, and breaking change, then runs git commit.

Flags:

FlagDescription
--type <type>Pre-fill type, skip prompt
--scope <scope>Pre-fill scope, skip prompt
--message <msg>Non-interactive mode
--body <text>Commit body paragraph
--breaking <msg>Add BREAKING CHANGE footer
--footer <text>Add a trailer footer (repeatable)
--signoff / -sAdd Signed-off-by trailer
--dry-runPrint message without committing
--amendPass --amend to git commit
--sign / -SGPG-sign the commit
--all / -aStage tracked changes

Exit codes: 0 = committed, 1 = validation/git error, 2 = usage error.

git std bump

Calculate the next version from conventional commits, update version files, generate changelog, commit, and tag.

Flags:

FlagDescription
--dry-runPrint plan without writing
--prerelease [tag]Bump as pre-release (e.g. 2.0.0-rc.1)
--release-as <ver>Force a specific version
--first-releaseInitial changelog, no bump
--no-tagSkip tag creation
--no-commitUpdate files only
--sign / -SGPG-sign commit and tag
--skip-changelogBump without changelog
--forceAllow breaking changes in patch-only scheme
--stable [branch]Create a stable branch for patch-only releases
--minorUse minor bump (instead of major) when advancing main after stable
--format <fmt>Output format: text (default) or json
--package <name>Filter bump to specific package(s) (monorepo only, repeatable)
--push [remote]Push commit and tags after release (default remote: origin)
--yes / -ySkip branch confirmation prompt

Exit codes: 0 = success, 1 = error.

Monorepo bump

When monorepo = true, each package is versioned independently based on commits touching its path.

# Bump all packages with changes
git std bump

# Preview monorepo bump
git std bump --dry-run

# Bump specific package(s)
git std bump -p core
git std bump -p core -p cli

# JSON output for CI
git std bump --dry-run --format json

Dependency cascade: when package A bumps and package B depends on A, B gets at least a patch bump. Use -p to skip cascade and bump only the named packages.

git std changelog

Generate or update the changelog from git history.

Flags:

FlagDescription
--fullRegenerate entire changelog
--range <range>Generate for a tag range (e.g. v1..v2)
-w, --write [path]Write to file (default: CHANGELOG.md)

Output goes to stdout by default. Pass -w / --write to write to CHANGELOG.md, or -w <path> for a custom path. --full and --range are mutually exclusive. Without either, generates an incremental changelog from unreleased commits since the last tag.

git std init

Scaffold hooks, bootstrap script, and README section in one step. Consolidates hook setup and bootstrap scaffolding for maintainers.

git std init              # scaffold everything interactively
git std init --force      # overwrite existing files
git std init --refresh    # update skills and merge config defaults

What it does:

  1. Creates .githooks/ directory.
  2. Sets core.hooksPath to .githooks.
  3. Writes .hooks templates (pre-commit, commit-msg, pre-push, etc.).
  4. Prompts which hooks to enable, writes shims.
  5. Generates ./bootstrap script.
  6. Generates .githooks/bootstrap.hooks.
  7. Creates .git-std.toml with taplo schema directive (if absent).
  8. Scaffolds agent skills in .agents/skills/ with .claude/skills/ symlinks.
  9. Appends post-clone section to README.md and AGENTS.md (if found).
  10. Stages all created files.

Flags:

FlagDescription
--forceOverwrite existing files
--refreshUpdate skills and merge config defaults (skip hooks)

Exit codes: 0 = success, 1 = error.

git std hook

Manage git hooks defined in .githooks/*.hooks files.

git std hook install          # set up hooks directory and shim scripts
git std hook run <hook>       # execute a hook manually
git std hook list             # display configured hooks
git std hook enable <hook>    # activate a hook (rename .off → shim)
git std hook disable <hook>   # deactivate a hook (rename shim → .off)

Subcommands:

SubcommandDescription
installWrite shim scripts and .hooks templates
run <hook>Execute a hook manually
listDisplay all hooks with enabled/disabled status
enable <hook>Activate a disabled hook
disable <hook>Deactivate an enabled hook

Known hook types: pre-commit, commit-msg, pre-push, post-commit, prepare-commit-msg, post-merge.

Flags (run and list):

FlagDescription
--format <fmt>Output format: text (default), json

git std bootstrap

Post-clone environment setup. Detects convention files and configures the local environment.

git std bootstrap              # run built-in checks + bootstrap.hooks
git std bootstrap --dry-run    # print what would be done

Built-in checks:

Convention fileAction
.githooks/git config core.hooksPath .githooks
.gitattributesgit lfs install + git lfs pull (if filter=lfs)
.git-blame-ignore-revsgit config blame.ignoreRevsFile .git-blame-ignore-revs

After built-in checks, runs .githooks/bootstrap.hooks if present.

Flags:

FlagDescription
--dry-runPrint what would be done without acting

git std doctor

Show everything about your local git-std setup in one command. Three sections: Status, Hooks, Configuration. Problems appear as hints at the bottom.

git std doctor              # show all sections, exit 0 (no problems) or 1
git std doctor --format json  # machine-readable JSON on stdout

Sections:

SectionContents
StatusTool versions: git, git-lfs (if .gitattributes needs it), git-std with update notice if available
HooksAll .githooks/*.hooks files with commands and sigils (! required, ? advisory), enabled/disabled state
ConfigurationAll .git-std.toml keys; explicit values in bold, defaults plain/dim

Example output:

  Status
    git 2.43.0
    git-lfs 3.4.1
    git-std 0.11.3 (update available: 0.12.0)

  Hooks
    commit-msg
      !  git std lint -f
    pre-commit
      !  cargo fmt --check
      !  cargo clippy
    pre-push (disabled)
      !  just verify

  Configuration
    scheme           semver
    strict           true
    ...

  hint: git-lfs not found — required by .gitattributes
  hint: .git-std.toml invalid: expected `=` at line 3

Flags:

FlagDescription
--format <fmt>Output format: text (default), json

Exit codes: 0 = no problems, 1 = one or more hints surfaced, 2 = not a git repository.

git std version

Lightweight, scriptable version queries.

git std version                  # 0.11.3
git std version --describe       # 0.11.3-dev.7+g3a2b1c.dirty
git std version --next           # 0.12.0
git std version --label          # minor
git std version --code           # 10299
git std version --format json    # all fields as JSON

Output goes to stdout. No v prefix.

Flags:

FlagDescription
--describeCargo-style describe: -dev.N pre-release + +hash[.dirty] metadata
--nextNext version from conventional commits since the last tag
--labelBump label (major/minor/patch/none), accounting for pre-1.0
--codeInteger version code
--format <fmt>Output format: text (default), json

Exit codes: 0 = success, 1 = error.

--completions <shell>

Generate shell completion scripts to stdout. The output includes wrappers that enable completion for both git-std and git std invocations. Works without a subcommand — usable regardless of install method.

git std --completions bash   # Bash
git std --completions zsh    # Zsh
git std --completions fish   # Fish

Add to your shell profile:

# Bash (~/.bashrc)
eval "$(git-std --completions bash)"

# Zsh (~/.zshrc)
eval "$(git-std --completions zsh)"

# Fish (~/.config/fish/config.fish)
git-std --completions fish | source

Update Check

git-std periodically checks for newer releases in the background and prints a hint after command output when an update is available.

  • Non-blocking — a detached background process fetches the latest release once every 24 hours.
  • Adapts to install method (cargo, install.sh, nix).
  • Opt-out: GIT_STD_NO_UPDATE_CHECK=1.