···99[](https://api.reuse.software/info/git.secluded.site/formatted-commit)
1010[](https://goreportcard.com/report/git.secluded.site/formatted-commit)
11111212+_Encourage LLMs towards well-formatted commits_
1313+1214## Installation
13151416```sh
1517go install git.secluded.site/formatted-commit@latest
1618```
17192020+Copy/paste into wherever you tell your models how to write commits.
2121+2222+```markdown
2323+Create commits exclusively using `formatted-commit`. Try to use it normally, but
2424+if it's not in my PATH, ask me to `go install
2525+git.secluded.site/formatted-commit@latest`. It has no sub-commands and the following options:
2626+<formatted-commit_flags>
2727+-b --body Commit body (optional)
2828+-B --breaking Mark as breaking change (optional)
2929+-h --help Help for formatted-commit
3030+-m --message Commit message (required)
3131+-s --scope Commit scope (optional)
3232+-T --trailer Trailer in 'Sentence-case-key: value' format (optional, repeatable)
3333+-t --type Commit type (required)
3434+-v --version Version for formatted-commit
3535+</formatted-commit_flags>
3636+<formatted-commit_example>
3737+formatted-commit -t feat -s "web/git-bug" -m "do a fancy new thing" -T "Crush <crush@charm.land>" -b "$(cat <<'EOF'
3838+Multi-line
3939+4040+- Body
4141+- Here
4242+ EOF
4343+ )"
4444+</formatted-commit_example>
4545+```
4646+1847## Usage
19482049```text
···346335643665 # With co-author
3737- formatted-commit -t feat -m "do a thing" -t "Crush <crush@charm.land>"
6666+ formatted-commit -t feat -m "do a thing" -T "Crush <crush@charm.land>"
38673968 # Breaking change with longer body
4069 formatted-commit -t feat -m "do a thing that borks a thing" -B "$(cat <<'EOF'