codexmate 0.0.3 → 0.0.5
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/ISSUE_TEMPLATE/bug_report.md +27 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- package/.github/workflows/release.yml +42 -42
- package/CHANGELOG.md +7 -0
- package/CHANGELOG.zh-CN.md +7 -0
- package/README.md +112 -58
- package/README.zh-CN.md +115 -57
- package/cli.js +1536 -182
- package/cmd/publish-npm.cmd +65 -65
- package/package.json +33 -25
- package/res/screenshot.png +0 -0
- package/tests/e2e/recent-health.e2e.js +135 -0
- package/tests/e2e/run.js +294 -0
- package/web-ui.html +865 -63
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report a problem with Codex Mate
|
|
4
|
+
labels: bug
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Summary**
|
|
8
|
+
A clear and concise description of the bug.
|
|
9
|
+
|
|
10
|
+
**Steps to reproduce**
|
|
11
|
+
1.
|
|
12
|
+
2.
|
|
13
|
+
3.
|
|
14
|
+
|
|
15
|
+
**Expected behavior**
|
|
16
|
+
What you expected to happen.
|
|
17
|
+
|
|
18
|
+
**Actual behavior**
|
|
19
|
+
What actually happened.
|
|
20
|
+
|
|
21
|
+
**Environment**
|
|
22
|
+
- OS:
|
|
23
|
+
- Node.js version:
|
|
24
|
+
- Codex Mate version:
|
|
25
|
+
|
|
26
|
+
**Logs or screenshots**
|
|
27
|
+
Paste relevant logs or screenshots.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest a new idea for Codex Mate
|
|
4
|
+
labels: enhancement
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Problem**
|
|
8
|
+
What problem are you trying to solve?
|
|
9
|
+
|
|
10
|
+
**Proposed solution**
|
|
11
|
+
Describe the solution you want.
|
|
12
|
+
|
|
13
|
+
**Alternatives**
|
|
14
|
+
Any alternative solutions or features you considered.
|
|
15
|
+
|
|
16
|
+
**Additional context**
|
|
17
|
+
Add any other context or screenshots.
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
name: release
|
|
1
|
+
name: release
|
|
2
2
|
run-name: "${{ github.event.repository.name }} ${{ inputs.tag }}"
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
tag:
|
|
7
|
-
description: 'Tag to release (e.g., v0.0.1)'
|
|
8
|
-
required: true
|
|
9
|
-
permissions:
|
|
10
|
-
contents: write
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
release:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- name: Checkout tag
|
|
17
|
-
uses: actions/checkout@v4
|
|
18
|
-
with:
|
|
19
|
-
ref: ${{ inputs.tag }}
|
|
20
|
-
fetch-depth: 0
|
|
21
|
-
- uses: actions/setup-node@v4
|
|
22
|
-
with:
|
|
23
|
-
node-version: '18'
|
|
24
|
-
cache: 'npm'
|
|
25
|
-
- name: Verify tag matches package.json version
|
|
26
|
-
run: |
|
|
27
|
-
node -e "const pkg=require('./package.json'); const tag='${{ inputs.tag }}'; const expected='v'+pkg.version; if(tag!==expected){ console.error('Tag '+tag+' does not match package.json version '+expected); process.exit(1);} console.log('Tag matches '+expected);"
|
|
28
|
-
- name: Compute release name
|
|
29
|
-
run: |
|
|
30
|
-
node -e "const p=require('./package.json'); const tag='${{ inputs.tag }}'; const name=p.name.includes('/')? p.name.split('/')[1]: p.name; const value=name+' '+tag; console.log('RELEASE_NAME='+value);" >> "$GITHUB_ENV"
|
|
31
|
-
- name: Pack npm artifact
|
|
32
|
-
run: |
|
|
33
|
-
name=$(node -e "const p=require('./package.json'); const n=p.name.replace('@','').replace('/','-'); process.stdout.write(n+'-'+p.version+'.tgz');")
|
|
34
|
-
npm pack
|
|
35
|
-
test -f "$name"
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
tag:
|
|
7
|
+
description: 'Tag to release (e.g., v0.0.1)'
|
|
8
|
+
required: true
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout tag
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
ref: ${{ inputs.tag }}
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
- uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: '18'
|
|
24
|
+
cache: 'npm'
|
|
25
|
+
- name: Verify tag matches package.json version
|
|
26
|
+
run: |
|
|
27
|
+
node -e "const pkg=require('./package.json'); const tag='${{ inputs.tag }}'; const expected='v'+pkg.version; if(tag!==expected){ console.error('Tag '+tag+' does not match package.json version '+expected); process.exit(1);} console.log('Tag matches '+expected);"
|
|
28
|
+
- name: Compute release name
|
|
29
|
+
run: |
|
|
30
|
+
node -e "const p=require('./package.json'); const tag='${{ inputs.tag }}'; const name=p.name.includes('/')? p.name.split('/')[1]: p.name; const value=name+' '+tag; console.log('RELEASE_NAME='+value);" >> "$GITHUB_ENV"
|
|
31
|
+
- name: Pack npm artifact
|
|
32
|
+
run: |
|
|
33
|
+
name=$(node -e "const p=require('./package.json'); const n=p.name.replace('@','').replace('/','-'); process.stdout.write(n+'-'+p.version+'.tgz');")
|
|
34
|
+
npm pack
|
|
35
|
+
test -f "$name"
|
|
36
36
|
echo "PACKAGE_TGZ=$name" >> "$GITHUB_ENV"
|
|
37
|
-
- name: Create GitHub Release
|
|
38
|
-
uses: softprops/action-gh-release@v2
|
|
39
|
-
with:
|
|
40
|
-
tag_name: ${{ inputs.tag }}
|
|
41
|
-
name: ${{ env.RELEASE_NAME }}
|
|
42
|
-
prerelease: false
|
|
43
|
-
draft: false
|
|
44
|
-
files: ${{ env.PACKAGE_TGZ }}
|
|
37
|
+
- name: Create GitHub Release
|
|
38
|
+
uses: softprops/action-gh-release@v2
|
|
39
|
+
with:
|
|
40
|
+
tag_name: ${{ inputs.tag }}
|
|
41
|
+
name: ${{ env.RELEASE_NAME }}
|
|
42
|
+
prerelease: false
|
|
43
|
+
draft: false
|
|
44
|
+
files: ${{ env.PACKAGE_TGZ }}
|
|
45
45
|
generate_release_notes: true
|
package/CHANGELOG.md
ADDED
package/README.md
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
# Codex Mate
|
|
2
2
|
|
|
3
|
-
> A lightweight AI configuration assistant:
|
|
3
|
+
> A lightweight AI configuration assistant: quickly switch Codex providers/models and Claude Code configs, with a unified session browser
|
|
4
4
|
|
|
5
|
-
[](https://github.com/ymkiux/codexmate/actions/workflows/release.yml) [](https://www.npmjs.com/package/codexmate) [](https://github.com/ymkiux/codexmate)
|
|
5
|
+
[](https://github.com/ymkiux/codexmate/actions/workflows/release.yml) [](https://www.npmjs.com/package/codexmate) [](https://github.com/ymkiux/codexmate)
|
|
6
6
|
[](https://github.com/ymkiux/codexmate/commits) [](LICENSE) [](https://nodejs.org)
|
|
7
7
|
|
|
8
8
|
English | [Chinese](README.zh-CN.md)
|
|
9
9
|
|
|
10
10
|
## Overview
|
|
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
|
+
|
|
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.
|
|
13
21
|
|
|
14
22
|
## What You Get
|
|
15
23
|
|
|
@@ -17,19 +25,21 @@ If you frequently switch between models, providers, or configuration profiles, C
|
|
|
17
25
|
- More controllable local configuration management
|
|
18
26
|
- A visual Web UI to reduce CLI burden
|
|
19
27
|
- Change tracking with backups
|
|
28
|
+
- A unified session browser for Codex + Claude Code (view/export/copy resume command when available)
|
|
20
29
|
|
|
21
30
|
## Feature Overview
|
|
22
31
|
|
|
23
32
|
| Module | Problem | Key Capabilities |
|
|
24
33
|
| --- | --- | --- |
|
|
25
34
|
| Codex Config | Switching providers/models is painful | Provider/model switching, model management, CLI + Web entry points, template-confirmed writes |
|
|
26
|
-
| Claude Code Config | Multiple profiles and inconsistent write paths | Profile management, default write to `~/.claude/settings.json
|
|
27
|
-
|
|
|
35
|
+
| Claude Code Config | Multiple profiles and inconsistent write paths | Profile management, default write to `~/.claude/settings.json` |
|
|
36
|
+
| OpenClaw Config | OpenClaw configs are scattered | JSON5 profiles, apply to `~/.openclaw/openclaw.json`, AGENTS workspace management |
|
|
37
|
+
| Session Browser | Local sessions are hard to track | List/filter sessions, export to Markdown, copy resume command (when available), delete and batch cleanup |
|
|
28
38
|
| Utilities | Compression/extraction requires extra tools | Multithreaded compress/unzip via 7-Zip |
|
|
29
39
|
|
|
30
40
|
## Why Codex Mate
|
|
31
41
|
|
|
32
|
-
- Focused on
|
|
42
|
+
- Focused on three jobs: Codex provider/model switching + Claude Code config apply + OpenClaw config apply
|
|
33
43
|
- Local-first: configs and API keys are written to local files, not the cloud
|
|
34
44
|
- Lightweight: CLI + Web, no desktop app required
|
|
35
45
|
- Reversible: auto-backup before first takeover
|
|
@@ -38,61 +48,93 @@ If you frequently switch between models, providers, or configuration profiles, C
|
|
|
38
48
|
|
|
39
49
|
- Frequent provider/model switching, want a one-command flow
|
|
40
50
|
- Use both Codex and Claude Code, want a single entry point
|
|
51
|
+
- Need to browse/export local Codex + Claude Code sessions and copy resume commands when available
|
|
52
|
+
- Use OpenClaw with multiple profiles, want quick switching
|
|
41
53
|
- Multi-project or multi-environment setups that need quick config changes
|
|
42
54
|
- Want a visual UI without a heavy client
|
|
43
55
|
|
|
44
56
|
## Scope and Boundaries
|
|
45
57
|
|
|
46
|
-
- Only configuration management for Codex
|
|
58
|
+
- Only configuration management for Codex, Claude Code, and OpenClaw, not a full all-in-one tool suite
|
|
47
59
|
- No built-in proxy/relay/billing dashboard/cloud sync (kept lightweight)
|
|
48
60
|
- Web UI runs only when you start it (`codexmate start`)
|
|
49
61
|
|
|
62
|
+
## 30-Second Start (No Install)
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx codexmate@latest status
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx codexmate@latest start
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Then open `http://localhost:3737` in your browser.
|
|
73
|
+
|
|
50
74
|
## Quick Start
|
|
51
75
|
|
|
52
|
-
1. Install (global):
|
|
53
|
-
```bash
|
|
54
|
-
npm install -g codexmate
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Or run once without install:
|
|
58
|
-
```bash
|
|
59
|
-
npx codexmate@latest status
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
2.
|
|
63
|
-
```bash
|
|
64
|
-
codexmate
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
3.
|
|
76
|
+
1. Install (global):
|
|
77
|
+
```bash
|
|
78
|
+
npm install -g codexmate
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Or run once without install:
|
|
82
|
+
```bash
|
|
83
|
+
npx codexmate@latest status
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
2. Run the interactive setup:
|
|
87
|
+
```bash
|
|
88
|
+
codexmate setup
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
3. Check status:
|
|
92
|
+
```bash
|
|
93
|
+
codexmate status
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
4. Start the Web UI:
|
|
68
97
|
```bash
|
|
69
98
|
codexmate start
|
|
70
99
|
```
|
|
71
100
|
|
|
72
101
|
Then open `http://localhost:3737` in your browser.
|
|
73
102
|
|
|
103
|
+
## Alternatives
|
|
104
|
+
|
|
105
|
+
- cc-switch: https://github.com/farion1231/cc-switch
|
|
106
|
+
|
|
74
107
|
## UI Preview
|
|
75
108
|
|
|
76
109
|

|
|
77
110
|
|
|
78
111
|
## Install
|
|
79
112
|
|
|
80
|
-
### Global (Recommended)
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npm install -g codexmate
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Package name on npm: `codexmate`.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
113
|
+
### Global (Recommended)
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm install -g codexmate
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Package name on npm: `codexmate`.
|
|
120
|
+
|
|
121
|
+
Want to update to the latest effects features each time? Install from GitHub (re-run to update):
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm install -g ymkiux/codexmate
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Run with npx (No Install)
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npx codexmate@latest status
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
npx codexmate@latest start
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### From Source
|
|
96
138
|
|
|
97
139
|
```bash
|
|
98
140
|
git clone https://github.com/ymkiux/codexmate.git
|
|
@@ -111,6 +153,7 @@ npm link
|
|
|
111
153
|
| Command | Description |
|
|
112
154
|
| --- | --- |
|
|
113
155
|
| `codexmate` | Show help and available commands |
|
|
156
|
+
| `codexmate setup` | Interactive configuration wizard |
|
|
114
157
|
| `codexmate status` | Show current status |
|
|
115
158
|
| `codexmate list` | List all providers |
|
|
116
159
|
| `codexmate switch <provider>` | Switch provider |
|
|
@@ -143,8 +186,13 @@ codexmate start
|
|
|
143
186
|
|
|
144
187
|
- Manage multiple Claude Code profiles
|
|
145
188
|
- Configure API key, Base URL, and model
|
|
146
|
-
- Default write to `env` in `~/.claude/settings.json`: `env.ANTHROPIC_API_KEY` / `env.
|
|
147
|
-
|
|
189
|
+
- Default write to `env` in `~/.claude/settings.json`: `env.ANTHROPIC_API_KEY` / `env.ANTHROPIC_BASE_URL` / `env.ANTHROPIC_MODEL`
|
|
190
|
+
|
|
191
|
+
### OpenClaw Config Mode
|
|
192
|
+
|
|
193
|
+
- Manage multiple OpenClaw JSON5 profiles
|
|
194
|
+
- Apply to `~/.openclaw/openclaw.json`
|
|
195
|
+
- Manage `AGENTS.md` under the OpenClaw Workspace (default: `~/.openclaw/workspace/AGENTS.md`)
|
|
148
196
|
|
|
149
197
|
### Session Browser
|
|
150
198
|
|
|
@@ -152,6 +200,7 @@ codexmate start
|
|
|
152
200
|
- Filter by source (Codex / Claude / All)
|
|
153
201
|
- Filter by session path (cwd), auto refresh on selection
|
|
154
202
|
- Export selected sessions to Markdown
|
|
203
|
+
- Copy resume command when available
|
|
155
204
|
- Delete single sessions (local jsonl records)
|
|
156
205
|
- Batch delete multiple sessions with partial failure summary
|
|
157
206
|
- Delete individual records or multi-select within session details (writes back to original jsonl)
|
|
@@ -178,6 +227,11 @@ Claude Code config files:
|
|
|
178
227
|
- `~/.claude/settings.json` - Runtime config (default write target)
|
|
179
228
|
- `~/.claude/settings.json.codexmate-backup-*.bak` - Backup before first overwrite
|
|
180
229
|
|
|
230
|
+
OpenClaw config files:
|
|
231
|
+
|
|
232
|
+
- `~/.openclaw/openclaw.json` - OpenClaw config (JSON5)
|
|
233
|
+
- `~/.openclaw/workspace/AGENTS.md` - OpenClaw workspace instructions
|
|
234
|
+
|
|
181
235
|
## First Run Initialization
|
|
182
236
|
|
|
183
237
|
When you run `codexmate` for the first time and an existing `~/.codex/config.toml` is detected that is not managed by Codex Mate:
|
|
@@ -208,7 +262,7 @@ codexmate use gpt-4-turbo
|
|
|
208
262
|
2. Switch to "Claude Code Config" mode in the browser
|
|
209
263
|
3. Add a profile (example Zhipu GLM): Name=ZhipuGLM, API Key=your API key, Base URL=`https://open.bigmodel.cn/api/anthropic`, Model=`glm-4.7`
|
|
210
264
|
4. Click the card to apply, or use "Save & Apply to Claude Config" in the editor
|
|
211
|
-
5. Default write to `~/.claude/settings.json
|
|
265
|
+
5. Default write to `~/.claude/settings.json`
|
|
212
266
|
6. Restart Claude Code to apply
|
|
213
267
|
|
|
214
268
|
### Start the Web UI
|
|
@@ -223,7 +277,7 @@ Then open `http://localhost:3737`.
|
|
|
223
277
|
|
|
224
278
|
### Q: Which operating systems are supported?
|
|
225
279
|
|
|
226
|
-
A: Codex features support Windows and Linux (CLI and Web). Claude Code config applies to Windows / macOS / Linux (writes to `~/.claude/settings.json`).
|
|
280
|
+
A: Codex features support Windows and Linux (CLI and Web). Claude Code config applies to Windows / macOS / Linux (writes to `~/.claude/settings.json`).
|
|
227
281
|
|
|
228
282
|
### Q: Where are API keys stored?
|
|
229
283
|
|
|
@@ -235,7 +289,7 @@ A: The Web UI runs locally; all operations happen on your machine. API keys are
|
|
|
235
289
|
|
|
236
290
|
### Q: How do Claude Code configs take effect?
|
|
237
291
|
|
|
238
|
-
A: After clicking "Apply to Claude Config", it writes to `~/.claude/settings.json`. Restart Claude Code to apply.
|
|
292
|
+
A: After clicking "Apply to Claude Config", it writes to `~/.claude/settings.json`. Restart Claude Code to apply.
|
|
239
293
|
|
|
240
294
|
### Q: How to uninstall?
|
|
241
295
|
|
|
@@ -280,20 +334,20 @@ codexmate unzip ./backup.zip D:/restored
|
|
|
280
334
|
|
|
281
335
|
Note: Requires [7-Zip](https://www.7-zip.org/) installed.
|
|
282
336
|
|
|
283
|
-
## Tech Stack
|
|
284
|
-
|
|
285
|
-
- **Node.js** - Runtime
|
|
286
|
-
- **@iarna/toml** - TOML parser
|
|
287
|
-
- **Vue.js 3** - Web UI framework
|
|
288
|
-
- **Native HTTP** - Built-in Web server
|
|
289
|
-
|
|
290
|
-
## Release (GitHub Actions)
|
|
291
|
-
|
|
292
|
-
Create a tag that matches `package.json` (for example `v0.0.1`). Then run the `release` workflow in GitHub Actions and input that tag. It will create a GitHub Release and attach the `npm pack` `.tgz` artifact.
|
|
293
|
-
|
|
294
|
-
## License
|
|
295
|
-
|
|
296
|
-
Apache-2.0 © [ymkiux](https://github.com/ymkiux)
|
|
337
|
+
## Tech Stack
|
|
338
|
+
|
|
339
|
+
- **Node.js** - Runtime
|
|
340
|
+
- **@iarna/toml** - TOML parser
|
|
341
|
+
- **Vue.js 3** - Web UI framework
|
|
342
|
+
- **Native HTTP** - Built-in Web server
|
|
343
|
+
|
|
344
|
+
## Release (GitHub Actions)
|
|
345
|
+
|
|
346
|
+
Create a tag that matches `package.json` (for example `v0.0.1`). Then run the `release` workflow in GitHub Actions and input that tag. It will create a GitHub Release and attach the `npm pack` `.tgz` artifact.
|
|
347
|
+
|
|
348
|
+
## License
|
|
349
|
+
|
|
350
|
+
Apache-2.0 © [ymkiux](https://github.com/ymkiux)
|
|
297
351
|
|
|
298
352
|
## Contributing
|
|
299
353
|
|