Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

git-std — Usage

git std — standard git workflow from commit to release.

Synopsis

git std <command> [options]

Commands

git std check

Validate commit messages against the Conventional Commits specification.

Input modes:

git std check "feat: add login"                    # inline message
git std check --file .git/COMMIT_EDITMSG           # from file (strips # comments)
git std check --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 check "feat(auth): add OAuth2 PKCE flow"

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

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

# As a commit-msg hook
git std check --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
--breaking <msg>Add BREAKING CHANGE footer
--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
--signGPG-sign commit and tag
--skip-changelogBump without changelog

Exit codes: 0 = success, 1 = error.

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)
--stdoutPrint to stdout instead of file
--output <file>Write to file (default: CHANGELOG.md)

--full and --range are mutually exclusive. Without either, generates an incremental changelog from unreleased commits since the last tag.

git std hooks

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

git std hooks install    # set up hooks directory and shim scripts
git std hooks run <hook> # execute a hook manually
git std hooks list       # display configured hooks

git std self-update (planned)

Fetch the latest release and replace the current binary. Not yet implemented.

Global Flags

FlagDescription
--help / -hPrint help
--version / -VPrint version
--color <when>auto (default), always, never

Configuration

git-std reads .git-std.toml in the project root. All fields are optional — sensible defaults are used when the file is absent or a field is omitted.

Full schema

# ── Project ───────────────────────────────────────────────────────
scheme = "semver"                              # semver | calver | patch
types = ["feat", "fix", "docs", "style",
         "refactor", "perf", "test",
         "chore", "ci", "build"]
scopes = ["auth", "api", "ci", "deps"]         # "auto" | string[] | omit
strict = true                         # enforce types/scopes

# ── Versioning ────────────────────────────────────────────────────
[versioning]
tag_prefix = "v"                               # git tag prefix
prerelease_tag = "rc"                          # default pre-release id
calver_format = "YYYY.MM.PATCH"                # only when scheme = "calver"

# ── Changelog ─────────────────────────────────────────────────────
[changelog]
hidden = ["chore", "ci", "build", "style", "test"]

[changelog.sections]
feat = "Features"
fix = "Bug Fixes"
perf = "Performance"
refactor = "Refactoring"
docs = "Documentation"

Fields

Top-level

FieldTypeDefaultDescription
schemestring"semver"Versioning scheme: semver, calver, or patch
typesstring[]10 standard typesAllowed conventional commit types
scopes"auto" or string[]NoneScope discovery or explicit allowlist
strictboolfalseEnforce types/scopes validation without --strict flag

Default types: feat, fix, docs, style, refactor, perf, test, chore, ci, build.

Scopes behavior:

  • Not set (default) — no scope validation, any scope accepted
  • scopes = "auto" — discover scopes from workspace layout (crates/*, packages/*, modules/*)
  • scopes = ["auth", "api"] — explicit allowlist

When scopes is set (either "auto" or an array) and --strict is used, a scope is required and must be in the resolved list. For git std commit, the resolved scopes populate the interactive scope prompt.

[versioning]

FieldTypeDefaultDescription
tag_prefixstring"v"Git tag prefix (e.g., v1.0.0)
prerelease_tagstring"rc"Default pre-release identifier
calver_formatstring"YYYY.MM.PATCH"Calendar version format (only when scheme = "calver")

Calendar version format tokens:

TokenDescriptionExample
YYYYFull year2026
YYShort year26
0MZero-padded month03
MMMonth (no padding)3
WWISO week number11
DDDay of month13
PATCHAuto-incrementing patch counter, resets each period0, 1, 2
DPDay of week (1=Mon–7=Sun) concatenated with patch counter30, 31, 32

Common formats: YYYY.MM.PATCH (monthly releases), YYYY.0M.PATCH (zero-padded month), YY.WW.DP (weekly with day-of-week), YYYY.MM.DD.PATCH (daily releases).

Bump rules are inferred from the scheme — not configurable. For semver: BREAKING CHANGE or ! triggers major, feat triggers minor, everything else triggers patch.

[changelog]

FieldTypeDefaultDescription
hiddenstring[]["chore", "ci", "build", "style", "test"]Types excluded from changelog

[changelog.sections]

Maps commit types to changelog section headings. Types not listed here use the type name as the heading.

KeyDefault
feat"Features"
fix"Bug Fixes"
perf"Performance"
refactor"Refactoring"
docs"Documentation"

Inferred settings

These are not configurable — git-std resolves them automatically:

ConcernResolution
Bump rulesInferred from scheme
Version filesAuto-detected (Cargo.toml)
URLsInferred from git remote get-url origin
Changelog outputAlways CHANGELOG.md
Release commitAlways chore(release): <version>

Minimal examples

No config needed — git-std works with zero configuration using conventional defaults.

Types and scopes only:

types = ["feat", "fix", "chore"]
scopes = ["auth", "api"]

Calver project:

scheme = "calver"

[versioning]
calver_format = "YYYY.0M.PATCH"

Custom changelog sections:

[changelog]
hidden = ["chore", "ci"]

[changelog.sections]
feat = "New Features"
fix = "Bug Fixes"
perf = "Performance Improvements"

CI Integration

# GitHub Actions
- name: Validate commits
  run: git std check --range ${{ github.event.pull_request.base.sha }}..${{ github.sha }}
# GitLab CI
lint:commits:
  script:
    - git std check --range $CI_MERGE_REQUEST_DIFF_BASE_SHA..HEAD

Hooks Integration

Create .githooks/commit-msg.hooks:

! git std check --file {msg}

Then install:

git std hooks install

Every commit message will be validated automatically.