@renxqoo/renx-code 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,91 +1,112 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Renx
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`renx` is a terminal AI coding assistant.
|
|
4
|
+
|
|
5
|
+
- npm package: `@renxqoo/renx-code`
|
|
6
|
+
- command: `renx`
|
|
7
|
+
|
|
8
|
+
## 安装
|
|
9
|
+
|
|
10
|
+
先确认已经安装 `Bun`,因为当前 CLI 运行时依赖 `Bun`:
|
|
4
11
|
|
|
5
12
|
```bash
|
|
6
|
-
bun
|
|
13
|
+
bun --version
|
|
7
14
|
```
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
如果还没有安装 Bun,请先安装:
|
|
17
|
+
|
|
18
|
+
- [https://bun.sh](https://bun.sh)
|
|
10
19
|
|
|
11
|
-
|
|
12
|
-
- `@opentui/react`: `0.1.84`
|
|
13
|
-
- `react`: `19.2.4`
|
|
20
|
+
然后全局安装 `renx`:
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
```bash
|
|
23
|
+
npm i -g @renxqoo/renx-code --registry=https://registry.npmjs.org
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
安装完成后,直接运行:
|
|
16
27
|
|
|
17
28
|
```bash
|
|
18
|
-
|
|
29
|
+
renx
|
|
19
30
|
```
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
## 如何使用
|
|
33
|
+
|
|
34
|
+
在任意项目目录打开终端后执行:
|
|
22
35
|
|
|
23
36
|
```bash
|
|
24
|
-
|
|
37
|
+
renx
|
|
25
38
|
```
|
|
26
39
|
|
|
27
|
-
|
|
40
|
+
`renx` 会默认把当前终端所在目录当作工作目录。
|
|
28
41
|
|
|
29
|
-
|
|
30
|
-
- Built-in commands: `/help`, `/clear`, `/exit`
|
|
31
|
-
- Keyboard shortcuts: `Esc` (stop current response when thinking, otherwise clear input), `Ctrl+L` (clear conversation)
|
|
32
|
-
- Simulated async agent reply flow
|
|
42
|
+
常见使用方式:
|
|
33
43
|
|
|
34
|
-
|
|
44
|
+
- 在项目目录中直接运行 `renx`
|
|
45
|
+
- 让它阅读代码、解释代码、修改文件、排查错误
|
|
46
|
+
- 在当前工作目录下执行开发任务
|
|
35
47
|
|
|
36
|
-
|
|
48
|
+
内置命令:
|
|
37
49
|
|
|
38
|
-
|
|
50
|
+
- `/help`
|
|
51
|
+
- `/clear`
|
|
52
|
+
- `/exit`
|
|
39
53
|
|
|
40
|
-
|
|
54
|
+
常用快捷键:
|
|
41
55
|
|
|
42
|
-
|
|
56
|
+
- `Esc`:正在生成时停止响应,否则清空当前输入
|
|
57
|
+
- `Ctrl + L`:清空当前会话内容
|
|
43
58
|
|
|
44
|
-
|
|
45
|
-
2. Project config: `<workspace>/.renx/config.json`
|
|
46
|
-
3. Global config: `RENX_HOME/config.json`
|
|
47
|
-
4. Built-in defaults
|
|
59
|
+
## 配置说明
|
|
48
60
|
|
|
49
|
-
|
|
61
|
+
`renx` 使用统一配置系统,优先级如下:
|
|
50
62
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- `RENX_HOME/task/` for task data
|
|
56
|
-
- `RENX_HOME/data.db` for the shared SQLite database
|
|
63
|
+
1. 当前进程环境变量,以及 `.env` / `.env.development`
|
|
64
|
+
2. 项目配置:`<workspace>/.renx/config.json`
|
|
65
|
+
3. 全局配置:`RENX_HOME/config.json`
|
|
66
|
+
4. 内置默认值
|
|
57
67
|
|
|
58
|
-
|
|
68
|
+
默认情况下,`renx` 会把用户级数据放到:
|
|
59
69
|
|
|
60
|
-
|
|
70
|
+
- `RENX_HOME`,默认是 `~/.renx`
|
|
71
|
+
- `RENX_HOME/config.json`:全局配置
|
|
72
|
+
- `RENX_HOME/logs/`:日志目录
|
|
73
|
+
- `RENX_HOME/storage/`:文件历史存储
|
|
74
|
+
- `RENX_HOME/task/`:任务数据
|
|
75
|
+
- `RENX_HOME/data.db`:SQLite 数据库
|
|
61
76
|
|
|
62
|
-
|
|
63
|
-
- `AGENT_MODEL`: default model id
|
|
64
|
-
- `AGENT_MAX_STEPS`: max steps per run
|
|
65
|
-
- `AGENT_MAX_RETRY_COUNT`: agent retry count
|
|
66
|
-
- `AGENT_TOOL_CONFIRMATION_MODE`: `manual`, `auto-approve`, or `auto-deny`
|
|
67
|
-
- `AGENT_CONVERSATION_ID`: fixed conversation id for the CLI runtime
|
|
68
|
-
- `AGENT_SESSION_ID`: fallback session id when `AGENT_CONVERSATION_ID` is unset
|
|
77
|
+
## 环境变量
|
|
69
78
|
|
|
70
|
-
|
|
79
|
+
运行相关:
|
|
71
80
|
|
|
72
|
-
- `
|
|
73
|
-
- `
|
|
74
|
-
- `
|
|
75
|
-
- `
|
|
81
|
+
- `RENX_HOME`
|
|
82
|
+
- `AGENT_MODEL`
|
|
83
|
+
- `AGENT_MAX_STEPS`
|
|
84
|
+
- `AGENT_MAX_RETRY_COUNT`
|
|
85
|
+
- `AGENT_TOOL_CONFIRMATION_MODE`
|
|
86
|
+
- `AGENT_CONVERSATION_ID`
|
|
87
|
+
- `AGENT_SESSION_ID`
|
|
76
88
|
|
|
77
|
-
|
|
89
|
+
日志相关:
|
|
90
|
+
|
|
91
|
+
- `AGENT_LOG_LEVEL`
|
|
92
|
+
- `AGENT_LOG_FORMAT`
|
|
93
|
+
- `AGENT_LOG_CONSOLE`
|
|
94
|
+
- `AGENT_LOG_FILE_ENABLED`
|
|
95
|
+
|
|
96
|
+
文件历史相关:
|
|
78
97
|
|
|
79
98
|
- `AGENT_FILE_HISTORY_ENABLED`
|
|
80
99
|
- `AGENT_FILE_HISTORY_MAX_PER_FILE`
|
|
81
100
|
- `AGENT_FILE_HISTORY_MAX_AGE_DAYS`
|
|
82
101
|
- `AGENT_FILE_HISTORY_MAX_TOTAL_MB`
|
|
83
102
|
|
|
84
|
-
|
|
103
|
+
模型供应商 API Key 仍然通过各自环境变量提供,例如:
|
|
85
104
|
|
|
86
|
-
|
|
105
|
+
- `GLM_API_KEY`
|
|
87
106
|
|
|
88
|
-
|
|
107
|
+
## 配置文件示例
|
|
108
|
+
|
|
109
|
+
项目级或全局配置都使用相同 JSON 结构:
|
|
89
110
|
|
|
90
111
|
```json
|
|
91
112
|
{
|
|
@@ -111,4 +132,14 @@ Global and project config files use the same JSON structure:
|
|
|
111
132
|
}
|
|
112
133
|
```
|
|
113
134
|
|
|
114
|
-
|
|
135
|
+
项目配置示例路径:
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
your-project/.renx/config.json
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
全局配置示例路径:
|
|
142
|
+
|
|
143
|
+
```text
|
|
144
|
+
~/.renx/config.json
|
|
145
|
+
```
|