@foxden-app/foxclaw 0.2.6 → 0.3.0

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.
@@ -0,0 +1,460 @@
1
+ # FoxClaw User Manual
2
+
3
+ FoxClaw wraps your local Codex into a phone-controllable service. Telegram or Weixin provides the chat surface, FoxClaw handles auth, thread binding, approvals, setup panels, and account switching, and your local `codex app-server` performs the actual coding work.
4
+
5
+ Typical flow:
6
+
7
+ ```text
8
+ Telegram/Weixin on your phone
9
+ -> FoxClaw bot
10
+ -> local FoxClaw service
11
+ -> codex app-server
12
+ -> DEFAULT_CWD or the current thread cwd
13
+ ```
14
+
15
+ Your code, shell access, Codex auth, and runtime state stay on the host machine. For a first install, use Telegram private chat before configuring groups, topics, or Weixin.
16
+
17
+ ## 1. Full Setup
18
+
19
+ ### 1.1 Install Node.js 24
20
+
21
+ FoxClaw requires Node.js 24. Check first:
22
+
23
+ ```bash
24
+ node -v
25
+ ```
26
+
27
+ If this is not `v24...`, install Node 24 with `nvm`:
28
+
29
+ ```bash
30
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
31
+ export NVM_DIR="$HOME/.nvm"
32
+ [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
33
+ nvm install 24
34
+ nvm use 24
35
+ node -v
36
+ ```
37
+
38
+ ### 1.2 Install And Log In To Codex
39
+
40
+ FoxClaw does not create a Codex account. It uses the Codex CLI already logged in on this machine.
41
+
42
+ ```bash
43
+ npm install -g @openai/codex
44
+ codex login
45
+ codex --version
46
+ ```
47
+
48
+ `codex --version` only proves the command exists. To verify auth, start Codex and run a tiny request:
49
+
50
+ ```bash
51
+ codex
52
+ ```
53
+
54
+ Then type:
55
+
56
+ ```text
57
+ Say ready and exit.
58
+ ```
59
+
60
+ If Codex answers normally, FoxClaw has a working execution backend.
61
+
62
+ ### 1.3 Create A Telegram Bot
63
+
64
+ 1. Open Telegram.
65
+ 2. Search for `@BotFather`.
66
+ 3. Send `/newbot`.
67
+ 4. Follow the prompts to choose a bot name and username.
68
+ 5. Copy the bot token. It looks like `123456789:AA...`.
69
+
70
+ Keep this token private. Anyone with the token can control the bot.
71
+
72
+ ### 1.4 Get Your Numeric Telegram User ID
73
+
74
+ FoxClaw only responds to the user configured in `TG_ALLOWED_USER_ID`.
75
+
76
+ 1. Open Telegram.
77
+ 2. Search for `@userinfobot`.
78
+ 3. Send any message or press Start.
79
+ 4. Copy the numeric `Id`.
80
+
81
+ Use the number, not your `@username`.
82
+
83
+ ### 1.5 Install FoxClaw
84
+
85
+ If you use pnpm for global packages:
86
+
87
+ ```bash
88
+ pnpm add -g @foxden-app/foxclaw
89
+ foxclaw init
90
+ ```
91
+
92
+ If you use npm:
93
+
94
+ ```bash
95
+ npm install -g @foxden-app/foxclaw
96
+ foxclaw init
97
+ ```
98
+
99
+ Both install the same published npm package. Use one global package manager consistently on a machine to avoid multiple versions in PATH.
100
+
101
+ ### 1.6 Fill In The Config
102
+
103
+ The default config file is `~/.foxclaw/.env`:
104
+
105
+ ```bash
106
+ $EDITOR ~/.foxclaw/.env
107
+ ```
108
+
109
+ Minimum private-chat config:
110
+
111
+ ```dotenv
112
+ TG_BOT_TOKEN=123456789:replace_with_your_bot_token
113
+ TG_ALLOWED_USER_ID=123456789
114
+ TG_ALLOWED_CHAT_ID=
115
+ TG_ALLOWED_TOPIC_ID=
116
+ DEFAULT_CWD=/absolute/path/to/workspace
117
+ DEFAULT_APPROVAL_POLICY=on-request
118
+ DEFAULT_SANDBOX_MODE=workspace-write
119
+ ```
120
+
121
+ Fields:
122
+
123
+ - `TG_BOT_TOKEN`: the token from `@BotFather`.
124
+ - `TG_ALLOWED_USER_ID`: your numeric Telegram user id.
125
+ - `TG_ALLOWED_CHAT_ID`: leave empty for the first private-chat setup.
126
+ - `TG_ALLOWED_TOPIC_ID`: leave empty unless binding a Telegram topic.
127
+ - `DEFAULT_CWD`: the default directory where Codex works; it must exist.
128
+ - `DEFAULT_APPROVAL_POLICY`: `on-request` is a good first value.
129
+ - `DEFAULT_SANDBOX_MODE`: `workspace-write` is a good first value.
130
+
131
+ ### 1.7 Check And Start
132
+
133
+ ```bash
134
+ foxclaw doctor
135
+ foxclaw start
136
+ foxclaw status
137
+ ```
138
+
139
+ Linux service logs:
140
+
141
+ ```bash
142
+ systemctl --user status foxclaw.service
143
+ journalctl --user -u foxclaw.service -f
144
+ ```
145
+
146
+ On macOS, `foxclaw start` manages launchd. For foreground debugging, stop the background service and run:
147
+
148
+ ```bash
149
+ foxclaw serve
150
+ ```
151
+
152
+ ### 1.8 First Telegram Test
153
+
154
+ Open a private chat with your bot and send:
155
+
156
+ ```text
157
+ /help
158
+ ```
159
+
160
+ ```text
161
+ /status
162
+ ```
163
+
164
+ ```text
165
+ /setup
166
+ ```
167
+
168
+ Then send a normal request:
169
+
170
+ ```text
171
+ List files in DEFAULT_CWD.
172
+ ```
173
+
174
+ If Codex replies, the basic path is working.
175
+
176
+ ## 2. Groups And Topics
177
+
178
+ Private chat is the safest first mode. Configure a group or topic only after private chat works.
179
+
180
+ ```dotenv
181
+ TG_ALLOWED_CHAT_ID=-1001234567890
182
+ TG_ALLOWED_TOPIC_ID=42
183
+ ```
184
+
185
+ - Leave `TG_ALLOWED_CHAT_ID` empty for private chat only.
186
+ - Set only `TG_ALLOWED_CHAT_ID` to allow one group as the default conversation scope.
187
+ - Set both values to bind one topic.
188
+ - Private chat still works for `TG_ALLOWED_USER_ID` when a group is configured.
189
+
190
+ Find group or topic IDs:
191
+
192
+ 1. Stop FoxClaw.
193
+ 2. Send a message in the target group or topic.
194
+ 3. Open:
195
+
196
+ ```text
197
+ https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
198
+ ```
199
+
200
+ 4. Use `message.chat.id` as `TG_ALLOWED_CHAT_ID`.
201
+ 5. Use `message.message_thread_id` as `TG_ALLOWED_TOPIC_ID`.
202
+
203
+ If FoxClaw is still running, it may consume the update before you inspect it.
204
+
205
+ For group messages:
206
+
207
+ - Add the bot to the group.
208
+ - Disable privacy mode in `@BotFather`.
209
+ - Promote the bot to administrator.
210
+ - Test with a plain natural-language message, not only `/status@botname`.
211
+
212
+ ## 3. Commands
213
+
214
+ ### 3.1 `/help`
215
+
216
+ `/help` returns the available command list. The top entries are pinned:
217
+
218
+ ```text
219
+ /help
220
+ /setup
221
+ /status
222
+ /threads [query]
223
+ /auth
224
+ ```
225
+
226
+ Later commands are sorted by recent usage. Plain text, photos, and files continue the currently bound thread; if no thread is bound, FoxClaw creates one.
227
+
228
+ ### 3.2 `/status`, `/account`, `/quota`
229
+
230
+ - `/status`: FoxClaw, app-server, current thread binding, model, access, and Codex usage summary.
231
+ - `/account`: current Codex account.
232
+ - `/quota`: Codex usage and quota window.
233
+
234
+ ### 3.3 `/config`, `/requirements`, `/provider`
235
+
236
+ - `/config`: reads the Codex config summary for the bound thread cwd or `DEFAULT_CWD`, including `model`, `approval_policy`, `sandbox_mode`, and `service_tier`.
237
+ - `/requirements`: shows app-server constraints such as allowed approval, sandbox, and web search modes.
238
+ - `/provider`: shows the current Codex provider summary.
239
+
240
+ These are useful when the phone-side model, permission, or provider behavior does not match what you expected.
241
+
242
+ ## 4. The `/setup` Panel
243
+
244
+ `/setup` is one of the main mobile panels. Settings are scoped to the chat, so private chat, group, and topic can use different settings.
245
+
246
+ It controls:
247
+
248
+ - Model: server default, or a model returned by app-server.
249
+ - Reasoning effort: for example `low`, `medium`, `high`, or `xhigh`, depending on model support.
250
+ - Fast tier: available when supported by the selected model.
251
+ - Access: `read-only`, `default`, or `full-access`.
252
+ - Mode: `Agent` or `Plan`.
253
+ - Active turn behavior: steer the current turn, or queue the message for the next turn.
254
+
255
+ Telegram renders the HTML and buttons. This text block approximates the real panel:
256
+
257
+ ```text
258
+ Session preferences
259
+ Current: gpt-5.5 · high · fast=off · default · Agent · Steer current turn
260
+ Focus: Model
261
+
262
+ Model: gpt-5.5
263
+ Effort: high
264
+ Fast: off
265
+ Access: Default (on-request / workspace-write)
266
+ Mode: Agent
267
+ Active turn: Steer current turn
268
+
269
+ [Auto] [gpt-5.5]
270
+ [low] [medium] [high]
271
+ [⚡ Fast on] [Fast off]
272
+ [👁️ Read-only] [🛡️ Default] [🔓 Full access]
273
+ [Agent] [📝 Plan]
274
+ [Steer current turn] [Queue next turn]
275
+ ```
276
+
277
+ Command aliases:
278
+
279
+ - `/model <model|default>`: switch model.
280
+ - `/effort <effort|default>`: switch reasoning effort.
281
+ - `/permissions [read-only|default|full-access]`: switch access preset.
282
+ - `/mode [default|plan]`: switch Agent/Plan.
283
+ - `/active <steer|queue>`: control how new messages behave during an active turn.
284
+
285
+ ## 5. Threads And Watch
286
+
287
+ FoxClaw chats are bound to Codex threads. Once you open a thread from your phone, normal messages continue that thread.
288
+
289
+ Common commands:
290
+
291
+ - `/threads [query]`: list recent threads, optionally filtered by keyword.
292
+ - `/threads archived [query]`: list archived threads.
293
+ - `/open <n>`: open item n from the latest `/threads` list and bind this chat.
294
+ - `/new [cwd]`: create a new thread in a cwd, or in the default cwd.
295
+ - `/where`: show the current thread, cwd, and settings.
296
+ - `/rename <name>`: rename the current thread.
297
+ - `/archive`: archive the current thread.
298
+ - `/interrupt`: interrupt the current running turn.
299
+
300
+ Threads panel approximation:
301
+
302
+ ```text
303
+ Recent threads
304
+ Tap a button below to open or manage a thread.
305
+ Showing 1-5
306
+ Current: fix auth rotation
307
+ ~/Projects/foxclaw | 3 minutes ago | idle
308
+
309
+ [🧵 1. fix auth rotation]
310
+ [✏️] [👀] [🗑️] [➕]
311
+
312
+ [🧵 2. polish README copy]
313
+ [✏️] [👀] [🗑️] [➕]
314
+
315
+ [➕ New]
316
+ [➡️ Next]
317
+ [🗄️ Archived]
318
+ ```
319
+
320
+ ### `/watch`
321
+
322
+ `/watch` observes a thread even if the task was started elsewhere. A common workflow is starting a long Codex CLI task at your desk, then watching it from your phone.
323
+
324
+ Usage:
325
+
326
+ - `/watch`: watch the currently bound thread.
327
+ - `/watch <n>`: watch item n from the latest `/threads` list.
328
+ - `/unwatch`: stop watching.
329
+
330
+ Watch mode mirrors live turn progress and approval requests. The watching chat is read-only for normal prompts during the observed turn. Send `/unwatch` before starting a new prompt from that chat, or wait for the turn to finish.
331
+
332
+ ## 6. Codex Login And Auth Rotation
333
+
334
+ This is a key FoxClaw feature. Codex auth is usually stored at `~/.codex/auth.json`. FoxClaw stores multiple accounts as candidate files and switches which candidate the active `auth.json` points to.
335
+
336
+ ### 6.1 File Format
337
+
338
+ Candidate files live in the Codex auth directory, usually `~/.codex/`. If `CODEX_AUTH_DIR` is set, FoxClaw uses that directory.
339
+
340
+ Recommended layout:
341
+
342
+ ```text
343
+ ~/.codex/
344
+ auth.json -> /home/alice/.codex/auth.json_personal
345
+ auth.json_personal
346
+ auth.json_team
347
+ auth.json_plus_trial
348
+ ```
349
+
350
+ FoxClaw recognizes candidate names in these forms:
351
+
352
+ - `auth.json_<name>`
353
+ - `auth.json.<name>`
354
+ - `auth.json-<name>`
355
+
356
+ `auth.json` is what Codex currently uses. When switching accounts, FoxClaw points `auth.json` at one candidate. Candidate contents are Codex-generated JSON; FoxClaw treats those private fields as opaque and you should not hand-write them.
357
+
358
+ If you already have a working `auth.json`, you can save it as a candidate:
359
+
360
+ ```bash
361
+ cp -L ~/.codex/auth.json ~/.codex/auth.json_personal
362
+ ```
363
+
364
+ The safer path is adding candidates from the phone with `/auth add <name>`.
365
+
366
+ ### 6.2 Login Commands
367
+
368
+ - `/login_device`: starts ChatGPT device login for the current `auth.json`. FoxClaw sends a login URL, short code, login id, and cancel command.
369
+ - `/login_cancel [id]`: cancels an in-progress device login.
370
+ - `/logout confirm`: logs out the current Codex account.
371
+ - `/auth add <name>`: adds a candidate account. For example, `/auth add work` creates `auth.json_work` and starts device login.
372
+
373
+ `/auth add <name>` flow:
374
+
375
+ 1. FoxClaw prepares `auth.json_<name>`.
376
+ 2. It temporarily points `auth.json` at that candidate.
377
+ 3. It restarts app-server so Codex writes into the new candidate.
378
+ 4. It sends the login URL and short code.
379
+ 5. You complete login in the browser.
380
+ 6. The candidate appears in `/auth`.
381
+
382
+ If the login is cancelled or fails, FoxClaw tries to restore the previous auth target and remove the unfinished candidate.
383
+
384
+ ### 6.3 The `/auth` Panel
385
+
386
+ `/auth` lists candidate accounts, the current account, and the auth directory. It also provides buttons for switching, disabling, login, and reload.
387
+
388
+ Approximation:
389
+
390
+ ```text
391
+ Codex auth
392
+ Current: auth.json_personal
393
+ Auth dir: /home/alice/.codex
394
+ Candidates: 2
395
+ 1. auth.json_personal * [enabled]
396
+ 2. auth.json_team [enabled]
397
+
398
+ [✅ auth.json_personal] [✅]
399
+ [🔐 auth.json_team] [✅]
400
+ [🛡️ Access] [🔑 Login]
401
+ [🔄 Reload auth]
402
+ ```
403
+
404
+ The right-side `✅` / `⏸️` button shows the current state. Tapping it toggles enabled/disabled, and the refreshed list shows the new state.
405
+
406
+ Equivalent commands:
407
+
408
+ - `/auth` or `/auth list`: show candidates.
409
+ - `/auth use <n>`: switch to candidate n and restart app-server.
410
+ - `/auth enable <n>`: let candidate n participate in auto-rotation.
411
+ - `/auth disable <n>`: skip candidate n during auto-rotation.
412
+ - `/auth reload` or `/auth_reload`: restart app-server and reload the current `auth.json`.
413
+
414
+ If active turns, pending approvals, pending user inputs, or MCP elicitations exist, FoxClaw refuses manual auth switching to avoid changing accounts mid-request.
415
+
416
+ ### 6.4 How Auto-Rotation Works
417
+
418
+ When Codex reports a usage limit, missing login, expired auth, or similar auth error, FoxClaw tries to rotate automatically:
419
+
420
+ 1. Record the failed candidate.
421
+ 2. Select the next enabled candidate that has not already failed in this retry cycle.
422
+ 3. Point `auth.json` at that candidate.
423
+ 4. Restart `codex app-server` so the new auth is loaded.
424
+ 5. Retry the failed request with the new account.
425
+
426
+ Disabled candidates are skipped. If no candidate is available, FoxClaw reports the error back to the phone and stops retrying.
427
+
428
+ Example account layout:
429
+
430
+ ```text
431
+ auth.json_personal # primary account
432
+ auth.json_team # Team or work account
433
+ auth.json_plus_trial # trial account
434
+ auth.json_backup # backup account, enable or disable as needed
435
+ ```
436
+
437
+ ## 7. Daily Workflow
438
+
439
+ 1. Enter the project directory on your computer and make sure Codex works.
440
+ 2. From your phone, send `/new /home/alice/Projects/app`, or use `/threads` to open an existing thread.
441
+ 3. Use `/setup` to choose model, effort, access, and Agent/Plan mode.
442
+ 4. Send a task, for example: `Fix the failing test and run the related test suite.`
443
+ 5. Step away from the computer and watch progress on your phone.
444
+ 6. Approve or deny command and file-change requests from Telegram.
445
+ 7. To observe a task started from Codex CLI, use `/threads`, then tap `👀` or send `/watch <n>`.
446
+ 8. When quota is hit, let `/auth` candidates auto-rotate, or switch manually with `/auth use <n>`.
447
+
448
+ ## 8. Safety
449
+
450
+ - Do not share `TG_BOT_TOKEN`, `~/.codex/auth.json*`, or `.env`.
451
+ - Do not use `/`, `/home`, `/Users`, or your whole home directory as the first `DEFAULT_CWD`.
452
+ - When unsure, use `/permissions read-only` or select `Read-only` in `/setup`.
453
+ - Group mode still only accepts `TG_ALLOWED_USER_ID`, but use trusted groups.
454
+ - Multi-account files are Codex login credentials. Treat backups and sync tools accordingly.
455
+
456
+ ## 9. More Reading
457
+
458
+ - [Beginner Install Guide](./install-for-beginners.md)
459
+ - [Agent-Assisted Install](./agent-assisted-install.md)
460
+ - [Troubleshooting](./troubleshooting.md)
@@ -0,0 +1,83 @@
1
+ # Agent 辅助安装
2
+
3
+ 如果目标电脑上已经有能执行 shell、读写文件、检查服务状态的编码 agent,优先用这条路径。它比手动一步步复制命令更快,也更容易发现本机环境里的阻塞点。
4
+
5
+ 适合使用 Codex、OpenClaw、QwenPaw、Hermes、OpenCode、Kimi CLI,或者任何可以在目标机器上运行命令的 agent。
6
+
7
+ ## 你需要准备
8
+
9
+ 先准备这几个值:
10
+
11
+ - `TG_BOT_TOKEN`:从 `@BotFather` 拿到的 Telegram bot token
12
+ - `TG_ALLOWED_USER_ID`:你的 Telegram 数字用户 ID
13
+ - `DEFAULT_CWD`:希望 Codex 默认工作的目录
14
+
15
+ 后续再配置群组或话题时才需要:
16
+
17
+ - `TG_ALLOWED_CHAT_ID`
18
+ - `TG_ALLOWED_TOPIC_ID`
19
+
20
+ 第一次请先用 Telegram 私聊跑通。群组和话题模式等私聊稳定后再开。
21
+
22
+ ## 复制给 agent 的安装提示词
23
+
24
+ 把下面这段发给目标电脑上的 agent:
25
+
26
+ ```text
27
+ 请在这台机器上安装 FoxClaw。
28
+
29
+ 发布包:
30
+ @foxden-app/foxclaw
31
+
32
+ 先使用 Telegram 私聊模式。除非我明确提供 TG_ALLOWED_CHAT_ID 或 TG_ALLOWED_TOPIC_ID,否则不要配置群组/话题模式。
33
+
34
+ 必需配置:
35
+ TG_BOT_TOKEN=<把 token 粘贴在这里>
36
+ TG_ALLOWED_USER_ID=<把 Telegram 数字用户 ID 粘贴在这里>
37
+ DEFAULT_CWD=<把绝对工作目录粘贴在这里>
38
+
39
+ 任务:
40
+ 1. 先检查机器环境。如果已经存在 FoxClaw 或旧的 telegram-codex-app-bridge 服务,先报告再改服务。
41
+ 2. 确保 Node.js 24+ 可用;如果没有,请用 nvm 安装或切到 Node 24。
42
+ 3. 确保 Codex CLI 存在并且已经登录。如果需要登录,停下来告诉我具体要执行什么。
43
+ 4. 用 npm install -g @foxden-app/foxclaw@latest 安装或升级 FoxClaw。
44
+ 5. 运行 foxclaw init,然后写入 ~/.foxclaw/.env。不要打印或提交 bot token。
45
+ 6. 运行 foxclaw doctor。
46
+ 7. 用 foxclaw start 启动 FoxClaw。
47
+ 8. 让我在 Telegram bot 里发送 /help 和 /status。
48
+ 9. 验证最终状态:
49
+ - Linux 上 foxclaw.service 处于 active/enabled
50
+ - 如果存在旧 telegram-codex-app-bridge.service,它应当 inactive/disabled
51
+ - foxclaw status 可以正常输出
52
+ 10. 汇报执行过的命令、最终状态和后续看日志的命令。请隐藏 TG_BOT_TOKEN,不要打印完整 token 或完整 .env。
53
+ ```
54
+
55
+ ## 旧项目迁移提示词
56
+
57
+ 如果目标机器还在跑 `telegram-codex-app-bridge`,用这段:
58
+
59
+ ```text
60
+ 请把这台机器从 telegram-codex-app-bridge 迁移到 FoxClaw。
61
+
62
+ 新发布包:
63
+ @foxden-app/foxclaw
64
+
65
+ 请执行:
66
+ 1. 修改前先检查现有安装方式、服务文件和运行目录。
67
+ 2. 如果存在 telegram-codex-app-bridge.service,停止并禁用它。
68
+ 3. 如果 ~/.foxclaw 不存在而 ~/.telegram-codex-app-bridge 存在,把旧目录复制到 ~/.foxclaw。
69
+ 4. 用 npm install -g @foxden-app/foxclaw@latest 安装或升级 FoxClaw。
70
+ 5. 如果 ~/.foxclaw/.env 不存在,运行 foxclaw init;然后检查配置是否完整。
71
+ 6. 运行 foxclaw doctor。
72
+ 7. 用 foxclaw start 安装或重启 FoxClaw 服务。
73
+ 8. 验证 foxclaw.service 正常运行,旧 telegram-codex-app-bridge.service 已停止或禁用。
74
+ 9. 汇报最终状态和阻塞点。请隐藏 TG_BOT_TOKEN,不要打印完整 token 或完整 .env。
75
+ ```
76
+
77
+ ## 安全注意事项
78
+
79
+ - 不要把 bot token 粘贴到公开 issue、公开聊天或代码仓库。
80
+ - 不要提交 `.env`。
81
+ - 汇报结果时隐藏 `TG_BOT_TOKEN`。
82
+ - 第一次安装不要把 `/`、整个 `/Users`、整个 `/home` 或完整 home 目录设为 `DEFAULT_CWD`。
83
+ - 日常启动用 `foxclaw start`;只有排障时才用前台模式 `foxclaw serve`。
@@ -0,0 +1,24 @@
1
+ # FoxClaw Skill 中文说明
2
+
3
+ 仓库内置的 `skills/foxclaw` 是给 Codex 使用的安装技能。它的用途是让 Codex 在本机或远程 Mac 上自动完成 FoxClaw bootstrap,包括写 `.env`、安装依赖、构建、跑 `doctor`、安装 launchd 服务,并引导你完成第一次 Telegram 消息验证。
4
+
5
+ ## 适合什么时候用
6
+
7
+ - 你想让 Codex 通过 SSH 帮另一台 Mac 安装 FoxClaw。
8
+ - 你希望 agent 先检查环境,再决定如何安装 Node.js 24、Codex CLI 和 FoxClaw。
9
+ - 你不想手动复制每一步安装命令,但愿意提供 Telegram bot token、用户 ID 和默认工作目录。
10
+
11
+ ## 基本流程
12
+
13
+ 1. 准备 `TG_BOT_TOKEN`、`TG_ALLOWED_USER_ID` 和 `DEFAULT_CWD`。
14
+ 2. 让 Codex 使用 `skills/foxclaw`。
15
+ 3. 如果是远程机器,提供 SSH 目标。
16
+ 4. 让 Codex 执行安装、写配置、跑 `foxclaw doctor`。
17
+ 5. 启动服务后,在 Telegram bot 里发送 `/help` 和 `/status` 验证。
18
+
19
+ ## 注意事项
20
+
21
+ - 不要让 agent 把完整 bot token 打印到日志或提交到仓库。
22
+ - 第一次请先用私聊模式跑通。
23
+ - 不要把整个 home 目录或根目录作为首次 `DEFAULT_CWD`。
24
+ - 只有在 `doctor` 通过、服务已启动、Telegram 首条消息验证通过后,才算安装完成。