codexmate 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/.github/workflows/ci.yml +26 -0
- package/CHANGELOG.md +7 -0
- package/CHANGELOG.zh-CN.md +7 -0
- package/README.md +37 -29
- package/README.zh-CN.md +37 -29
- package/cli.js +1132 -293
- package/package.json +4 -3
- package/tests/e2e/recent-health.e2e.js +136 -135
- package/tests/e2e/run.js +63 -0
- package/web-ui.html +2151 -210
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
pull_request:
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
jobs:
|
|
8
|
+
ci:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
node: [18, 20, 22]
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
- name: Setup Node
|
|
17
|
+
uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: ${{ matrix.node }}
|
|
20
|
+
cache: npm
|
|
21
|
+
- name: Install
|
|
22
|
+
run: npm ci
|
|
23
|
+
- name: Lint
|
|
24
|
+
run: npm run lint --if-present
|
|
25
|
+
- name: Test
|
|
26
|
+
run: npm run test --if-present
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.5
|
|
4
|
+
|
|
5
|
+
- Sessions: enable keyword search for Codex-only view
|
|
6
|
+
- Sessions: increase keyword scan limit to reduce misses
|
|
7
|
+
- Utilities: add JS fallback for zip/unzip when 7-Zip is missing
|
|
8
|
+
- UI: shorten base_url/key/model check hint
|
|
9
|
+
|
|
3
10
|
## 0.0.4
|
|
4
11
|
|
|
5
12
|
- Added OpenClaw config mode with JSON5 profiles and one-click apply
|
package/CHANGELOG.zh-CN.md
CHANGED
package/README.md
CHANGED
|
@@ -11,14 +11,6 @@ English | [Chinese](README.zh-CN.md)
|
|
|
11
11
|
|
|
12
12
|
Codex Mate makes frequent provider/model switching for Codex and Claude Code a single command or click, and gives you a unified session browser to view/export local sessions from both.
|
|
13
13
|
|
|
14
|
-
## Release Notes (0.0.4)
|
|
15
|
-
|
|
16
|
-
- Added OpenClaw config mode with JSON5 profiles and one-click apply
|
|
17
|
-
- Added OpenClaw workspace AGENTS.md management
|
|
18
|
-
- Added JSON5 parsing dependency
|
|
19
|
-
|
|
20
|
-
See [CHANGELOG.md](CHANGELOG.md) and [Releases](https://github.com/ymkiux/codexmate/releases) for the full history.
|
|
21
|
-
|
|
22
14
|
## What You Get
|
|
23
15
|
|
|
24
16
|
- Faster provider/model switching
|
|
@@ -35,7 +27,7 @@ See [CHANGELOG.md](CHANGELOG.md) and [Releases](https://github.com/ymkiux/codexm
|
|
|
35
27
|
| Claude Code Config | Multiple profiles and inconsistent write paths | Profile management, default write to `~/.claude/settings.json` |
|
|
36
28
|
| OpenClaw Config | OpenClaw configs are scattered | JSON5 profiles, apply to `~/.openclaw/openclaw.json`, AGENTS workspace management |
|
|
37
29
|
| Session Browser | Local sessions are hard to track | List/filter sessions, export to Markdown, copy resume command (when available), delete and batch cleanup |
|
|
38
|
-
| Utilities | Compression/extraction requires extra tools |
|
|
30
|
+
| Utilities | Compression/extraction requires extra tools | 7-Zip preferred, JS fallback |
|
|
39
31
|
|
|
40
32
|
## Why Codex Mate
|
|
41
33
|
|
|
@@ -161,9 +153,10 @@ npm link
|
|
|
161
153
|
| `codexmate add <name> <URL> [API key]` | Add a provider |
|
|
162
154
|
| `codexmate delete <provider>` | Delete a provider |
|
|
163
155
|
| `codexmate models` | List all models |
|
|
164
|
-
| `codexmate add-model <model>` | Add a model |
|
|
165
|
-
| `codexmate delete-model <model>` | Delete a model |
|
|
166
|
-
| `codexmate start` | Start the Web UI |
|
|
156
|
+
| `codexmate add-model <model>` | Add a model |
|
|
157
|
+
| `codexmate delete-model <model>` | Delete a model |
|
|
158
|
+
| `codexmate start` | Start the Web UI |
|
|
159
|
+
| `codexmate export-session --source <codex|claude> (--session-id <ID>|--file <PATH>) [--output <PATH>] [--max-messages <N|all|Infinity>]` | Export a session to Markdown |
|
|
167
160
|
|
|
168
161
|
## Web UI
|
|
169
162
|
|
|
@@ -250,13 +243,22 @@ codexmate add myapi https://api.example.com/v1 sk-your-api-key
|
|
|
250
243
|
codexmate switch myapi
|
|
251
244
|
```
|
|
252
245
|
|
|
253
|
-
### Switch to a Different Model
|
|
254
|
-
|
|
255
|
-
```bash
|
|
256
|
-
codexmate use gpt-4-turbo
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
###
|
|
246
|
+
### Switch to a Different Model
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
codexmate use gpt-4-turbo
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Export a Session (CLI)
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
codexmate export-session --source codex --session-id 123456
|
|
256
|
+
codexmate export-session --source claude --file "~/.claude/projects/demo/session.jsonl" --max-messages=all
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
By default, exports are capped at 1000 messages. Use `--max-messages=all` (or `Infinity`) to export everything.
|
|
260
|
+
|
|
261
|
+
### Configure Claude Code (Cross-Platform)
|
|
260
262
|
|
|
261
263
|
1. Start the Web UI: `codexmate start`
|
|
262
264
|
2. Switch to "Claude Code Config" mode in the browser
|
|
@@ -265,13 +267,19 @@ codexmate use gpt-4-turbo
|
|
|
265
267
|
5. Default write to `~/.claude/settings.json`
|
|
266
268
|
6. Restart Claude Code to apply
|
|
267
269
|
|
|
268
|
-
### Start the Web UI
|
|
269
|
-
|
|
270
|
-
```bash
|
|
271
|
-
codexmate start
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
### Start the Web UI
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
codexmate start
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
By default it binds to `127.0.0.1`. To expose on LAN, use `--host` or `CODEXMATE_HOST`:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
codexmate start --host 0.0.0.0
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Then open `http://localhost:3737` (or your chosen host). Note: binding to `0.0.0.0` is unsafe on untrusted networks.
|
|
275
283
|
|
|
276
284
|
## FAQ
|
|
277
285
|
|
|
@@ -295,9 +303,9 @@ A: After clicking "Apply to Claude Config", it writes to `~/.claude/settings.jso
|
|
|
295
303
|
|
|
296
304
|
A: Run `npm uninstall -g codexmate`.
|
|
297
305
|
|
|
298
|
-
## Extras:
|
|
306
|
+
## Extras: Compression/Extraction
|
|
299
307
|
|
|
300
|
-
|
|
308
|
+
Prefer 7-Zip for multithreaded zip/unzip. Fallback to the built-in JS library when unavailable.
|
|
301
309
|
|
|
302
310
|
```bash
|
|
303
311
|
# Compress file or folder (default compression level 5)
|
|
@@ -332,7 +340,7 @@ codexmate unzip ./my-project.zip
|
|
|
332
340
|
codexmate unzip ./backup.zip D:/restored
|
|
333
341
|
```
|
|
334
342
|
|
|
335
|
-
Note:
|
|
343
|
+
Note: 7-Zip is optional. If missing, the built-in JS library is used. `--max` only applies to 7-Zip.
|
|
336
344
|
|
|
337
345
|
## Tech Stack
|
|
338
346
|
|
package/README.zh-CN.md
CHANGED
|
@@ -19,14 +19,6 @@ Codex Mate 让 Codex 与 Claude Code 的提供商/模型切换变成“一条命
|
|
|
19
19
|
- 配置变更可回溯、有备份
|
|
20
20
|
- Codex + Claude Code 统一会话浏览(查看/导出/可用时复制恢复命令)
|
|
21
21
|
|
|
22
|
-
## 更新说明(0.0.4)
|
|
23
|
-
|
|
24
|
-
- 新增 OpenClaw 配置模式(JSON5 多配置管理 + 一键应用)
|
|
25
|
-
- 新增 OpenClaw Workspace 的 AGENTS.md 管理
|
|
26
|
-
- 增加 JSON5 解析依赖
|
|
27
|
-
|
|
28
|
-
完整更新记录见 [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md) 与 [Releases](https://github.com/ymkiux/codexmate/releases)。
|
|
29
|
-
|
|
30
22
|
## 功能总览
|
|
31
23
|
|
|
32
24
|
| 模块 | 解决的问题 | 关键能力 |
|
|
@@ -35,7 +27,7 @@ Codex Mate 让 Codex 与 Claude Code 的提供商/模型切换变成“一条命
|
|
|
35
27
|
| Claude Code 配置 | 多方案共存、写入路径不统一 | 多配置方案管理、默认写入 `~/.claude/settings.json` |
|
|
36
28
|
| OpenClaw 配置 | OpenClaw 配置分散 | JSON5 多配置管理、应用到 `~/.openclaw/openclaw.json`、Workspace 指令文件管理 |
|
|
37
29
|
| 会话浏览 | 本地会话难以追踪 | 会话列表/筛选、Markdown 导出、可用时复制恢复命令、删除与批量清理 |
|
|
38
|
-
| 附属工具 | 压缩/解压需额外工具 |
|
|
30
|
+
| 附属工具 | 压缩/解压需额外工具 | 优先 7-Zip,JS 库兜底 |
|
|
39
31
|
|
|
40
32
|
## 为什么选择 Codex Mate
|
|
41
33
|
|
|
@@ -161,9 +153,10 @@ npm link
|
|
|
161
153
|
| `codexmate add <名称> <URL> [API密钥]` | 添加新提供商 |
|
|
162
154
|
| `codexmate delete <提供商名称>` | 删除提供商 |
|
|
163
155
|
| `codexmate models` | 列出所有模型 |
|
|
164
|
-
| `codexmate add-model <模型名称>` | 添加模型 |
|
|
165
|
-
| `codexmate delete-model <模型名称>` | 删除模型 |
|
|
166
|
-
| `codexmate start` | 启动 Web 界面 |
|
|
156
|
+
| `codexmate add-model <模型名称>` | 添加模型 |
|
|
157
|
+
| `codexmate delete-model <模型名称>` | 删除模型 |
|
|
158
|
+
| `codexmate start` | 启动 Web 界面 |
|
|
159
|
+
| `codexmate export-session --source <codex|claude> (--session-id <ID>|--file <PATH>) [--output <PATH>] [--max-messages <N|all|Infinity>]` | 导出指定会话为 Markdown |
|
|
167
160
|
|
|
168
161
|
## Web 界面
|
|
169
162
|
|
|
@@ -250,13 +243,22 @@ codexmate add myapi https://api.example.com/v1 sk-your-api-key
|
|
|
250
243
|
codexmate switch myapi
|
|
251
244
|
```
|
|
252
245
|
|
|
253
|
-
### 切换到不同的模型
|
|
254
|
-
|
|
255
|
-
```bash
|
|
256
|
-
codexmate use gpt-4-turbo
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
###
|
|
246
|
+
### 切换到不同的模型
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
codexmate use gpt-4-turbo
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### 导出会话(CLI)
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
codexmate export-session --source codex --session-id 123456
|
|
256
|
+
codexmate export-session --source claude --file "~/.claude/projects/demo/session.jsonl" --max-messages=all
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
默认最多导出 1000 条消息;如需完整导出可用 `--max-messages=all`(或 `Infinity`)。
|
|
260
|
+
|
|
261
|
+
### 配置 Claude Code(跨平台)
|
|
260
262
|
|
|
261
263
|
1. 启动 Web 界面:`codexmate start`
|
|
262
264
|
2. 在浏览器中切换到 "Claude Code 配置" 模式
|
|
@@ -265,13 +267,19 @@ codexmate use gpt-4-turbo
|
|
|
265
267
|
5. 默认写入 `~/.claude/settings.json`
|
|
266
268
|
6. 重启 Claude Code,新的配置即生效
|
|
267
269
|
|
|
268
|
-
### 启动 Web 界面
|
|
269
|
-
|
|
270
|
-
```bash
|
|
271
|
-
codexmate start
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
### 启动 Web 界面
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
codexmate start
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
默认仅监听 `127.0.0.1`。如需局域网访问,可用 `--host` 或 `CODEXMATE_HOST`:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
codexmate start --host 0.0.0.0
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
然后在浏览器中打开 `http://localhost:3737`(或你指定的地址)。注意:监听 `0.0.0.0` 在不可信网络下不安全。
|
|
275
283
|
|
|
276
284
|
## 常见问题
|
|
277
285
|
|
|
@@ -295,9 +303,9 @@ A: 点击“应用到 Claude 配置”后会写入 `~/.claude/settings.json`,
|
|
|
295
303
|
|
|
296
304
|
A: 运行 `npm uninstall -g codexmate`。
|
|
297
305
|
|
|
298
|
-
##
|
|
306
|
+
## 附属功能:压缩/解压
|
|
299
307
|
|
|
300
|
-
|
|
308
|
+
优先使用 7-Zip 多线程压缩/解压。缺失时回退内置 JS 库。
|
|
301
309
|
|
|
302
310
|
```bash
|
|
303
311
|
# 压缩文件或文件夹(默认压缩级别 5)
|
|
@@ -332,7 +340,7 @@ codexmate unzip ./my-project.zip
|
|
|
332
340
|
codexmate unzip ./backup.zip D:/restored
|
|
333
341
|
```
|
|
334
342
|
|
|
335
|
-
|
|
343
|
+
注意:7-Zip 非必需。未安装时使用内置 JS 库;`--max` 仅对 7-Zip 生效。
|
|
336
344
|
|
|
337
345
|
## 技术栈
|
|
338
346
|
|