Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fastcommit"
version = "0.4.0"
version = "0.5.0"
description = "AI-based command line tool to quickly generate standardized commit messages."
edition = "2021"
authors = ["longjin <fslongjin@vip.qq.com>"]
Expand All @@ -25,3 +25,5 @@ tokio = { version = "1.43.0", features = ["full"] }
rand = "0.8.5"
indicatif = "0.17.8"
toml = "0.8.20"
unicode-width = "0.2.0"
terminal_size = "0.4.0"
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ You can install `fastcommit` using the following method:

```bash
# Install using cargo
cargo install --git https://github.com/fslongjin/fastcommit --tag v0.4.0
cargo install --git https://github.com/fslongjin/fastcommit --tag v0.5.0
```


## Usage

### Basic Usage
Expand All @@ -35,6 +36,8 @@ NOTE: All common config can be configured via `~/.fastcommit/config.toml`
- `-v, --verbosity <VERBOSITY>`: Set the detail level of the commit message. Acceptable values are `verbose` (detailed), `normal`, or `quiet` (concise). The default is `quiet`.
- `-p, --prompt <PROMPT>`: Additional prompt to help AI understand the commit context.
- `-r, --range <RANGE>`: Specify diff range for generating commit message (e.g. HEAD~1, abc123..def456).
- `--no-wrap`: Disable text wrapping for long lines.
- `--wrap-width <WIDTH>`: Set custom line width for text wrapping (default: config file setting or 80).
- `-h, --help`: Print help information.
- `-V, --version`: Print version information.

Expand Down Expand Up @@ -86,6 +89,19 @@ NOTE: All common config can be configured via `~/.fastcommit/config.toml`
fastcommit -r abc123..def456
```

8. Control text wrapping behavior:

```bash
# Disable text wrapping
fastcommit --no-wrap

# Set custom line width
fastcommit --wrap-width 60

# Combine with other options
fastcommit -b -m --wrap-width 100
```

## Contributing

Contributions of code or suggestions are welcome! Please read the [Contributing Guide](CONTRIBUTING.md) first.
Expand Down
17 changes: 16 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

```bash
# 使用 cargo 安装
cargo install --git https://github.com/fslongjin/fastcommit --tag v0.4.0
cargo install --git https://github.com/fslongjin/fastcommit --tag v0.5.0
```

## 使用
Expand All @@ -33,6 +33,8 @@ NOTE: All common config can be configured via `~/.fastcommit/config.toml`
- `-v, --verbosity <VERBOSITY>`: 设置提交信息的详细级别。可选值为 `verbose`(详细)、`normal`(正常)或 `quiet`(简洁)。 默认为 `quiet`。
- `-p, --prompt <PROMPT>`: 额外的提示信息,帮助 AI 理解提交上下文。
- `-r, --range <RANGE>`: 指定差异范围以生成提交信息(例如:HEAD~1, abc123..def456)。
- `--no-wrap`: 禁用长行文本换行。
- `--wrap-width <WIDTH>`: 设置文本换行的自定义行宽度(默认:配置文件设置或 80)。
- `-h, --help`: 打印帮助信息。
- `-V, --version`: 打印版本信息。

Expand Down Expand Up @@ -84,6 +86,19 @@ NOTE: All common config can be configured via `~/.fastcommit/config.toml`
fastcommit -r abc123..def456
```

8. 控制文本换行行为:

```bash
# 禁用文本换行
fastcommit --no-wrap

# 设置自定义行宽度
fastcommit --wrap-width 60

# 与其他选项组合使用
fastcommit -b -m --wrap-width 100
```

## 贡献

欢迎贡献代码或提出建议!请先阅读 [贡献指南](CONTRIBUTING.md)。
Expand Down
Loading