{"id":15366688,"url":"https://github.com/shipengqi/commitizen","last_synced_at":"2025-04-15T12:31:21.002Z","repository":{"id":226543292,"uuid":"461717228","full_name":"shipengqi/commitizen","owner":"shipengqi","description":"The commitizen command line utility, without nodejs. Forked from commitizen-go, fixes some issues of commitizen-go and supports more new features.","archived":false,"fork":false,"pushed_at":"2025-04-09T01:18:49.000Z","size":497,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T02:26:01.721Z","etag":null,"topics":["commitizen","commitizen-go","cz","cz-cli"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shipengqi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-21T05:27:04.000Z","updated_at":"2025-04-09T01:18:47.000Z","dependencies_parsed_at":"2024-05-23T08:48:24.035Z","dependency_job_id":"87de73dd-86c2-435a-b393-9359e5584cb5","html_url":"https://github.com/shipengqi/commitizen","commit_stats":{"total_commits":114,"total_committers":2,"mean_commits":57.0,"dds":"0.35964912280701755","last_synced_commit":"d0d67b79ae4efb3019f2179d4fa2ee7cb9a8edb8"},"previous_names":["shipengqi/commitizen"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipengqi%2Fcommitizen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipengqi%2Fcommitizen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipengqi%2Fcommitizen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shipengqi%2Fcommitizen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shipengqi","download_url":"https://codeload.github.com/shipengqi/commitizen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072175,"owners_count":21208129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commitizen","commitizen-go","cz","cz-cli"],"created_at":"2024-10-01T13:19:30.089Z","updated_at":"2025-04-15T12:31:20.983Z","avatar_url":"https://github.com/shipengqi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# commitizen\n\n[![test](https://github.com/shipengqi/commitizen/actions/workflows/e2e.yaml/badge.svg)](https://github.com/shipengqi/commitizen/actions/workflows/e2e.yaml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/shipengqi/commitizen)](https://goreportcard.com/report/github.com/shipengqi/commitizen)\n[![release](https://img.shields.io/github/release/shipengqi/commitizen.svg)](https://github.com/shipengqi/commitizen/releases)\n[![license](https://img.shields.io/github/license/shipengqi/commitizen)](https://github.com/shipengqi/commitizen/blob/main/LICENSE)\n\nCommand line utility to standardize git commit messages, golang version. Forked from [commitizen-go](https://github.com/lintingzhen/commitizen-go).\n\nFixes some issues of commitizen-go and supports more new features.\n\n![demo](https://github.com/shipengqi/illustrations/blob/e0d588dd70551344f0394cbf6671b15ae22e7635/commitizen/demo.gif?raw=true)\n\n## Features\n\n- Multi-template support.\n- More powerful and flexible template.\n- Support more options of `git commit`.\n- Use [huh](https://github.com/charmbracelet/huh) instead of [survey](https://github.com/AlecAivazis/survey) ([survey](https://github.com/AlecAivazis/survey) is no longer maintained).\n\n## Getting Started\n\n```\nCommand line utility to standardize git commit messages.\n\nUsage:\n  commitizen\n\nAvailable Commands:\n  init        Install this tool to git-core as git-cz.\n  version     Print the CLI version information.      \n  help        Help about any command\n\nGit Commit flags:\n  -a, --all\n                commit all changed files.\n      --amend\n                amend previous commit\n      --author string\n                override author for commit\n      --date string\n                override date for commit\n      --git-flag strings\n                git flags, e.g. --git-flag=\"--branch\"\n  -n, --no-verify\n                bypass pre-commit and commit-msg hooks.                \n  -q, --quiet\n                suppress summary after successful commit\n  -s, --signoff\n                add a Signed-off-by trailer.\n  -v, --verbose\n                show diff in commit message template\n\nCommitizen flags:\n  -d, --default\n                use the default template, '--default' has a higher priority than '--template'.\n      --dry-run\n                do not create a commit, but show the message and list of paths\n                that are to be committed.\n  -t, --template string\n                template name to use when multiple templates exist.\n\nUse \"commitizen [command] --help\" for more information about a command.\n```\n\n\u003e To use more Git flags, you can use the '--git-flag' flag. Please do not conflict with other Git commit flags.\n\nCommit with commitizen:\n\n```\n$ git cz\n```\n\n## Installation\n\n### Scoop (Windows)\n\n```bash\n$ scoop bucket add czbucket https://github.com/shipengqi/scoop-bucket.git\n$ scoop install commitizen\n\n$ commitizen.exe init\n```\n\n### From the Binary Releases\n\nDownload the pre-compiled binaries from the [releases page](https://github.com/shipengqi/commitizen/releases) and copy them to the desired location.\n\nThen install this tool to git-core as git-cz:\n\n```\n$ commitizen init\n```\n\n### Go Install\n\nYou must have a working Go environment:\n\n```\n$ go install github.com/shipengqi/commitizen@latest\n$ commitizen init\n```\n\n### From Source\n\nYou must have a working Go environment:\n\n```\n$ git clone https://github.com/shipengqi/commitizen.git\n$ cd commitizen\n$ make \u0026\u0026 ./_output/$(GOOS)/$(GOARCH)/bin/commitizen init\n```\n\n## Configuration\n\nYou can set configuration file that `.czrc` at repository root, home directory, or the `$XDG_CONFIG_HOME/commitizen` directory. \n\ncommitizen uses the following precedence order. Each item takes precedence over the item below it:\n\n- per-project config file (`/path/to/my/project/.czrc`)\n- per-user config file (`~/.czrc`)\n- `$XDG_CONFIG_HOME` config file (`$XDG_CONFIG_HOME/commitizen/.czrc`)\n\nThe format is the same as the following:\n\n```yaml\nname: default\ndefault: true\ngroups:\n  - name: hasbreaking\n    depends_on:\n      and_conditions:\n        - parameter_name: page2.isbreaking\n          value_equals: true\n  - name: nobreaking\n    depends_on:\n      and_conditions:\n        - parameter_name: page2.isbreaking\n          value_equals: false\nitems:\n  - name: type\n    group: page1\n    label: \"Select the type of change that you're committing:\"\n    type: list\n    options:\n      - value: feat\n        key: \"feat:      A new feature\"\n      - value: fix\n        key: \"fix:       A bug fix\"\n      - value: docs\n        key: \"docs:      Documentation only changes\"\n      - value: test\n        key: \"test:      Adding missing or correcting existing tests\"\n      - value: chore\n        key: \"chore:     Changes to the build process or auxiliary tools and libraries such as documentation generation\"\n      - value: style\n        key: \"style:     Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)\"\n      - value: refactor\n        key: \"refactor:  A code change that neither fixes a bug nor adds a feature\"\n      - value: perf\n        key: \"perf:      A code change that improves performance\"\n      - value: revert\n        key: \"revert:    Reverts a previous commit\"\n  - name: scope\n    group: page2\n    label: \"Scope. What is the scope of this change? (class or file name):\"\n    type: string\n    trim: true\n  - name: subject\n    group: page2\n    label: \"Subject. Write a short and imperative summary of the code change (lower case and no period):\"\n    type: string\n    required: true\n    trim: true\n  - name: isbreaking\n    group: page2\n    label: \"Are there any breaking changes?\"\n    type: boolean\n  - name: hasbreakingbody\n    group: hasbreaking\n    label: \"A BREAKING CHANGE commit requires a body. Provide additional contextual information about the code changes:\"\n    type: text\n    required: true\n  - name: nobreakingbody\n    group: nobreaking\n    label: \"Body. Provide additional contextual information about the code changes:\"\n    type: text\n  - name: footer\n    group: page3\n    label: \"Footer. Information about Breaking Changes and reference issues that this commit closes:\"\n    type: text\nformat: \"{{.type}}{{with .scope}}({{.}}){{end}}: {{.subject}}{{with .hasbreakingbody}}\\n\\n{{.}}{{end}}{{with .nobreakingbody}}\\n\\n{{.}}{{end}}{{with .footer}}\\n\\n{{.}}{{end}}\"\n```\n\n### Default\n\nOptional. If true, the template will be used as the default template, note that there can only be one default template.\n\n### Format\n\nCommit message `format`:\n\n```\nformat: \"{{.type}}{{with .scope}}({{.}}){{end}}: {{.subject}}{{with .body}}\\n\\n{{.}}{{end}}{{with .footer}}\\n\\n{{.}}{{end}}\"\n```\n\n### Items\n\n#### Common Item Properties\n\n| Property    | Required | Default Value | Description                                                                                                         |\n|:------------|:---------|:--------------|:--------------------------------------------------------------------------------------------------------------------|\n| name        | yes      | -             | Unique identifier for the item.                                                                                     |\n| label       | yes      | -             | This will be used as the label for the input field in the UI.                                                       |\n| type        | yes      | -             | The type of item. Determines which UI widget is shown. See the Item Types section to see all the different options. |\n| group       | no       | -             | The name of the group this item belongs to. Separates items into groups (you can think of groups as pages).         |\n| description | no       | -             | A short description of the item for user guidance. This will be displayed along with the input field.               |\n\n#### Item Types\n\n- string\n- text\n- integer\n- boolean\n- secret\n- list\n- multi_list\n\n#### string\n\n`string` are single line text parameters.\n\nProperties:\n\n| Property      | Required | Default Value | Description                                                                                                  |\n|:--------------|:---------|:--------------|:-------------------------------------------------------------------------------------------------------------|\n| required      | no       | `false`       | Whether a string value is required or not.                                                                   |\n| fqdn          | no       | `false`       | Add a preset FQDN regex to validate string.                                                                  |\n| ip            | no       | `false`       | Add a preset IPv4/IPv6 regex to validate string.                                                             |\n| trim          | no       | `false`       | If true, will remove the leading and trailing blank characters before submit.                                |\n| default_value | no       | -             | The default value for this item.                                                                             |\n| regex         | no       | -             | A regex used to validate the string.                                                                         |\n| min_length    | no       | -             | The minimum length of the string. If the value is not required and no value has been given, this is ignored. |\n| max_length    | no       | -             | The maximum length of the string.                                                                            |\n\n#### text\n\nProperties:\n\n| Property      | Required | Default Value | Description                                                                                                |\n|:--------------|:---------|:--------------|:-----------------------------------------------------------------------------------------------------------|\n| required      | no       | `false`       | Whether the text is required or not.                                                                       |\n| height        | no       | 5             | The height of the text.                                                                                    |\n| default_value | no       | -             | The default value for this item.                                                                           |\n| regex         | no       | -             | A regex used to validate the text.                                                                         |\n| min_length    | no       | -             | The minimum length of the text. If the value is not required and no value has been given, this is ignored. |\n| max_length    | no       | -             | The maximum length of the text.                                                                            |\n\n#### integer\n\n`integer` is a number.\n\nProperties:\n\n| Property      | Required | Default Value | Description                             |\n|:--------------|:---------|:--------------|:----------------------------------------|\n| required      | no       | `false`       | Whether the integer is required or not. |\n| default_value | no       | -             | The default value for this item.        |\n| min           | no       | -             | The minimum value allowed.              |\n| max           | no       | -             | The maximum value allowed.              |\n\n#### boolean\n\n`boolean` are true or false values.\n\nProperties:\n\n| Property      | Required | Default Value | Description                      |\n|:--------------|:---------|:--------------|:---------------------------------|\n| default_value | no       | -             | The default value for this item. |\n\n#### secret\n\n`secret` is used for sensitive data that should not be echoed in the UI, for example, passwords.\n\nProperties:\n\n| Property      | Required | Default Value | Description                                                                                                  |\n|:--------------|:---------|:--------------|:-------------------------------------------------------------------------------------------------------------|\n| required      | no       | `false`       | Whether the secret is required or not.                                                                       |\n| trim          | no       | `false`       | If true, will remove the leading and trailing blank characters before submit.                                |\n| default_value | no       | -             | The default value for this item.                                                                             |\n| regex         | no       | -             | A regex used to validate the secret.                                                                         |\n| min_length    | no       | -             | The minimum length of the secret. If the value is not required and no value has been given, this is ignored. |\n| max_length    | no       | -             | The maximum length of the secret.                                                                            |\n\n#### list\n\n`list` is predefined lists of values that can be picked by the user.\n\nProperties:\n\n| Property      | Required | Default Value | Description                                                                                           |\n|:--------------|:---------|:--------------|:------------------------------------------------------------------------------------------------------|\n| required      | no       | `false`       | Whether a string value is required or not.                                                            |\n| default_value | no       | -             | The default value for this item.                                                                      |\n| options       | yes      | -             | The list of options to choose from.                                                                   |\n| height        | no       | -             | The height of the list. If the number of options exceeds the height, the list will become scrollable. |\n\n#### multi_list\n\nSimilar to `list`, but with multiple selection.\n\nProperties:\n\n| Property      | Required | Default Value | Description                                                                                           |\n|:--------------|:---------|:--------------|:------------------------------------------------------------------------------------------------------|\n| required      | no       | `false`       | Whether a string value is required or not.                                                            |\n| default_value | no       | -             | A list of default selection values.                                                                   |\n| options       | yes      | -             | The list of options to choose from.                                                                   |\n| limit         | no       | `false`       | The limit of the multiple selection list.                                                             |\n| height        | no       | -             | The height of the list. If the number of options exceeds the height, the list will become scrollable. |\n\n#### list/multi_list Options\n\nProperties:\n\n| Property | Required | Description                      |\n|:---------|:---------|:---------------------------------|\n| key      | yes      | The message shown in the UI.     |\n| value    | yes      | Unique identifier for the value. |\n\n### Groups (Optional)\n\nGroup Properties:\n\n| Property   | Required | Default Value | Description                                                                              |\n|:-----------|:---------|:--------------|:-----------------------------------------------------------------------------------------|\n| name       | yes      | -             | Unique identifier for the property.                                                      |\n| depends_on | no       | -             | If this group should only be shown when a specific condition is met on another property. |\n\nDependsOn Properties:\n\n| Property       | Required | Default Value | Description                                                                                  |\n|:---------------|:---------|:--------------|:---------------------------------------------------------------------------------------------|\n| or_conditions  | no       | `[]`          | The list of conditions in which at least one must be satisfied for the property to be shown. |\n| and_conditions | no       | `[]`          | The list of conditions in which all must be satisfied for the property to be shown.          |\n\nDependsOn Conditions:\n\n- ValueEqualsCondition\n- ValueNotEqualsCondition\n- ValueContainsCondition\n- ValueNotContainsCondition\n- ValueEmptyCondition\n\n#### ValueEqualsCondition\n\nProperties:\n\n| Property       | Required | Default Value | Description                                                                                     |\n|:---------------|:---------|:--------------|:------------------------------------------------------------------------------------------------|\n| parameter_name | yes      | -             | The name of the group that the current group is dependent upon. for example, `page2.isbreaking` |\n| value_equals   | yes      | -             | The value the target parameter must equal for this condition to be considered true.             |\n\n#### ValueNotEqualsCondition\n\nProperties:\n\n| Property         | Required | Default Value | Description                                                                             |\n|:-----------------|:---------|:--------------|:----------------------------------------------------------------------------------------|\n| parameter_name   | yes      | -             | The name of the group that the current group is dependent upon.                         |\n| value_not_equals | yes      | -             | The value the target parameter must not equal for this condition to be considered true. |\n\n#### ValueContainsCondition\n\nProperties:\n\n| Property       | Required | Default Value | Description                                                                         |\n|:---------------|:---------|:--------------|:------------------------------------------------------------------------------------|\n| parameter_name | yes      | -             | The name of the group that the current group is dependent upon.                     |\n| value_contains | yes      | -             | A value the target parameter must contain for this condition to be considered true. |\n\n#### ValueNotContainsCondition\n\nProperties:\n\n| Property           | Required | Default Value | Description                                                                             |\n|:-------------------|:---------|:--------------|:----------------------------------------------------------------------------------------|\n| parameter_name     | yes      | -             | The name of the group that the current group is dependent upon.                         |\n| value_not_contains | yes      | -             | A value the target parameter must not contain for this condition to be considered true. |\n\n#### ValueEmptyCondition\n\nProperties:\n\n| Property       | Required | Default Value | Description                                                                      |\n|:---------------|:---------|:--------------|:---------------------------------------------------------------------------------|\n| parameter_name | yes      | -             | The name of the group that the current group is dependent upon.                  |\n| value_empty    | yes      | -             | A bool value reflecting whether the expected parameter should be empty or not.   |\n\n### Multiple Templates\n\nYou can define multiple templates in the `.czrc` file, separated by `---`：\n\n```yaml\nname: angular-template\nitems:\n# ...  \nformat: \"{{.type}}{{with .scope}}({{.}}){{end}}: {{.subject}}{{with .body}}\\n\\n{{.}}{{end}}{{with .footer}}\\n\\n{{.}}{{end}}\"`\n\n---\n\nname: my-template\nitems:\n# ...  \nformat: \"{{.type}}{{with .scope}}({{.}}){{end}}: {{.subject}}{{with .body}}\\n\\n{{.}}{{end}}{{with .footer}}\\n\\n{{.}}{{end}}\"`\n```\n\n![multiple-templates](https://github.com/shipengqi/illustrations/blob/e0d588dd70551344f0394cbf6671b15ae22e7635/commitizen/multiple-templates.png?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipengqi%2Fcommitizen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshipengqi%2Fcommitizen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshipengqi%2Fcommitizen/lists"}