codex-to-im 0.1.0 → 0.1.1
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 +11 -1
- package/README_CN.md +11 -1
- package/config.env.example +12 -15
- package/dist/daemon.mjs +7118 -6870
- package/dist/ui-server.mjs +1430 -353
- package/docs/install-windows.md +11 -3
- package/package.json +9 -12
package/README.md
CHANGED
|
@@ -38,7 +38,17 @@ Windows host installation guide: [docs/install-windows.md](D:/codex/Claude-to-IM
|
|
|
38
38
|
### Prerequisites
|
|
39
39
|
|
|
40
40
|
- Node.js 20+
|
|
41
|
-
- If you use the `codex` or `auto` runtime,
|
|
41
|
+
- If you use the `codex` or `auto` runtime, complete Codex authentication under the same Windows user
|
|
42
|
+
|
|
43
|
+
`codex-to-im` now ships with the required `@openai/codex-sdk` / Codex CLI platform dependency, so you do not need to install a separate global Codex CLI just to run the bridge.
|
|
44
|
+
|
|
45
|
+
You still need Codex credentials to be available for the current user. Any of these is sufficient:
|
|
46
|
+
|
|
47
|
+
- a logged-in Codex Windows App
|
|
48
|
+
- an existing Codex CLI login state
|
|
49
|
+
- `CTI_CODEX_API_KEY`, `CODEX_API_KEY`, or `OPENAI_API_KEY`
|
|
50
|
+
|
|
51
|
+
If the machine does not have any Codex login state yet, the simplest path is still to install the global CLI once and log in:
|
|
42
52
|
|
|
43
53
|
```bash
|
|
44
54
|
npm install -g @openai/codex
|
package/README_CN.md
CHANGED
|
@@ -38,7 +38,17 @@ Windows 主机安装说明见:[docs/install-windows.md](D:/codex/Claude-to-IM-
|
|
|
38
38
|
### 依赖
|
|
39
39
|
|
|
40
40
|
- Node.js 20+
|
|
41
|
-
- 如果使用 `codex` 或 `auto`
|
|
41
|
+
- 如果使用 `codex` 或 `auto` 运行时:需要在同一 Windows 用户下完成 Codex 认证
|
|
42
|
+
|
|
43
|
+
`codex-to-im` 当前已经随包带上运行所需的 `@openai/codex-sdk` / Codex CLI 平台依赖,正常使用 bridge 时不要求你额外再全局安装一份 Codex CLI。
|
|
44
|
+
|
|
45
|
+
但你仍然需要让 Codex 在当前用户下可用。推荐满足以下任一条件:
|
|
46
|
+
|
|
47
|
+
- 已安装并登录过 Codex Windows App
|
|
48
|
+
- 已经有可用的 Codex CLI 登录态
|
|
49
|
+
- 已配置 `CTI_CODEX_API_KEY`、`CODEX_API_KEY` 或 `OPENAI_API_KEY`
|
|
50
|
+
|
|
51
|
+
如果你机器上还没有任何 Codex 登录态,最直接的做法仍然是临时安装一次全局 Codex CLI 并登录:
|
|
42
52
|
|
|
43
53
|
```bash
|
|
44
54
|
npm install -g @openai/codex
|
package/config.env.example
CHANGED
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
# Copy to ~/.codex-to-im/config.env and edit
|
|
3
3
|
|
|
4
4
|
# Runtime backend: claude | codex | auto
|
|
5
|
-
# claude
|
|
6
|
-
# codex — uses @openai/codex-sdk (auth: codex auth login, or OPENAI_API_KEY)
|
|
5
|
+
# claude — uses Claude Code CLI + @anthropic-ai/claude-agent-sdk
|
|
6
|
+
# codex (default) — uses @openai/codex-sdk (auth: codex auth login, or OPENAI_API_KEY)
|
|
7
7
|
# auto — tries Claude first, falls back to Codex if CLI not found
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
#
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# Enabled channels (comma-separated: telegram,discord,feishu,qq,weixin)
|
|
14
|
-
CTI_ENABLED_CHANNELS=telegram
|
|
8
|
+
CTI_RUNTIME=codex
|
|
9
|
+
|
|
10
|
+
# Enabled channels (comma-separated: telegram,discord,feishu,qq,weixin)
|
|
11
|
+
CTI_ENABLED_CHANNELS=feishu
|
|
15
12
|
|
|
16
13
|
# Default working directory for Codex / bridge sessions
|
|
17
14
|
CTI_DEFAULT_WORKDIR=/path/to/your/project
|
|
@@ -39,13 +36,13 @@ CTI_DEFAULT_MODE=code
|
|
|
39
36
|
# ANTHROPIC_BASE_URL=https://your-api-provider.com/v1
|
|
40
37
|
# ANTHROPIC_AUTH_TOKEN=your-auth-token
|
|
41
38
|
|
|
42
|
-
# ── Codex auth (optional — only if not using `codex auth login`) ──
|
|
43
|
-
# Priority: CTI_CODEX_API_KEY > CODEX_API_KEY > OPENAI_API_KEY
|
|
44
|
-
# CTI_CODEX_API_KEY=
|
|
45
|
-
# CTI_CODEX_BASE_URL=
|
|
39
|
+
# ── Codex auth (optional — only if not using `codex auth login`) ──
|
|
40
|
+
# Priority: CTI_CODEX_API_KEY > CODEX_API_KEY > OPENAI_API_KEY
|
|
41
|
+
# CTI_CODEX_API_KEY=
|
|
42
|
+
# CTI_CODEX_BASE_URL=
|
|
46
43
|
# Allow Codex to run when CTI_DEFAULT_WORKDIR is not inside a trusted Git repo.
|
|
47
|
-
#
|
|
48
|
-
|
|
44
|
+
# This project defaults it to true so first-time setup works more smoothly.
|
|
45
|
+
CTI_CODEX_SKIP_GIT_REPO_CHECK=true
|
|
49
46
|
|
|
50
47
|
# ── Telegram ──
|
|
51
48
|
CTI_TG_BOT_TOKEN=your-telegram-bot-token
|