Pārlūkot izejas kodu

【文档】更新 README 文件并完善命令行帮助信息

- 更新 README 文件中的使用方法说明
- 完善命令行帮助信息,包括新的参数说明
- 修改 yaa.py 文件中的参数描述
PJ568 1 gadu atpakaļ
vecāks
revīzija
dba558d749
4 mainītis faili ar 31 papildinājumiem un 15 dzēšanām
  1. 15 5
      README.en.md
  2. 14 8
      README.md
  3. 1 1
      VERSION
  4. 1 1
      yaa/yaa.py

+ 15 - 5
README.en.md

@@ -19,16 +19,26 @@ git clone https://github.com/Byte-tea/yaa.git
 cd yaa
 ```
 
-Run `yaa` service:
+Usage:
 
 ```bash
-python -m yaa.yaa --serve
-```
 
-Command line interactive mode:
 
 ```bash
-python -m yaa.yaa
+# python -m yaa.yaa --help
+usage: yaa.py [-h] [--run [RUN] | --serve]
+              [--config CONFIG]
+              [--port PORT]
+
+yaa agent command line interface
+
+options:
+  -h, --help       show this help message
+                   and exit
+  --run [RUN]      send command to agent
+  --serve          server mode
+  --config CONFIG  config file
+  --port PORT      server port default 12345
 ```
 
 ## Project Implementation

+ 14 - 8
README.md

@@ -19,16 +19,22 @@ git clone https://github.com/Byte-tea/yaa.git
 cd yaa
 ```
 
-运行 `yaa` 服务:
+使用方法:
 
 ```bash
-python -m yaa.yaa --serve
-```
-
-命令行交互模式:
-
-```bash
-python -m yaa.yaa
+# python -m yaa.yaa --help
+usage: yaa.py [-h] [--run [RUN] | --serve]
+              [--config CONFIG]
+              [--port PORT]
+
+yaa 智能体命令行工具
+
+options:
+  -h, --help       显示帮助信息
+  --run [RUN]      传入命令到智能体
+  --serve          启动服务模式
+  --config CONFIG  配置文件路径
+  --port PORT      服务端口号,默认 12345
 ```
 
 ## 项目实现

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.0.0
+1.0.1

+ 1 - 1
yaa/yaa.py

@@ -19,7 +19,7 @@ def main():
 
     # 定义互斥参数组,--run 和 --serve 不能同时使用
     group = parser.add_mutually_exclusive_group()
-    group.add_argument('--run', nargs='?', const='', help='运行智能体(可选值)')
+    group.add_argument('--run', nargs='?', const='', help='传入命令到智能体')
     group.add_argument('--serve', action='store_true', help='启动服务模式')
     parser.add_argument('--config', type=str, help='配置文件路径')