@foxden-app/foxclaw 0.2.6 → 0.2.7
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 +299 -297
- package/README_EN.md +299 -297
- package/dist/controller/controller.js +1 -1
- package/dist/controller/presentation.js +25 -15
- package/dist/i18n.d.ts +58 -58
- package/dist/i18n.js +58 -58
- package/docs/agent-assisted-install.md +84 -84
- package/docs/install-for-beginners.md +282 -282
- package/docs/troubleshooting.md +236 -236
- package/docs/zh/agent-assisted-install.md +83 -0
- package/docs/zh/foxclaw-skill.md +24 -0
- package/docs/zh/install-for-beginners.md +295 -0
- package/docs/zh/troubleshooting.md +222 -0
- package/package.json +2 -1
- package/scripts/doctor.sh +0 -0
- package/scripts/launchd/install.sh +0 -0
- package/scripts/status.sh +4 -4
- package/scripts/systemd/install.sh +4 -4
- package/scripts/systemd/uninstall.sh +4 -4
package/README.md
CHANGED
|
@@ -1,297 +1,299 @@
|
|
|
1
|
-
中文 | [English](./README_EN.md)
|
|
2
|
-
|
|
3
|
-
# 🦊 FoxClaw · 狸爪
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
FoxClaw
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
foxclaw
|
|
53
|
-
foxclaw
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
foxclaw
|
|
63
|
-
foxclaw
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
|
150
|
-
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
- `/
|
|
240
|
-
- `/
|
|
241
|
-
- `/
|
|
242
|
-
- `/
|
|
243
|
-
- `/
|
|
244
|
-
- `/
|
|
245
|
-
- `/
|
|
246
|
-
- `/
|
|
247
|
-
- `/
|
|
248
|
-
- `/
|
|
249
|
-
- `/
|
|
250
|
-
- `/
|
|
251
|
-
- `/
|
|
252
|
-
- `/
|
|
253
|
-
- `/
|
|
254
|
-
- `/
|
|
255
|
-
- `/
|
|
256
|
-
- `/
|
|
257
|
-
- `/
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
foxclaw
|
|
292
|
-
foxclaw
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
1
|
+
中文 | [English](./README_EN.md)
|
|
2
|
+
|
|
3
|
+
# 🦊 FoxClaw · 狸爪
|
|
4
|
+
|
|
5
|
+
**狸爪:一个更适配编程需求的移动端 Codex 控制器。**
|
|
6
|
+
|
|
7
|
+
FoxClaw(狸爪)的目标很直接:让你用手机控制本机的 Codex,把移动端变成一个真正能用的 web coding 入口。Telegram 或微信负责交互,`codex app-server` 负责本地执行;你发任务、看进度、批审批、切线程,Codex 在电脑上继续写代码。
|
|
8
|
+
|
|
9
|
+
这适合你离开办公桌去吃饭、在旅途中、在跑步机上,或者陪小孩逛公园的时候继续工作。人可以离开电脑,Codex 不必停;它会把关键进展、错误、审批请求和最终结果同步回手机。
|
|
10
|
+
|
|
11
|
+
不需要公网服务器。FoxClaw 跑在你自己的电脑上,代码、shell、认证、审批和运行数据都留在本机,只把你允许的操作入口暴露给受信任的聊天账号。
|
|
12
|
+
|
|
13
|
+
## 为什么是 FoxClaw
|
|
14
|
+
|
|
15
|
+
**为什么选 Codex 作为底层引擎?**
|
|
16
|
+
|
|
17
|
+
1. **开源且接口完整** — Codex 是 OpenAI 开源的 CLI agent,并提供 `codex app-server`。FoxClaw 不是模拟终端输入,而是通过更完整的接口读取线程、切换模型、处理审批和恢复会话。
|
|
18
|
+
2. **当前编码体验强** — FoxClaw 直接读取你本机 Codex 可用的模型列表;如果你的 Codex 环境已经有 GPT-5.5,就可以在手机端选择和使用它。对高强度编程工作流来说,Codex/GPT-5.5 的体感已经是很多人优先选择它的原因。
|
|
19
|
+
3. **多账号额度切换** — 免费额度、一个月 Plus/Team 试用、多账号小额度都可以纳入本地 `auth.json_*` 候选。5 小时限制一到,FoxClaw 自动切换下一个可用账号、重启 app-server 并重试刚才的请求。
|
|
20
|
+
|
|
21
|
+
**适合这些场景:**
|
|
22
|
+
|
|
23
|
+
- 🍜 离开办公桌去吃饭,Codex 继续编码,有审批需求时手机上点一下
|
|
24
|
+
- 🚶 通勤路上、旅途中,不用打开电脑也能下发任务、查看进展、继续调试
|
|
25
|
+
- 🏃 在跑步机上、陪小孩逛公园,持续监控 Codex 的编码进程
|
|
26
|
+
- 🔒 代码、shell、认证、审批、运行数据全部留在本机,不暴露到公网
|
|
27
|
+
- 👤 只允许一个受信任的 Telegram 用户远程操作
|
|
28
|
+
|
|
29
|
+
## 从这里开始
|
|
30
|
+
|
|
31
|
+
- 手头有 Codex、OpenClaw、QwenPaw、Hermes、OpenCode、Kimi CLI 之类能跑 shell 的 agent?推荐走 [Agent 辅助安装](./docs/zh/agent-assisted-install.md)。
|
|
32
|
+
- 对 Node、Telegram 机器人、Codex CLI 不太熟?看 [新手安装指南](./docs/zh/install-for-beginners.md)。
|
|
33
|
+
- Git、Node、`.env` 都玩得转?直接往下看快速设置。
|
|
34
|
+
- 卡住了?看 [故障排查](./docs/zh/troubleshooting.md)。
|
|
35
|
+
|
|
36
|
+
最低要求:一个 Telegram bot token、你的 Telegram 数字用户 ID、Node.js 24、一份已登录的 `codex` CLI。首次安装大约 10–20 分钟。
|
|
37
|
+
|
|
38
|
+
**30 秒体验**:启动 FoxClaw 后,给你的 Telegram 机器人发一句 `List files in DEFAULT_CWD`。Codex 会在本地检查那个目录,然后把结果发回 Telegram。
|
|
39
|
+
|
|
40
|
+
## 环境要求
|
|
41
|
+
|
|
42
|
+
- macOS 或 Linux,`codex` CLI 可用
|
|
43
|
+
- Codex 已完成登录认证
|
|
44
|
+
- Node.js 24+
|
|
45
|
+
- 一个 `@BotFather` 创建的 Telegram bot token
|
|
46
|
+
- 你的 Telegram 数字用户 ID
|
|
47
|
+
|
|
48
|
+
## 快速设置
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install -g @foxden-app/foxclaw
|
|
52
|
+
foxclaw init
|
|
53
|
+
$EDITOR ~/.foxclaw/.env
|
|
54
|
+
foxclaw doctor
|
|
55
|
+
foxclaw start
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
pnpm 用户:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pnpm add -g @foxden-app/foxclaw
|
|
62
|
+
foxclaw init
|
|
63
|
+
$EDITOR ~/.foxclaw/.env
|
|
64
|
+
foxclaw doctor
|
|
65
|
+
foxclaw start
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
跑 `doctor` 或 `start` 之前先把 `.env` 填好。私聊模式最小配置:
|
|
69
|
+
|
|
70
|
+
```dotenv
|
|
71
|
+
TG_BOT_TOKEN=123456:telegram-token
|
|
72
|
+
TG_ALLOWED_USER_ID=123456789
|
|
73
|
+
DEFAULT_CWD=/absolute/path/to/workspace
|
|
74
|
+
DEFAULT_APPROVAL_POLICY=on-request
|
|
75
|
+
DEFAULT_SANDBOX_MODE=workspace-write
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
配置文件默认在 `~/.foxclaw/.env`。想放别处的话设 `FOXCLAW_ENV=/path/to/.env`。
|
|
79
|
+
|
|
80
|
+
`foxclaw start` 会自动检查环境并安装/重启后台服务,幂等操作,升级后再跑一次就行。
|
|
81
|
+
|
|
82
|
+
FoxClaw 只响应 `TG_ALLOWED_USER_ID` 的消息——把机器人拉进群不代表群里所有人都能用。
|
|
83
|
+
|
|
84
|
+
<details>
|
|
85
|
+
<summary>FoxClaw 能做什么</summary>
|
|
86
|
+
|
|
87
|
+
**核心能力:**
|
|
88
|
+
- 通过 Telegram 私聊、群组、话题控制本地 Codex
|
|
89
|
+
- 可选微信/iLink 通道,复用同一套桥接核心
|
|
90
|
+
- 手机上完整管理 Codex 线程生命周期:创建、重命名、归档、fork、回滚、compact、review、diff
|
|
91
|
+
- 命令、文件变更、细粒度权限审批的内联按钮——手机上一键审批
|
|
92
|
+
- MCP elicitation 卡片——工具在 turn 中提出结构化问题时展示
|
|
93
|
+
|
|
94
|
+
**多账号管理:**
|
|
95
|
+
- Codex 账户管理:`/account`、`/quota`、`/login_device`、`/auth add <name>`
|
|
96
|
+
- 触发用量限制时自动在本地 `auth.json_*` 之间切换认证——5 小时限制到了自动换号
|
|
97
|
+
- `/auth` 面板查看、启用、禁用、切换候选账号
|
|
98
|
+
|
|
99
|
+
**线程与会话:**
|
|
100
|
+
- `/threads`、`/open`、`/new`、`/where`、`/interrupt`——稳定的聊天-线程绑定
|
|
101
|
+
- 每个聊天独立的设置面板:模型、reasoning effort、Fast tier、access preset、Agent/Plan 模式
|
|
102
|
+
- Skills、MCP、hooks、plugins、apps、feature flags、config、requirements、provider diagnostics
|
|
103
|
+
|
|
104
|
+
**可靠性:**
|
|
105
|
+
- SQLite 持久化:绑定、offset、审批、待处理提示、审计日志
|
|
106
|
+
- 单实例进程锁,防止同一 bot token 重复 polling
|
|
107
|
+
|
|
108
|
+
</details>
|
|
109
|
+
|
|
110
|
+
## 多账号切换
|
|
111
|
+
|
|
112
|
+
FoxClaw 的一大特色是自动多账号切换。当一个账号的 5 小时用量限制触发时,FoxClaw 会自动切换到下一个可用账号继续工作。
|
|
113
|
+
|
|
114
|
+
设置方式:
|
|
115
|
+
|
|
116
|
+
1. 在 Codex 的 auth 目录(通常是 `~/.codex/`)中放置多个认证文件,命名为 `auth.json_personal`、`auth.json_team` 等。
|
|
117
|
+
2. 用 `/auth add <name>` 通过 Telegram 直接添加新账号。
|
|
118
|
+
3. 用 `/auth` 查看所有候选账号状态。
|
|
119
|
+
4. 用 `/auth enable <n>` / `/auth disable <n>` 控制哪些账号参与自动轮换。
|
|
120
|
+
|
|
121
|
+
当 Codex 报告用量限制错误时,FoxClaw 会自动:
|
|
122
|
+
- 切换到下一个未失败的候选账号
|
|
123
|
+
- 重启 app-server 加载新认证
|
|
124
|
+
- 用新账号重试刚才失败的请求
|
|
125
|
+
|
|
126
|
+
## 服务与调试
|
|
127
|
+
|
|
128
|
+
推荐方式:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
foxclaw start
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Linux 上会安装/重启用户级 systemd 服务,macOS 上安装/重载 launchd。查看状态:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
systemctl --user status foxclaw.service
|
|
138
|
+
journalctl --user -u foxclaw.service -f
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
需要前台调试时:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
foxclaw serve
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
运行时文件默认在 `~/.foxclaw`:
|
|
148
|
+
|
|
149
|
+
| 用途 | 路径 |
|
|
150
|
+
|------|------|
|
|
151
|
+
| 数据库 | `~/.foxclaw/data/bridge.sqlite` |
|
|
152
|
+
| Bridge 日志 | `~/.foxclaw/logs/service.log` |
|
|
153
|
+
| 状态 | `~/.foxclaw/runtime/status.json` |
|
|
154
|
+
| App-server 状态 | `~/.foxclaw/runtime/codex-app-server.json` |
|
|
155
|
+
| App-server 日志 | `~/.foxclaw/logs/codex-app-server.log` |
|
|
156
|
+
|
|
157
|
+
可通过 `STORE_PATH`、`LOCK_PATH`、`CODEX_APP_SERVER_STATE_PATH`、`CODEX_APP_SERVER_LOG_PATH` 覆盖。
|
|
158
|
+
|
|
159
|
+
## 从 telegram-codex-app-bridge 迁移
|
|
160
|
+
|
|
161
|
+
FoxClaw 最初 fork 自 `Gan-Xing/telegram-codex-app-bridge`,继续以 MIT License 分发。
|
|
162
|
+
|
|
163
|
+
升级已有安装:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
systemctl --user disable --now telegram-codex-app-bridge.service 2>/dev/null || true
|
|
167
|
+
test -e ~/.foxclaw || cp -a ~/.telegram-codex-app-bridge ~/.foxclaw
|
|
168
|
+
foxclaw start
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
macOS launchd 用户先卸载旧 plist:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
launchctl unload ~/Library/LaunchAgents/com.ganxing.telegram-codex-app-bridge.plist 2>/dev/null || true
|
|
175
|
+
foxclaw start
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
旧目录不会被自动读取。如果要保留已有的绑定、线程缓存、审批和状态数据,手动复制一次即可。
|
|
179
|
+
|
|
180
|
+
## Telegram 设置
|
|
181
|
+
|
|
182
|
+
1. 用 `@BotFather` 创建机器人,token 填入 `TG_BOT_TOKEN`。
|
|
183
|
+
2. 拿到你的 Telegram 数字用户 ID,填入 `TG_ALLOWED_USER_ID`。
|
|
184
|
+
3. `foxclaw start` 启动。
|
|
185
|
+
4. 打开和机器人的私聊,发 `/help`。
|
|
186
|
+
|
|
187
|
+
可选——群组/话题配置:
|
|
188
|
+
|
|
189
|
+
```dotenv
|
|
190
|
+
TG_ALLOWED_CHAT_ID=-1001234567890
|
|
191
|
+
TG_ALLOWED_TOPIC_ID=42
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
- `TG_ALLOWED_CHAT_ID` 留空 → 纯私聊模式。
|
|
195
|
+
- 只填 `TG_ALLOWED_CHAT_ID` → 允许一个群组作为默认会话范围。
|
|
196
|
+
- 两个都填 → 绑定到某个话题。
|
|
197
|
+
- 配了群组后,`TG_ALLOWED_USER_ID` 的私聊依然可用。
|
|
198
|
+
|
|
199
|
+
**怎么找群组和话题 ID:**
|
|
200
|
+
|
|
201
|
+
1. 先停掉 FoxClaw。
|
|
202
|
+
2. 在目标群组/话题里发一条消息。
|
|
203
|
+
3. 浏览器打开 `https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates`。
|
|
204
|
+
4. 找 `message.chat.id` → 填 `TG_ALLOWED_CHAT_ID`。
|
|
205
|
+
5. 找 `message.message_thread_id` → 填 `TG_ALLOWED_TOPIC_ID`。
|
|
206
|
+
|
|
207
|
+
> 如果 FoxClaw 还在跑,它可能会先把这条 update 消费掉,所以要先停。
|
|
208
|
+
|
|
209
|
+
## Telegram 群组检查清单
|
|
210
|
+
|
|
211
|
+
要让机器人在群组/超级群里收到普通消息:
|
|
212
|
+
|
|
213
|
+
1. 把机器人加进目标群组。
|
|
214
|
+
2. 在 `@BotFather` 里关掉 `privacy mode`。
|
|
215
|
+
3. 把机器人设为群管理员。
|
|
216
|
+
4. 如果是加群之后才改的隐私模式,把机器人踢出去再重新加。
|
|
217
|
+
|
|
218
|
+
> 注意:即使 privacy mode 挡住了普通消息,`/status@botname` 这种显式命令可能还是能用的。所以验证群组设置时,请用一条普通文本消息测试。
|
|
219
|
+
|
|
220
|
+
## Codex App-Server 生命周期
|
|
221
|
+
|
|
222
|
+
默认配置:
|
|
223
|
+
|
|
224
|
+
```dotenv
|
|
225
|
+
CODEX_APP_AUTOLAUNCH=true
|
|
226
|
+
CODEX_APP_LAUNCH_CMD=codex app
|
|
227
|
+
CODEX_APP_SERVER_STATE_PATH=
|
|
228
|
+
CODEX_APP_SERVER_LOG_PATH=
|
|
229
|
+
CODEX_APP_SYNC_ON_OPEN=true
|
|
230
|
+
CODEX_APP_SYNC_ON_TURN_COMPLETE=false
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
FoxClaw 会把 `codex app-server` 作为 detached 子进程启动,记录其 pid 和端口。重启时如果进程还活着就直接重连,否则拉起新进程。`/auth_reload` 和认证切换会重启 app-server 以重新加载 `auth.json`。
|
|
234
|
+
|
|
235
|
+
一般不需要手动固定 app-server 端口。
|
|
236
|
+
|
|
237
|
+
## 命令
|
|
238
|
+
|
|
239
|
+
- `/help`
|
|
240
|
+
- `/setup` — 统一设置面板
|
|
241
|
+
- `/fast <on|off|toggle>`
|
|
242
|
+
- `/active <steer|queue>`
|
|
243
|
+
- `/status`、`/account`、`/quota`
|
|
244
|
+
- `/quota_nudge <credits|usage_limit> confirm`
|
|
245
|
+
- `/login_device`、`/login_cancel [id]`、`/logout confirm`
|
|
246
|
+
- `/auth [list|use <n>|enable <n>|disable <n>|reload|add <name>]`
|
|
247
|
+
- `/threads [query]`、`/threads archived`、`/open <n>`
|
|
248
|
+
- `/goal [objective|pause|resume|done|budget <tokens|off>|clear confirm]`
|
|
249
|
+
- `/history [limit]`、`/files <query>`、`/remote`
|
|
250
|
+
- `/new [cwd]`
|
|
251
|
+
- `/steer <message>`、`/takeover <message>`、`/queue <message>`
|
|
252
|
+
- `/review [base <branch>|commit <sha>|custom <instructions>]`
|
|
253
|
+
- `/diff`、`/fork [name]`、`/undo [n]`、`/rollback [n]`
|
|
254
|
+
- `/rename <name>`、`/compact`、`/archive`、`/unarchive <n>`
|
|
255
|
+
- `/skills [query]`、`/skill <name>`、`/skill_enable <name>`、`/skill_disable <name>`
|
|
256
|
+
- `/loaded`、`/hooks`、`/plugins [query]`、`/apps [reload]`、`/features`、`/config`、`/requirements`、`/provider`
|
|
257
|
+
- `/mcp`、`/mcp_reload`、`/mcp_login <server>`、`/mcp_resource <server> <uri>`
|
|
258
|
+
- `/models`、`/model`、`/effort`、`/permissions`、`/access`、`/mode`、`/plan`、`/agent`
|
|
259
|
+
- `/reveal`、`/where`、`/interrupt`
|
|
260
|
+
|
|
261
|
+
直接发文本会送到当前线程;没有绑定线程时自动创建新线程。
|
|
262
|
+
|
|
263
|
+
## 微信/iLink
|
|
264
|
+
|
|
265
|
+
微信支持默认关闭,需要手动开启:
|
|
266
|
+
|
|
267
|
+
```dotenv
|
|
268
|
+
WX_ENABLED=true
|
|
269
|
+
WX_ALLOWED_ILINK_USER_IDS=
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
构建完成后跑一次二维码登录:
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
foxclaw weixin-login
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
微信运行时文件在 `~/.foxclaw/weixin`。
|
|
279
|
+
|
|
280
|
+
## Codex Skill
|
|
281
|
+
|
|
282
|
+
仓库自带一个 Codex skill。用法看 [FoxClaw Skill 中文说明](./docs/zh/foxclaw-skill.md)。它可以让 Codex 通过 SSH 在本机或远程 Mac 上 bootstrap FoxClaw——写 `.env`、构建、跑 doctor、装 launchd、引导首次消息验证,一条龙。
|
|
283
|
+
|
|
284
|
+
## 故障排查
|
|
285
|
+
|
|
286
|
+
`doctor` 报错、Telegram 没回复、服务日志看不懂、重启行为异常、迁移出问题——都看 [故障排查](./docs/zh/troubleshooting.md)。
|
|
287
|
+
|
|
288
|
+
## 运维命令
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
foxclaw doctor
|
|
292
|
+
foxclaw status
|
|
293
|
+
foxclaw start
|
|
294
|
+
foxclaw uninstall-systemd
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
## 贡献
|
|
298
|
+
|
|
299
|
+
欢迎到 [GitHub](https://github.com/foxden-app/foxclaw) 提 issue 和 PR。
|