7 releases
0.1.8 | Sep 29, 2024 |
---|---|
0.1.7 | Sep 28, 2024 |
0.1.0 | Mar 18, 2024 |
#1861 in Command line utilities
372 downloads per month
73KB
2K
SLoC
Revise
Interactive CLI that generate standardized git commit messages
Explore the docs
·
Report Bug
·
Request Feature
About The Project
Revise is an interactive command-line interface (CLI) tool that generates standardized git commit messages. It allows you to amend and enhance your commit messages, making them more informative and clear.
Getting Started
Example
To use git-revise, you have the option to create a toml file called revise.toml
in the project directory or your local config directory. This file allows you to customize the configuration settings for git-revise. However, it's important to note that you can still use git-revise without creating these files, as it will use the default configuration.
For example, you can configure git-revise by creating a revise.toml file with the following content:
types = [
{ key= "feat", value= "A new feature"},
{ key= "fix", value= "A bug fix"},
{ key= "docs", value= "Documentation only changes"},
{ key= "style", value= "Changes that do not affect the meaning of the code"},
{ key= "refactor", value= "A code change that neither fixes a bug nor adds a feature"},
{ key= "perf", value= "A code change that improves performance"},
{ key= "test", value= "Adding missing tests or correcting existing tests"},
{ key= "build", value= "Changes that affect the build system or external dependencies"},
{ key= "ci", value= "Changes to our CI configuration files and scripts"},
{ key= "chore", value= "Other changes that don't modify src or test files"},
{ key= "revert", value= "Reverts a previous commit"}
]
emojis = [
{ key= "feat", value="✨"},
{ key= "fix", value="🐛"},
{ key= "docs", value="📚"},
{ key= "style", value="🎨"},
{ key= "refactor", value="♻️"},
{ key= "perf", value="⚡️"},
{ key= "test", value="✅"},
{ key= "build", value="📦️"},
{ key= "ci", value="🪶"},
{ key= "chore", value="🔨"},
{ key= "revert", value="◀️"}
]
api_key.gemini_key = "{{env}}"
scopes = [
"revise",
"config",
"test",
"docs"
]
exclude_files = [
"CHANGELOG.md"
]
template = """
{{commit_icon}} {{ commit_type }}{% if commit_scope %}({{commit_scope}}){% endif %}{% if commit_breaking %}{{commit_breaking_symbol}}{% endif %}: {{ commit_subject }}{% if commit_issue %}({{commit_issue}}){% endif %}
{% if commit_body %}\n{{ commit_body }}{% endif %}
{% if commit_breaking %}\n{{ commit_breaking }}{% endif %}
"""
[translation]
from = "中文"
to = "English"
[auto]
[auto.git]
add = false
push = false
diff = false
footer = false
[auto.commit]
content = false
footer = false
[hooks]
pre-add = [
{ command = "cargo clippy --fix --allow-dirty --allow-staged", order = 1 },
{ command = "cargo make", order = 2 },
]
post-add = [
{ command = "git status", order = 1 },
]
pre-commit = [
]
post-commit = [
]
Prerequisites
This is an example of how to list things you need to use the software and how to install them.
- git
- gemini-api-key
Installation
In order to install, just run the following command
cargo install --force git-revise
This will install git-revise in your ~/.cargo/bin
.
Make sure to add ~/.cargo/bin
directory to your PATH
variable.
Usage
You can use it simply type
git revise
or
git-revise
Roadmap
- Auto add and show diff
- AI integrated
- Auto translate to english
- Auto generate with git diff
- More configurable
See the open issues for a full list of proposed features (and known issues).
License
Distributed under the GPL-3.0 License. See LICENSE
for more information.
Dependencies
~23–41MB
~618K SLoC