README.md

formatted-commit

REUSE status Go Report Card

Encourage LLMs towards well-formatted commits

Installation

go install git.secluded.site/formatted-commit@latest

Copy/paste into wherever you tell your models how to write commits.

Create commits exclusively using `formatted-commit`. Try to use it normally, but
if it's not in my PATH, ask me to `go install
git.secluded.site/formatted-commit@latest`. It has no sub-commands and the following options:
<formatted-commit_flags>
-b --body Commit body (optional)
-B --breaking Mark as breaking change (optional)
-h --help Help for formatted-commit
-m --message Commit message (required)
-s --scope Commit scope (optional)
-T --trailer Trailer in 'Sentence-case-key: value' format (optional, repeatable)
-t --type Commit type (required)
-v --version Version for formatted-commit
</formatted-commit_flags>
<formatted-commit_example>
formatted-commit -t feat -s "web/git-bug" -m "do a fancy new thing" -T "Crush <crush@charm.land>" -b "$(cat <<'EOF'
Multi-line

- Body
- Here

EOF
)"
</formatted-commit_example>

Usage

$ formatted-commit -h

  formatted-commit helps you create well-formatted Git commits that follow
  the Conventional Commits specification with proper subject length validation,
  body wrapping, and trailer formatting.

  USAGE


    formatted-commit [--flags]


  EXAMPLES


    # With co-author
    formatted-commit -t feat -m "do a thing" -T "Crush <crush@charm.land>"

    # Breaking change with longer body
    formatted-commit -t feat -m "do a thing that borks a thing" -B "$(cat <<'EOF'
    Multi-line
    - Body
    - Here

    This is what borked because of new shiny, this is how migrate
    EOF
    )"

    # Including scope for more precise changes
    formatted-commit -t refactor -s "web/git-bug" -m "fancy shmancy" \
      -b "Had to do a weird thing because..."


  COMMANDS

    help [command]  Help about any command

  FLAGS

    -b --body       Commit body (optional)
    -B --breaking   Mark as breaking change (optional)
    -h --help       Help for formatted-commit
    -m --message    Commit message (required)
    -s --scope      Commit scope (optional)
    -T --trailer    Trailer in 'Sentence-case-key: value' format (optional, repeatable)
    -t --type       Commit type (required)
    -v --version    Version for formatted-commit