Skip to content

Commit c53edfe

Browse files
authored
doc: Update README.md add output file functionality for local code reviews (#175)
1 parent 0298773 commit c53edfe

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
- Review Remote GitHub PRs Directly from Your Local CLI
2424
- Review Commit Changes with DeepSeek for Any Local Repository by CLI
2525
- Support On-demand Changes Generation via `git show`/`git diff` Command for Further Code Review
26+
- Output Code Review Result to Specified File in Markdown Format
2627
- Cross-platform Compatibility: Designed to function seamlessly across all platforms capable of running [Nushell](https://github.com/nushell/nushell)
2728

2829
### Both GH Action & Local
@@ -191,6 +192,7 @@ Flags:
191192
-x, --exclude <string>: Comma separated file patterns to exclude in the code review
192193
-T, --temperature <float>: Temperature for the model, between `0` and `2`, default value `1.0`
193194
-C, --config <string>: Config file path, default to `config.yml`
195+
-o, --output <string>: Output file path
194196
-h, --help: Display the help message for this command
195197

196198
Parameters:
@@ -242,6 +244,8 @@ To review a local repository:
242244
cr
243245
# Perform code review on the `git diff f536acc` changes in current directory
244246
cr --diff-from f536acc
247+
# Perform code review on the `git diff f536acc` changes and output result to review.md
248+
cr --diff-from f536acc --output review.md
245249
# Perform code review on the `git diff f536acc 0dd0eb5` changes in current directory
246250
cr --diff-from f536acc --diff-to 0dd0eb5
247251
# Review the changes in current directory using the `--patch-cmd` flag

README.zh-CN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- 通过本地 CLI 直接审查远程 GitHub PR
2222
- 通过本地 CLI 使用 DeepSeek 审查任何本地仓库的提交变更
2323
- 允许通过自定义 `git show`/`git diff` 命令生成变更记录并进行审查
24+
- 允许将代码审查结果以 Markdown 格式输出到指定文件
2425
- 跨平台:理论上只要能运行 [Nushell](https://github.com/nushell/nushell) 即可使用本工具
2526

2627
### 本地或 GH Action
@@ -188,6 +189,7 @@ Flags:
188189
-x, --exclude <string>: Comma separated file patterns to exclude in the code review
189190
-T, --temperature <float>: Temperature for the model, between `0` and `2`, default value `1.0`
190191
-C, --config <string>: Config file path, default to `config.yml`
192+
-o, --output <string>: Output file path
191193
-h, --help: Display the help message for this command
192194

193195
Parameters:
@@ -238,6 +240,8 @@ function cr {
238240
cr
239241
# 对本地当前目录所在仓库 `git diff f536acc` 修改内容进行代码审查
240242
cr --diff-from f536acc
243+
# 对本地当前目录所在仓库 `git diff f536acc` 修改内容进行代码审查并将审查结果输出到 review.md
244+
cr --diff-from f536acc --output review.md
241245
# 对本地当前目录所在仓库 `git diff f536acc 0dd0eb5` 修改内容进行代码审查
242246
cr --diff-from f536acc --diff-to 0dd0eb5
243247
# 通过 --patch-cmd 参数对本地当前目录所在仓库变更内容进行审查

0 commit comments

Comments
 (0)