README.md

 1<!--
 2SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
 3
 4SPDX-License-Identifier: CC0-1.0
 5-->
 6
 7# formatted-commit
 8
 9[![REUSE status](https://api.reuse.software/badge/git.secluded.site/formatted-commit)](https://api.reuse.software/info/git.secluded.site/formatted-commit)
10[![Go Report Card](https://goreportcard.com/badge/git.secluded.site/formatted-commit)](https://goreportcard.com/report/git.secluded.site/formatted-commit)
11
12## Installation
13
14```sh
15go install git.secluded.site/formatted-commit@latest
16```
17
18## Usage
19
20```text
21$ formatted-commit -h
22
23  formatted-commit helps you create well-formatted Git commits that follow
24  the Conventional Commits specification with proper subject length validation,
25  body wrapping, and trailer formatting.
26
27  USAGE
28
29
30    formatted-commit [--flags]
31
32
33  EXAMPLES
34
35
36    # With co-author
37    formatted-commit -t feat -m "do a thing" -t "Crush <crush@charm.land>"
38
39    # Breaking change with longer body
40    formatted-commit -t feat -m "do a thing that borks a thing" -B "$(cat <<'EOF'
41    Multi-line
42    - Body
43    - Here
44
45    This is what borked because of new shiny, this is how migrate
46    EOF
47    )"
48
49    # Including scope for more precise changes
50    formatted-commit -t refactor -s "web/git-bug" -m "fancy shmancy" \
51      -b "Had to do a weird thing because..."
52
53
54  COMMANDS
55
56    help [command]  Help about any command
57
58  FLAGS
59
60    -b --body       Commit body (optional)
61    -B --breaking   Mark as breaking change (optional)
62    -h --help       Help for formatted-commit
63    -m --message    Commit message (required)
64    -s --scope      Commit scope (optional)
65    -T --trailer    Trailer in 'Sentence-case-key: value' format (optional, repeatable)
66    -t --type       Commit type (required)
67    -v --version    Version for formatted-commit
68```