@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.
Files changed (2) hide show
  1. package/README.md +82 -51
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,91 +1,112 @@
1
- # OpenTUI Agent CLI (React + Bun)
1
+ # Renx
2
2
 
3
- Initialized from the latest OpenTUI React template:
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 create tui --template react opentui-agent-cli
13
+ bun --version
7
14
  ```
8
15
 
9
- Current package versions:
16
+ 如果还没有安装 Bun,请先安装:
17
+
18
+ - [https://bun.sh](https://bun.sh)
10
19
 
11
- - `@opentui/core`: `0.1.84`
12
- - `@opentui/react`: `0.1.84`
13
- - `react`: `19.2.4`
20
+ 然后全局安装 `renx`:
14
21
 
15
- ## Run
22
+ ```bash
23
+ npm i -g @renxqoo/renx-code --registry=https://registry.npmjs.org
24
+ ```
25
+
26
+ 安装完成后,直接运行:
16
27
 
17
28
  ```bash
18
- bun dev
29
+ renx
19
30
  ```
20
31
 
21
- Optional hot reload (less stable for interactive TUI signal handling):
32
+ ## 如何使用
33
+
34
+ 在任意项目目录打开终端后执行:
22
35
 
23
36
  ```bash
24
- bun run dev:watch
37
+ renx
25
38
  ```
26
39
 
27
- ## What is implemented
40
+ `renx` 会默认把当前终端所在目录当作工作目录。
28
41
 
29
- - Agent-style CLI chat layout (header, conversation panel, prompt input)
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
- ## Main file
44
+ - 在项目目录中直接运行 `renx`
45
+ - 让它阅读代码、解释代码、修改文件、排查错误
46
+ - 在当前工作目录下执行开发任务
35
47
 
36
- - `src/index.tsx`
48
+ 内置命令:
37
49
 
38
- ## Configuration
50
+ - `/help`
51
+ - `/clear`
52
+ - `/exit`
39
53
 
40
- OpenTUI Agent CLI uses the shared Renx config system.
54
+ 常用快捷键:
41
55
 
42
- Effective precedence is:
56
+ - `Esc`:正在生成时停止响应,否则清空当前输入
57
+ - `Ctrl + L`:清空当前会话内容
43
58
 
44
- 1. Existing process environment variables plus values loaded from `.env` / `.env.development`
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
- Directory-related state is managed from a single root:
61
+ `renx` 使用统一配置系统,优先级如下:
50
62
 
51
- - `RENX_HOME` defaults to `~/.renx`
52
- - `RENX_HOME/config.json` for global config
53
- - `RENX_HOME/logs/` for log files
54
- - `RENX_HOME/storage/` for file-history storage
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
- ## Supported Environment Variables
68
+ 默认情况下,`renx` 会把用户级数据放到:
59
69
 
60
- Application/runtime variables:
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
- - `RENX_HOME`: overrides the user-level Renx home directory
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
- Logging variables:
79
+ 运行相关:
71
80
 
72
- - `AGENT_LOG_LEVEL`: `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, or `FATAL`
73
- - `AGENT_LOG_FORMAT`: `pretty` or `json`
74
- - `AGENT_LOG_CONSOLE`: enable/disable console logging
75
- - `AGENT_LOG_FILE_ENABLED`: enable/disable file logging
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
- File history variables:
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
- Model provider API keys are still provided through their own env vars such as `GLM_API_KEY`.
103
+ 模型供应商 API Key 仍然通过各自环境变量提供,例如:
85
104
 
86
- ## Config File Shape
105
+ - `GLM_API_KEY`
87
106
 
88
- Global and project config files use the same JSON structure:
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
- There are no per-directory config fields anymore. All user-level paths are derived from `RENX_HOME`.
135
+ 项目配置示例路径:
136
+
137
+ ```text
138
+ your-project/.renx/config.json
139
+ ```
140
+
141
+ 全局配置示例路径:
142
+
143
+ ```text
144
+ ~/.renx/config.json
145
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@renxqoo/renx-code",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "module": "src/index.tsx",
5
5
  "type": "module",
6
6
  "private": false,