Skip to content

Commit c971121

Browse files
committed
docs: update readme for new precommit modification
1 parent d61a377 commit c971121

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ If you're looking to contribute or set up a development environment:
9494

9595
### Configuring RepoAgent
9696

97-
You can use RepoAgent with OpenAI API for the moment.
97+
Before configuring specific parameters for RepoAgent, please ensure that the OpenAI API is configured as an environment variable in the command line:
9898

9999
```sh
100100
export OPENAI_API_KEY=YOUR_API_KEY # on Linux/Mac
101101
set OPENAI_API_KEY=YOUR_API_KEY # on Windows
102102
$Env:OPENAI_API_KEY = "YOUR_API_KEY" # on Windows (PowerShell)
103103
```
104104

105-
Use `repoagent configure` if you need to running parameters.
105+
Use `repoagent configure` if you need to modify the running parameters.
106106

107107
```sh
108108
Enter the path to target repository:
@@ -132,7 +132,7 @@ The run command supports the following optional flags (if set, will override con
132132
- `-t`, `--temperature` FLOAT: Sets the generation temperature for the model. Lower values make the model more deterministic. Default: `0.2`
133133
- `-r`, `--request-timeout` INTEGER: Defines the timeout in seconds for the API request. Default: `60`
134134
- `-b`, `--base-url` TEXT: The base URL for the API calls. Default: `https://api.openai.com/v1`
135-
- `-tp`, `--target-repo-path` PATH: The file system path to the target repository. Used as the root for documentation generation. Default: `/home/test/arno`
135+
- `-tp`, `--target-repo-path` PATH: The file system path to the target repository. Used as the root for documentation generation. Default: `path/to/your/target/repository`
136136
- `-hp`, `--hierarchy-path` TEXT: The name or path for the project hierarchy file, used to organize documentation structure. Default: `.project_doc_record`
137137
- `-mdp`, `--markdown-docs-path` TEXT: The folder path where Markdown documentation will be stored or generated. Default: `markdown_docs`
138138
- `-i`, `--ignore-list` TEXT: A list of files or directories to ignore during documentation generation, separated by commas.
@@ -143,9 +143,9 @@ The run command supports the following optional flags (if set, will override con
143143
You can also try the following feature
144144

145145
```sh
146-
repo_agent clean # Remove repoagent-related cache
147-
repo_agent print-hierarchy # Print how repo-agent parse the target repo
148-
repo_agent diff # Check what docs will be updated/generated based on current code change
146+
repoagent clean # Remove repoagent-related cache
147+
repoagent print-hierarchy # Print how repo-agent parse the target repo
148+
repoagent diff # Check what docs will be updated/generated based on current code change
149149
```
150150

151151
If it's your first time generating documentation for the target repository, RepoAgent will automatically create a JSON file maintaining the global structure information and a folder named Markdown_Docs in the root directory of the target repository for storing documents.
@@ -176,6 +176,7 @@ repos:
176176
name: RepoAgent
177177
entry: repoagent
178178
language: system
179+
pass_filenames: false # prevent from passing filenames to the hook
179180
# You can specify the file types that trigger the hook, but currently only python is supported.
180181
types: [python]
181182
```

README_CN.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ pip install repoagent
9393

9494
### 配置RepoAgent
9595

96-
当前可以可以配置 OpenAI API 来使用 RepoAgent
96+
在配置RepoAgent具体参数之前,请先确保已经在命令行配置 OpenAI API 作为环境变量:
9797

9898
```sh
9999
export OPENAI_API_KEY=YOUR_API_KEY # on Linux/Mac
100+
100101
set OPENAI_API_KEY=YOUR_API_KEY # on Windows
101102
$Env:OPENAI_API_KEY = "YOUR_API_KEY" # on Windows (PowerShell)
102103
```
@@ -124,7 +125,7 @@ run 命令支持以下可选标志(如果设置,将覆盖配置默认值)
124125
- `-t`, `--temperature` FLOAT:设置模型的生成温度。较低的值使模型更确定性。默认值:`0.2`
125126
- `-r`, `--request-timeout` INTEGER:定义 API 请求的超时时间(秒)。默认值:`60`
126127
- `-b`, `--base-url` TEXT:API 调用的基础 URL。默认值:`https://api.openai.com/v1`
127-
- `-tp`, `--target-repo-path` PATH:目标仓库的文件系统路径。用作文档生成的根路径。默认值:`/home/test/arno`
128+
- `-tp`, `--target-repo-path` PATH:目标仓库的文件系统路径。用作文档生成的根路径。默认值:`path/to/your/target/repository`
128129
- `-hp`, `--hierarchy-path` TEXT:项目层级文件的名称或路径,用于组织文档结构。默认值:`.project_doc_record`
129130
- `-mdp`, `--markdown-docs-path` TEXT:Markdown 文档将被存储或生成的文件夹路径。默认值:`markdown_docs`
130131
- `-i`, `--ignore-list` TEXT:在文档生成过程中要忽略的文件或目录列表,用逗号分隔。
@@ -135,11 +136,11 @@ run 命令支持以下可选标志(如果设置,将覆盖配置默认值)
135136

136137
```sh
137138
repoagent clean # 此命令将删除与repoagent相关的缓存
138-
repoagent print # 此命令将打印repo-agent如何解析目标仓库
139+
repoagent print-hierarchy # 此命令将打印repoagent解析出的目标仓库
139140
repoagent diff # 此命令将检查基于当前代码更改将更新/生成哪些文档
140141
```
141142

142-
如果您是第一次对目标仓库生成文档,此时RepoAgent会自动生成一个维护全局结构信息的json文件,并在目标仓库根目录下创建一个名为Markdown_Docs的文件夹,用于存放文档
143+
如果您是第一次对目标仓库生成文档,此时RepoAgent会自动生成一个维护全局结构信息的json文件,并在目标仓库根目录下创建一个文件夹用于存放文档
143144
全局结构信息json文件和文档文件夹的路径都可以在`config.yml`中进行配置。
144145

145146
当您首次完成对目标仓库生成全局文档后,或您clone下来的项目已经包含了全局文档信息后,就可以通过**pre-commit**配置目标仓库**hook**和团队一起无缝自动维护一个项目内部文档了!
@@ -165,6 +166,7 @@ repos:
165166
name: RepoAgent
166167
entry: repoagent
167168
language: system
169+
pass_filenames: false # 阻止pre commit传入文件名作为参数
168170
# 可以指定钩子触发的文件类型,但是目前只支持python
169171
types: [python]
170172
```

0 commit comments

Comments
 (0)