Преглед изворни кода

【文档,自述】更新快速上手指南

- 新增部署和配置步骤说明
- 详细描述不同启动模式的使用方法
- 优化命令行参数说明
- 同步更新英文和中文版本的 README 文件
PJ568 пре 1 година
родитељ
комит
5a9ea53165
3 измењених фајлова са 83 додато и 12 уклоњено
  1. 43 8
      README.en.md
  2. 39 3
      README.md
  3. 1 1
      VERSION

+ 43 - 8
README.en.md

@@ -12,17 +12,53 @@
 
 ## Quick Start
 
+### Deployment
+
 Deploy locally:
 
 ```bash
+# Clone project repository to local
 git clone https://github.com/Byte-tea/yaa.git
+# Enter project directory
 cd yaa
 ```
 
-Usage:
+Configuration:
+
+```bash
+# Create client config file (will override default config)
+cp configs/Config.example.json Config.json
+# Create server config file (will override default config)
+cp configs/ServerConfig.example.json ServerConfig.json
+```
+
+### Usage
+
+Start in server mode:
+
+```bash
+python -m yaa.yaa --serve --config Config.json --server-config ServerConfig.json
+```
+
+Start in interactive CLI mode:
+
+```bash
+python -m yaa.yaa --config Config.json
+> Please write a bubble sort algorithm in Python.
+* Working on it...
+```
+
+Run single command:
+
+```bash
+python -m yaa.yaa --run 'Please write a bubble sort algorithm in Python.' --config Config.json
+* Working on it...
+```
+
+More usage:
 
 ```bash
-# python -m yaa.yaa --help
+# Run: python -m yaa.yaa --help
 usage: yaa.py [-h] [--run [RUN] | --serve]
               [--config CONFIG]
               [--port PORT]
@@ -30,12 +66,11 @@ usage: yaa.py [-h] [--run [RUN] | --serve]
 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
+  -h, --help        show this help message and exit
+  --run [RUN]       send command to agent
+  --serve           server mode
+  --config CONFIG   config file path
+  --port PORT       server port number, default 12345
 ```
 
 ## Project Implementation

+ 39 - 3
README.md

@@ -12,17 +12,53 @@
 
 ## 快速上手
 
-部署到本地:
+### 部署
+
+拉取到本地:
 
 ```bash
+# 拉取项目仓库到本地
 git clone https://github.com/Byte-tea/yaa.git
+# 进入项目目录
 cd yaa
 ```
 
-使用方法:
+配置:
+
+```bash
+# 创建客户端相关配置文件,传入时会覆盖默认配置
+cp configs/Config.example.json Config.json
+# 创建服务端相关配置文件,传入时会覆盖默认配置
+cp configs/ServerConfig.example.json ServerConfig.json
+```
+
+### 使用
+
+以服务模式启动:
+
+```bash
+python -m yaa.yaa --serve --config Config.json --server-config ServerConfig.json
+```
+
+以命令行交互模式启动:
+
+```bash
+python -m yaa.yaa --config Config.json
+> 请用 Python 写一个冒泡排序算法。
+* 好的……
+```
+
+单行命令交互:
+
+```bash
+python -m yaa.yaa --run '请用 Python 写一个冒泡排序算法。' --config Config.json
+* 好的……
+```
+
+更多使用方法:
 
 ```bash
-# python -m yaa.yaa --help
+# 执行:python -m yaa.yaa --help
 usage: yaa.py [-h] [--run [RUN] | --serve]
               [--config CONFIG]
               [--port PORT]

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.1.0
+1.1.1