Configuration
git-sumi uses TOML for the configuration file.
Create a sumi.toml with the default values by running this command from the root of your repository:
git sumi --init config
Config file location
By default, git-sumi looks the configuration file sumi.toml or .sumi.toml in the following places:
- The current directory
- The current directory's parent directories
- The user's home directory
- A directory named
sumiwithin the user's home directory
The user's home directory varies by platform:
| Platform | Value | Example |
|---|---|---|
| Linux | $HOME | /home/alice |
| macOS | $HOME | /Users/Alice |
| Windows | {FOLDERID_Profile} | C:\Users\Alice |
In practice, this means git-sumi will respect the rules of the repository you are currently in, falling back to your user's configuration.
You can use a particular config file with the --config | -c option:
git sumi --config /path/to/sumi.toml
Use --config 'none' to use the default configuration.
Configuration options
Quiet
-
Description: Suppress progress messages.
-
sumi.tomlidentifier:quiet -
Command line usage: Long option:
--quiet, Short option:-q -
Environment variable:
GIT_SUMI_QUIET -
Type of value: Boolean (e.g.,
false) -
Example: Set
quiet = trueinsumi.tomlto suppress progress messages, or usegit sumi --quiet.
Split Lines
-
Description: Process each non-empty line of the commit message as an individual commit.
-
sumi.tomlidentifier:split_lines -
Command line usage: Long option:
--split-lines, Short option:-s -
Environment variable:
GIT_SUMI_SPLIT_LINES -
Type of value: Boolean (e.g.,
true) -
Example: Set
split_lines = trueinsumi.tomlor usegit sumi -s.
Display
-
Description: Display the parsed commit message after linting.
-
sumi.tomlidentifier:display -
Command line usage: Long option:
--display, Short option:-d -
Environment variable:
GIT_SUMI_DISPLAY -
Type of value: Boolean (e.g.,
true) -
Example: Set
display = trueinsumi.tomlor usegit sumi --display.
Format
-
Description: Specifies the output format for displaying the parsed commit message.
Enabling this option automatically sets
display = true. -
sumi.tomlidentifier:format -
Command line usage: Long option:
--format, Short option:-f -
Environment variable:
GIT_SUMI_FORMAT -
Type of value: String (options: "cli", "table", "json", "toml")
-
Default value: "cli"
-
Example usage: Set
format = "json"insumi.tomlfor JSON formatted output, or usegit sumi --format json. -
Example output
- Original commit
- (Markdown) table
- cli
- JSON
- TOML
🐛 fix(auth)!: resolve token refresh issue
Fixes bug introduced in ce6df36 where the authentication token would
not refresh properly during a session, causing unexpected logouts.
Co-authored-by: John Doe <johndoe@example.com>
| Key | Value |
|----------------------|----------------------------------------------------------------------|
| Gitmoji | 🐛 |
| Commit type | fix |
| Scope | auth |
| Description | resolve token refresh issue |
| Body | Fixes bug introduced in ce6df36 where the authentication token would |
| | not refresh properly during a session, causing unexpected logouts. |
| Footers | Co-authored-by:John Doe <johndoe@example.com> |
| Is breaking | true |
| Breaking description | resolve token refresh issue |
| References | ce6df36 |
┌──────────────────────┬──────────────────────────────────────────────────────────────────────┐
│ Gitmoji │ 🐛 │
├──────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ Commit type │ fix │
├──────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ Scope │ auth │
├──────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ Description │ resolve token refresh issue │
├──────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ Body │ Fixes bug introduced in ce6df36 where the authentication token would │
│ │ not refresh properly during a session, causing unexpected logouts. │
├──────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ Footers │ Co-authored-by:John Doe <johndoe@example.com> │
├──────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ Is breaking │ true │
├──────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ Breaking description │ resolve token refresh issue │
├──────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ References │ ce6df36 │
└──────────────────────┴──────────────────────────────────────────────────────────────────────┘
{
"body": "Fixes bug introduced in ce6df36 where the authentication token would\nnot refresh properly during a session, causing unexpected logouts.",
"breaking_description": "resolve token refresh issue",
"commit_type": "fix",
"description": "resolve token refresh issue",
"footers": [
"Co-authored-by:John Doe <johndoe@example.com>"
],
"gitmoji": "🐛",
"is_breaking": true,
"references": [
"ce6df36"
],
"scope": "auth"
}
gitmoji = "🐛"
commit_type = "fix"
scope = "auth"
description = "resolve token refresh issue"
body = """
Fixes bug introduced in ce6df36 where the authentication token would
not refresh properly during a session, causing unexpected logouts."""
footers = ["Co-authored-by:John Doe <johndoe@example.com>"]
is_breaking = true
breaking_description = "resolve token refresh issue"
references = ["ce6df36"]
Rules
See the list of all available rules.