codexmate 0.0.19 → 0.0.21

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.
Files changed (102) hide show
  1. package/README.en.md +349 -255
  2. package/README.md +284 -248
  3. package/cli/agents-files.js +162 -0
  4. package/cli/archive-helpers.js +446 -0
  5. package/cli/auth-profiles.js +359 -0
  6. package/cli/builtin-proxy.js +580 -0
  7. package/cli/claude-proxy.js +998 -0
  8. package/cli/config-bootstrap.js +384 -0
  9. package/cli/config-health.js +338 -0
  10. package/cli/openclaw-config.js +629 -0
  11. package/cli/skills.js +1141 -0
  12. package/cli/zip-commands.js +510 -0
  13. package/cli.js +13129 -12973
  14. package/lib/cli-file-utils.js +151 -151
  15. package/lib/cli-models-utils.js +419 -152
  16. package/lib/cli-network-utils.js +164 -148
  17. package/lib/cli-path-utils.js +69 -0
  18. package/lib/cli-session-utils.js +121 -121
  19. package/lib/cli-sessions.js +386 -0
  20. package/lib/cli-utils.js +155 -155
  21. package/lib/download-artifacts.js +77 -0
  22. package/lib/mcp-stdio.js +440 -440
  23. package/lib/task-orchestrator.js +869 -0
  24. package/lib/text-diff.js +303 -303
  25. package/lib/workflow-engine.js +340 -340
  26. package/package.json +74 -63
  27. package/res/json5.min.js +1 -1
  28. package/res/vue.global.prod.js +13 -0
  29. package/web-ui/app.js +530 -5548
  30. package/web-ui/index.html +33 -2246
  31. package/web-ui/logic.agents-diff.mjs +386 -0
  32. package/web-ui/logic.claude.mjs +168 -0
  33. package/web-ui/logic.mjs +5 -793
  34. package/web-ui/logic.runtime.mjs +124 -0
  35. package/web-ui/logic.sessions.mjs +581 -0
  36. package/web-ui/modules/api.mjs +90 -0
  37. package/web-ui/modules/app.computed.dashboard.mjs +113 -0
  38. package/web-ui/modules/app.computed.index.mjs +15 -0
  39. package/web-ui/modules/app.computed.main-tabs.mjs +195 -0
  40. package/web-ui/modules/app.computed.session.mjs +507 -0
  41. package/web-ui/modules/app.constants.mjs +15 -0
  42. package/web-ui/modules/app.methods.agents.mjs +493 -0
  43. package/web-ui/modules/app.methods.claude-config.mjs +174 -0
  44. package/web-ui/modules/app.methods.codex-config.mjs +640 -0
  45. package/web-ui/modules/app.methods.index.mjs +88 -0
  46. package/web-ui/modules/app.methods.install.mjs +149 -0
  47. package/web-ui/modules/app.methods.navigation.mjs +619 -0
  48. package/web-ui/modules/app.methods.openclaw-core.mjs +814 -0
  49. package/web-ui/modules/app.methods.openclaw-editing.mjs +372 -0
  50. package/web-ui/modules/app.methods.openclaw-persist.mjs +369 -0
  51. package/web-ui/modules/app.methods.providers.mjs +363 -0
  52. package/web-ui/modules/app.methods.runtime.mjs +323 -0
  53. package/web-ui/modules/app.methods.session-actions.mjs +520 -0
  54. package/web-ui/modules/app.methods.session-browser.mjs +626 -0
  55. package/web-ui/modules/app.methods.session-timeline.mjs +448 -0
  56. package/web-ui/modules/app.methods.session-trash.mjs +422 -0
  57. package/web-ui/modules/app.methods.startup-claude.mjs +412 -0
  58. package/web-ui/modules/app.methods.task-orchestration.mjs +471 -0
  59. package/web-ui/modules/config-mode.computed.mjs +126 -124
  60. package/web-ui/modules/skills.computed.mjs +107 -107
  61. package/web-ui/modules/skills.methods.mjs +481 -481
  62. package/web-ui/partials/index/layout-footer.html +13 -0
  63. package/web-ui/partials/index/layout-header.html +402 -0
  64. package/web-ui/partials/index/modal-config-template-agents.html +125 -0
  65. package/web-ui/partials/index/modal-confirm-toast.html +32 -0
  66. package/web-ui/partials/index/modal-health-check.html +72 -0
  67. package/web-ui/partials/index/modal-openclaw-config.html +280 -0
  68. package/web-ui/partials/index/modal-skills.html +184 -0
  69. package/web-ui/partials/index/modals-basic.html +156 -0
  70. package/web-ui/partials/index/panel-config-claude.html +126 -0
  71. package/web-ui/partials/index/panel-config-codex.html +237 -0
  72. package/web-ui/partials/index/panel-config-openclaw.html +78 -0
  73. package/web-ui/partials/index/panel-docs.html +130 -0
  74. package/web-ui/partials/index/panel-market.html +174 -0
  75. package/web-ui/partials/index/panel-orchestration.html +397 -0
  76. package/web-ui/partials/index/panel-sessions.html +292 -0
  77. package/web-ui/partials/index/panel-settings.html +190 -0
  78. package/web-ui/partials/index/panel-usage.html +213 -0
  79. package/web-ui/session-helpers.mjs +559 -362
  80. package/web-ui/source-bundle.cjs +233 -0
  81. package/web-ui/styles/base-theme.css +271 -0
  82. package/web-ui/styles/controls-forms.css +360 -0
  83. package/web-ui/styles/docs-panel.css +182 -0
  84. package/web-ui/styles/feedback.css +108 -0
  85. package/web-ui/styles/health-check-dialog.css +144 -0
  86. package/web-ui/styles/layout-shell.css +376 -0
  87. package/web-ui/styles/modals-core.css +464 -0
  88. package/web-ui/styles/navigation-panels.css +348 -0
  89. package/web-ui/styles/openclaw-structured.css +266 -0
  90. package/web-ui/styles/responsive.css +450 -0
  91. package/web-ui/styles/sessions-list.css +400 -0
  92. package/web-ui/styles/sessions-preview.css +411 -0
  93. package/web-ui/styles/sessions-toolbar-trash.css +243 -0
  94. package/web-ui/styles/sessions-usage.css +628 -0
  95. package/web-ui/styles/skills-list.css +296 -0
  96. package/web-ui/styles/skills-market.css +335 -0
  97. package/web-ui/styles/task-orchestration.css +776 -0
  98. package/web-ui/styles/titles-cards.css +408 -0
  99. package/web-ui/styles.css +18 -4668
  100. package/web-ui.html +17 -17
  101. package/res/screenshot.png +0 -0
  102. package/res/vue.global.js +0 -18552
package/README.en.md CHANGED
@@ -1,255 +1,349 @@
1
- <div align="center">
2
-
3
- # Codex Mate
4
-
5
- **Local configuration and session manager for Codex / Claude Code / OpenClaw**
6
-
7
- [![Build](https://img.shields.io/github/actions/workflow/status/SakuraByteCore/codexmate/release.yml?label=build)](https://github.com/SakuraByteCore/codexmate/actions/workflows/release.yml)
8
- [![Version](https://img.shields.io/npm/v/codexmate?label=version&registry_uri=https%3A%2F%2Fregistry.npmjs.org)](https://www.npmjs.com/package/codexmate)
9
- [![Downloads](https://img.shields.io/npm/dt/codexmate?label=downloads)](https://www.npmjs.com/package/codexmate)
10
- [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
11
- [![Node](https://img.shields.io/badge/node-%3E%3D14.0.0-green.svg)](https://nodejs.org)
12
-
13
- [Quick Start](#quick-start) · [Commands](#command-reference) · [Web UI](#web-ui) · [MCP](#mcp) · [中文](README.md)
14
-
15
- </div>
16
-
17
- ---
18
-
19
- ## What Is This?
20
-
21
- Codex Mate is a local-first CLI + Web UI for unified management of:
22
-
23
- - Codex provider/model switching and config writes
24
- - Claude Code profiles (writes to `~/.claude/settings.json`)
25
- - OpenClaw JSON5 profiles and workspace `AGENTS.md`
26
- - Local skills market for Codex / Claude Code (target switching, local skills management, cross-app import, ZIP distribution)
27
- - Local Codex/Claude sessions (list/filter/export/delete)
28
-
29
- It works on local files directly and does not require cloud hosting. The skills market is also local-first: it operates on local directories and does not depend on a remote marketplace.
30
-
31
- ## Comparison
32
-
33
- | Dimension | Codex Mate | Manual File Editing |
34
- | --- | --- | --- |
35
- | Multi-tool management | Codex + Claude Code + OpenClaw in one entry | Different files and folders per tool |
36
- | Operation mode | CLI + local Web UI | Manual TOML/JSON/JSON5 edits |
37
- | Session handling | Browse/export/batch cleanup | Manual file location and processing |
38
- | Skills reuse | Local skills market + cross-app import + ZIP distribution | Manual folder copy and reconciliation |
39
- | Rollback readiness | Backup before first takeover | Easy to overwrite by mistake |
40
- | Automation integration | MCP stdio (read-only by default) | Requires custom scripting |
41
-
42
- ## Core Features
43
-
44
- **Configuration**
45
- - Provider/model switching (`switch`, `use`)
46
- - Codex `config.toml` template confirmation before write
47
- - Claude Code profile management and apply
48
- - OpenClaw JSON5 profile management
49
-
50
- **Session Management**
51
- - Unified Codex + Claude session list
52
- - Local session pinning with persistent pinned state and pinned-first ordering
53
- - Keyword/source/cwd filters
54
- - Markdown export
55
- - Session-level and message-level delete (supports batch)
56
-
57
- **Skills Market**
58
- - Switch the skills install target between Codex and Claude Code
59
- - Inspect local installed skills, root paths, and status
60
- - Scan importable sources from `Codex` / `Claude Code` / `Agents`
61
- - Support cross-app import, ZIP import/export, and batch delete
62
-
63
- **Engineering Utilities**
64
- - MCP stdio domains (`tools`, `resources`, `prompts`)
65
- - Built-in proxy controls (`proxy`)
66
- - Auth profile management (`auth`)
67
- - Zip/unzip utilities
68
-
69
- ## Architecture
70
-
71
- ```mermaid
72
- flowchart TB
73
- subgraph Interfaces["Entry Surfaces"]
74
- CLI["CLI"]
75
- WEB["Web UI"]
76
- MCP["MCP Client"]
77
- OAI["Codex / OpenAI Client"]
78
- end
79
-
80
- subgraph Runtime["Codex Mate Runtime"]
81
- ENTRY["cli.js Entry"]
82
- API["Local HTTP API"]
83
- MCPS["MCP stdio Server"]
84
- PROXY["Built-in Proxy"]
85
- SERVICES["Config / Sessions / Skills Market / Workflow"]
86
- CORE["File IO / Network / Diff / Session Utils"]
87
- end
88
-
89
- subgraph Data["Local Files"]
90
- CODEX["~/.codex/config + auth + models"]
91
- CLAUDE["~/.claude/settings.json"]
92
- OPENCLAW["~/.openclaw/*.json5 + ~/.openclaw/openclaw.json + workspace/AGENTS.md"]
93
- SKILLS["~/.codex/skills / ~/.claude/skills / ~/.agents/skills"]
94
- STATE["sessions / trash / workflow runs / skill exports"]
95
- end
96
-
97
- CLI --> ENTRY
98
- WEB -->|GET / + POST /api| API
99
- MCP -->|stdio JSON-RPC| MCPS
100
- OAI -->|HTTP /v1| PROXY
101
-
102
- ENTRY --> SERVICES
103
- API --> SERVICES
104
- MCPS --> SERVICES
105
- PROXY --> CORE
106
-
107
- SERVICES --> CORE
108
-
109
- CORE --> CODEX
110
- CORE --> CLAUDE
111
- CORE --> OPENCLAW
112
- CORE --> SKILLS
113
- CORE --> STATE
114
- ```
115
-
116
- ## Quick Start
117
-
118
- ### Install from npm
119
-
120
- ```bash
121
- npm install -g codexmate
122
- codexmate setup
123
- codexmate status
124
- codexmate run
125
- ```
126
-
127
- Default listen address is `0.0.0.0:3737` for LAN access, and browser auto-open is enabled by default.
128
-
129
- > Safety note: the unauthenticated management UI is exposed to your current LAN by default. Use trusted networks only; for local-only access, set `CODEXMATE_HOST=127.0.0.1` or pass `--host 127.0.0.1`.
130
-
131
- ### Run from source
132
-
133
- ```bash
134
- git clone https://github.com/SakuraByteCore/codexmate.git
135
- cd codexmate
136
- npm install
137
- npm start run
138
- ```
139
-
140
- ### Tests / CI (service only)
141
-
142
- ```bash
143
- npm start run --no-browser
144
- ```
145
-
146
- > Convention: automated tests validate service and API behavior only, without opening browser pages.
147
-
148
- ## Command Reference
149
-
150
- | Command | Description |
151
- | --- | --- |
152
- | `codexmate status` | Show current config status |
153
- | `codexmate setup` | Interactive setup |
154
- | `codexmate list` / `codexmate models` | List providers / models |
155
- | `codexmate switch <provider>` / `codexmate use <model>` | Switch provider / model |
156
- | `codexmate add <name> <URL> [API_KEY]` | Add provider |
157
- | `codexmate delete <name>` | Delete provider |
158
- | `codexmate claude <BaseURL> <API_KEY> [model]` | Write Claude Code config |
159
- | `codexmate auth <list\|import\|switch\|delete\|status>` | Auth profile management |
160
- | `codexmate proxy <status\|set\|apply\|enable\|start\|stop>` | Built-in proxy management |
161
- | `codexmate workflow <list\|get\|validate\|run\|runs>` | MCP workflow management |
162
- | `codexmate codex [args...] [--follow-up <text> repeatable]` | Codex CLI passthrough entrypoint (auto-adds `--yolo`, supports queued follow-up appends) |
163
- | `codexmate qwen [args...]` | Qwen CLI passthrough entrypoint |
164
- | `codexmate run [--host <HOST>] [--no-browser]` | Start Web UI |
165
- | `codexmate mcp serve [--read-only\|--allow-write]` | Start MCP stdio server |
166
- | `codexmate export-session --source <codex\|claude> ...` | Export session to Markdown |
167
- | `codexmate zip <path> [--max:0-9]` / `codexmate unzip <zip> [out]` | Zip / unzip |
168
- | `codexmate unzip-ext <zip-dir> [out] [--ext:suffix[,suffix...]] [--no-recursive]` | Extract files with target suffixes from ZIP files in a directory (default `.json`, recursive by default) |
169
-
170
- ### Codex Follow-up Append (Optional)
171
-
172
- ```bash
173
- codexmate codex --follow-up "scan repository first" --follow-up "then fix failing tests"
174
- codexmate codex --model gpt-5.3-codex --follow-up "step1" --follow-up "step2"
175
- ```
176
-
177
- > Note: both `--follow-up` and `--queued-follow-up` are accepted and repeatable.
178
-
179
- ## Web UI
180
-
181
- ### Codex Mode
182
- - Provider/model switching
183
- - Model list management
184
- - `~/.codex/AGENTS.md` editing
185
-
186
- ### Claude Code Mode
187
- - Multi-profile management
188
- - Default write to `~/.claude/settings.json`
189
- - Shareable import command copy
190
-
191
- ### OpenClaw Mode
192
- - JSON5 multi-profile management
193
- - Apply to `~/.openclaw/openclaw.json`
194
- - Manage `~/.openclaw/workspace/AGENTS.md`
195
-
196
- ### Sessions Mode
197
- - Unified Codex + Claude sessions
198
- - Local pin/unpin with persistent storage and pinned-first ordering
199
- - Search, filter, export, delete, batch cleanup
200
-
201
- ### Skills Market Tab
202
- - Switch the skills install target between `Codex` and `Claude Code`
203
- - Show the current local skills root, installed items, and importable items
204
- - Scan importable sources under `Codex` / `Claude Code` / `Agents`
205
- - Support cross-app import, ZIP import/export, and batch delete
206
-
207
- ## MCP
208
-
209
- > Transport: `stdio`
210
-
211
- - Default: read-only tools
212
- - Enable writes: `--allow-write` or `CODEXMATE_MCP_ALLOW_WRITE=1`
213
- - Domains: `tools`, `resources`, `prompts`
214
-
215
- Examples:
216
-
217
- ```bash
218
- codexmate mcp serve --read-only
219
- codexmate mcp serve --allow-write
220
- ```
221
-
222
- ## Config Files
223
-
224
- - `~/.codex/config.toml`
225
- - `~/.codex/auth.json`
226
- - `~/.codex/models.json`
227
- - `~/.codex/provider-current-models.json`
228
- - `~/.claude/settings.json`
229
- - `~/.openclaw/openclaw.json`
230
- - `~/.openclaw/workspace/AGENTS.md`
231
-
232
- ## Environment Variables
233
-
234
- | Variable | Default | Description |
235
- | --- | --- | --- |
236
- | `CODEXMATE_PORT` | `3737` | Web server port |
237
- | `CODEXMATE_HOST` | `0.0.0.0` | Web listen host (set `127.0.0.1` for local-only access) |
238
- | `CODEXMATE_NO_BROWSER` | unset | Set `1` to disable browser auto-open |
239
- | `CODEXMATE_MCP_ALLOW_WRITE` | unset | Set `1` to allow MCP write tools by default |
240
- | `CODEXMATE_FORCE_RESET_EXISTING_CONFIG` | `0` | Set `1` to force bootstrap reset of existing config |
241
-
242
- ## Tech Stack
243
-
244
- - Node.js
245
- - Vue.js 3 (Web UI)
246
- - Native HTTP server
247
- - `@iarna/toml`, `json5`
248
-
249
- ## Contributing
250
-
251
- Issues and pull requests are accepted.
252
-
253
- ## License
254
-
255
- Apache-2.0
1
+ <div align="center">
2
+
3
+ <img src="res/logo.png" alt="Codex Mate logo" width="180" />
4
+
5
+ # Codex Mate
6
+
7
+ **Local configuration and session manager for Codex / Claude Code / OpenClaw**
8
+
9
+ [![Build](https://img.shields.io/github/actions/workflow/status/SakuraByteCore/codexmate/release.yml?label=build)](https://github.com/SakuraByteCore/codexmate/actions/workflows/release.yml)
10
+ [![Version](https://img.shields.io/npm/v/codexmate?label=version&registry_uri=https%3A%2F%2Fregistry.npmjs.org)](https://www.npmjs.com/package/codexmate)
11
+ [![Downloads](https://img.shields.io/npm/dt/codexmate?label=downloads)](https://www.npmjs.com/package/codexmate)
12
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
13
+ [![Node](https://img.shields.io/badge=node-%3E%3D14.0.0-green.svg)](https://nodejs.org/)
14
+
15
+ [Quick Start](#quick-start) · [Commands](#command-reference) · [Web UI](#web-ui) · [MCP](#mcp) · [中文](README.md)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## What Is This?
22
+
23
+ Codex Mate is a local-first CLI + Web UI for unified management of:
24
+
25
+ - Codex provider/model switching and config writes
26
+ - Claude Code profiles (writes to `~/.claude/settings.json`)
27
+ - OpenClaw JSON5 profiles and workspace `AGENTS.md`
28
+ - Local skills market for Codex / Claude Code (target switching, local skills management, cross-app import, ZIP distribution)
29
+ - Local Codex/Claude sessions (list/filter/export/delete) with Usage analytics overview
30
+
31
+ It works on local files directly and does not require cloud hosting. The skills market is also local-first: it operates on local directories and does not depend on a remote marketplace.
32
+
33
+ ## Comparison
34
+
35
+ | Dimension | Codex Mate | Manual File Editing |
36
+ | --- | --- | --- |
37
+ | Multi-tool management | Codex + Claude Code + OpenClaw in one entry | Different files and folders per tool |
38
+ | Operation mode | CLI + local Web UI | Manual TOML/JSON/JSON5 edits |
39
+ | Session handling | Browse/filter/Usage analytics/export/batch cleanup | Manual file location and processing |
40
+ | Skills reuse | Local skills market + cross-app import + ZIP distribution | Manual folder copy and reconciliation |
41
+ | Operational visibility | Unified view of config, sessions, and Usage summaries | Depends on manual file inspection and scattered commands |
42
+ | Rollback readiness | Backup before first takeover | Easy to overwrite by mistake |
43
+ | Automation integration | MCP stdio (read-only by default) | Requires custom scripting |
44
+
45
+ ## Core Features
46
+
47
+ **Configuration**
48
+ - Provider/model switching (`switch`, `use`)
49
+ - Codex `config.toml` template confirmation before write
50
+ - Claude Code profile management and apply
51
+ - OpenClaw JSON5 profile management
52
+
53
+ **Session Management**
54
+ - Unified Codex + Claude session list
55
+ - Local session pinning with persistent pinned state and pinned-first ordering
56
+ - Keyword/source/cwd filters
57
+ - Usage subview with 7d / 30d session trends, message trends, source share, and top paths
58
+ - Markdown export
59
+ - Session-level and message-level delete (supports batch)
60
+
61
+ **Skills Market**
62
+ - Switch the skills install target between Codex and Claude Code
63
+ - Inspect local installed skills, root paths, and status
64
+ - Scan importable sources from `Codex` / `Claude Code` / `Agents`
65
+ - Support cross-app import, ZIP import/export, and batch delete
66
+
67
+ **Engineering Utilities**
68
+ - MCP stdio domains (`tools`, `resources`, `prompts`)
69
+ - Built-in proxy controls (`proxy`)
70
+ - Auth profile management (`auth`)
71
+ - Zip/unzip utilities
72
+
73
+ ## Architecture
74
+
75
+ ### At a glance (what it does → what you get)
76
+
77
+ ```mermaid
78
+ flowchart LR
79
+ subgraph You["You"]
80
+ CLI["CLI"]
81
+ WEB["Web UI"]
82
+ MCP["MCP (stdio)"]
83
+ end
84
+
85
+ subgraph Mate["Codex Mate (local control panel)"]
86
+ API["Local HTTP API"]
87
+ CFG["Config management"]
88
+ SESS["Sessions & Usage"]
89
+ SKL["Skills management"]
90
+ end
91
+
92
+ subgraph Files["Local files only (auditable & reversible)"]
93
+ CODEX["~/.codex/*"]
94
+ CLAUDE["~/.claude/settings.json"]
95
+ OPENCLAW["~/.openclaw/*.json5 + ~/.openclaw/openclaw.json + workspace/AGENTS.md"]
96
+ SKILLS["~/.{codex,claude,agents}/skills"]
97
+ STATE["sessions / usage / trash / runs"]
98
+ end
99
+
100
+ CLI --> API
101
+ WEB --> API
102
+ MCP --> API
103
+
104
+ API --> CFG
105
+ API --> SESS
106
+ API --> SKL
107
+
108
+ CFG --> CODEX
109
+ CFG --> CLAUDE
110
+ CFG --> OPENCLAW
111
+ SKL --> SKILLS
112
+ SESS --> STATE
113
+ ```
114
+
115
+ ### Capability → Local target → Outcome
116
+
117
+ | Capability | Local target | What you get |
118
+ | --- | --- | --- |
119
+ | Config management (Codex / Claude / OpenClaw) | `~/.codex/*`, `~/.claude/settings.json`, `~/.openclaw/*` | Faster provider/model switching, multi-profile management, safer writes with backups |
120
+ | Sessions & Usage | sessions / usage aggregates / trash | Quickly locate sessions, filter/export, batch cleanup, and view trends |
121
+ | Skills market | `~/.{codex,claude,agents}/skills` | Local install/import/export (ZIP), cross-app reuse |
122
+ | MCP (stdio) | local API + file operations | Integrate with external tools under controllable permissions (read-only by default) |
123
+
124
+ ## Quick Start
125
+
126
+ ### Install from npm
127
+
128
+ ```bash
129
+ npm install -g codexmate
130
+ codexmate setup
131
+ codexmate status
132
+ codexmate run
133
+ ```
134
+
135
+ Default listen address is `0.0.0.0:3737` for LAN access, and browser auto-open is enabled by default.
136
+
137
+ > Safety note: the unauthenticated management UI is exposed to your current LAN by default. Use trusted networks only; for local-only access, set `CODEXMATE_HOST=127.0.0.1` or pass `--host 127.0.0.1`.
138
+
139
+ ### Run from source
140
+
141
+ ```bash
142
+ git clone https://github.com/SakuraByteCore/codexmate.git
143
+ cd codexmate
144
+ npm install
145
+ npm start run
146
+ ```
147
+
148
+ ### Tests / CI (service only)
149
+
150
+ ```bash
151
+ npm start run --no-browser
152
+ ```
153
+
154
+ > Convention: automated tests validate service and API behavior only, without opening browser pages.
155
+
156
+ ### Developer helper scripts
157
+
158
+ ```bash
159
+ npm run reset
160
+ npm run reset 79
161
+ ```
162
+
163
+ - `npm run reset`: prompt for a PR number; leave it blank to return to default `origin/main`
164
+ - `npm run reset 79`: sync directly to the latest head snapshot of PR `#79`
165
+ - The script also handles local branch switching, workspace cleanup, untracked file cleanup, and final state validation
166
+
167
+ ## Command Reference
168
+
169
+ | Command | Description |
170
+ | --- | --- |
171
+ | `codexmate status` | Show current config status |
172
+ | `codexmate setup` | Interactive setup |
173
+ | `codexmate list` / `codexmate models` | List providers / models |
174
+ | `codexmate switch <provider>` / `codexmate use <model>` | Switch provider / model |
175
+ | `codexmate add <name> <URL> [API_KEY]` | Add provider |
176
+ | `codexmate delete <name>` | Delete provider |
177
+ | `codexmate claude <BaseURL> <API_KEY> [model]` | Write Claude Code config |
178
+ | `codexmate auth <list\|import\|switch\|delete\|status>` | Auth profile management |
179
+ | `codexmate proxy <status\|set\|apply\|enable\|start\|stop>` | Built-in proxy management |
180
+ | `codexmate workflow <list\|get\|validate\|run\|runs>` | MCP workflow management |
181
+ | `codexmate codex [args...] [--follow-up <text> repeatable]` | Codex CLI passthrough entrypoint (auto-adds `--yolo`, supports queued follow-up appends) |
182
+ | `codexmate qwen [args...]` | Qwen CLI passthrough entrypoint |
183
+ | `codexmate run [--host <HOST>] [--no-browser]` | Start Web UI |
184
+ | `codexmate mcp serve [--read-only\|--allow-write]` | Start MCP stdio server |
185
+ | `codexmate export-session --source <codex\|claude> ...` | Export session to Markdown |
186
+ | `codexmate zip <path> [--max:0-9]` / `codexmate unzip <zip> [out]` | Zip / unzip |
187
+ | `codexmate unzip-ext <zip-dir> [out] [--ext:suffix[,suffix...]] [--no-recursive]` | Extract files with target suffixes from ZIP files in a directory (default `.json`, recursive by default) |
188
+
189
+ ### Codex Follow-up Append (Optional)
190
+
191
+ ```bash
192
+ codexmate codex --follow-up "scan repository first" --follow-up "then fix failing tests"
193
+ codexmate codex --model gpt-5.3-codex --follow-up "step1" --follow-up "step2"
194
+ ```
195
+
196
+ > Note: both `--follow-up` and `--queued-follow-up` are accepted and repeatable.
197
+
198
+ ## Web UI
199
+
200
+ ### Codex Mode
201
+ - Provider/model switching
202
+ - Model list management
203
+ - `~/.codex/AGENTS.md` editing
204
+
205
+ ### Claude Code Mode
206
+ - Multi-profile management
207
+ - Default write to `~/.claude/settings.json`
208
+ - Shareable import command copy
209
+
210
+ ### OpenClaw Mode
211
+ - JSON5 multi-profile management
212
+ - Apply to `~/.openclaw/openclaw.json`
213
+ - Manage `~/.openclaw/workspace/AGENTS.md`
214
+
215
+ ### Sessions Mode
216
+ - Unified Codex + Claude sessions
217
+ - Browser / Usage subview switching
218
+ - Local pin/unpin with persistent storage and pinned-first ordering
219
+ - Search, filter, export, delete, batch cleanup
220
+ - Usage view includes 7d / 30d session trends, message trends, source share, and top paths
221
+
222
+ ### Skills Market Tab
223
+ - Switch the skills install target between `Codex` and `Claude Code`
224
+ - Show the current local skills root, installed items, and importable items
225
+ - Scan importable sources under `Codex` / `Claude Code` / `Agents`
226
+ - Support cross-app import, ZIP import/export, and batch delete
227
+
228
+ ## MCP
229
+
230
+ > Transport: `stdio`
231
+
232
+ - Default: read-only tools
233
+ - Enable writes: `--allow-write` or `CODEXMATE_MCP_ALLOW_WRITE=1`
234
+ - Domains: `tools`, `resources`, `prompts`
235
+
236
+ Examples:
237
+
238
+ ```bash
239
+ codexmate mcp serve --read-only
240
+ codexmate mcp serve --allow-write
241
+ ```
242
+
243
+ ## Config Files
244
+
245
+ - `~/.codex/config.toml`
246
+ - `~/.codex/auth.json`
247
+ - `~/.codex/models.json`
248
+ - `~/.codex/provider-current-models.json`
249
+ - `~/.claude/settings.json`
250
+ - `~/.openclaw/openclaw.json`
251
+ - `~/.openclaw/workspace/AGENTS.md`
252
+
253
+ ## Environment Variables
254
+
255
+ | Variable | Default | Description |
256
+ | --- | --- | --- |
257
+ | `CODEXMATE_PORT` | `3737` | Web server port |
258
+ | `CODEXMATE_HOST` | `0.0.0.0` | Web listen host (set `127.0.0.1` for local-only access) |
259
+ | `CODEXMATE_NO_BROWSER` | unset | Set `1` to disable browser auto-open |
260
+ | `CODEXMATE_MCP_ALLOW_WRITE` | unset | Set `1` to allow MCP write tools by default |
261
+ | `CODEXMATE_FORCE_RESET_EXISTING_CONFIG` | `0` | Set `1` to force bootstrap reset of existing config |
262
+
263
+ ## Tech Stack
264
+
265
+ - Node.js
266
+ - Vue.js 3 (Web UI)
267
+ - Native HTTP server
268
+ - `@iarna/toml`, `json5`
269
+
270
+ ## Contributing
271
+
272
+ Issues and pull requests are accepted.
273
+
274
+ ## License
275
+
276
+ Apache-2.0
277
+
278
+ ### Claude Code Mode
279
+ - Multi-profile management
280
+ - Default write to `~/.claude/settings.json`
281
+ - Shareable import command copy
282
+
283
+ ### OpenClaw Mode
284
+ - JSON5 multi-profile management
285
+ - Apply to `~/.openclaw/openclaw.json`
286
+ - Manage `~/.openclaw/workspace/AGENTS.md`
287
+
288
+ ### Sessions Mode
289
+ - Unified Codex + Claude sessions
290
+ - Browser / Usage subview switching
291
+ - Local pin/unpin with persistent storage and pinned-first ordering
292
+ - Search, filter, export, delete, batch cleanup
293
+ - Usage view includes 7d / 30d session trends, message trends, source share, and top paths
294
+
295
+ ### Skills Market Tab
296
+ - Switch the skills install target between `Codex` and `Claude Code`
297
+ - Show the current local skills root, installed items, and importable items
298
+ - Scan importable sources under `Codex` / `Claude Code` / `Agents`
299
+ - Support cross-app import, ZIP import/export, and batch delete
300
+
301
+ ## MCP
302
+
303
+ > Transport: `stdio`
304
+
305
+ - Default: read-only tools
306
+ - Enable writes: `--allow-write` or `CODEXMATE_MCP_ALLOW_WRITE=1`
307
+ - Domains: `tools`, `resources`, `prompts`
308
+
309
+ Examples:
310
+
311
+ ```bash
312
+ codexmate mcp serve --read-only
313
+ codexmate mcp serve --allow-write
314
+ ```
315
+
316
+ ## Config Files
317
+
318
+ - `~/.codex/config.toml`
319
+ - `~/.codex/auth.json`
320
+ - `~/.codex/models.json`
321
+ - `~/.codex/provider-current-models.json`
322
+ - `~/.claude/settings.json`
323
+ - `~/.openclaw/openclaw.json`
324
+ - `~/.openclaw/workspace/AGENTS.md`
325
+
326
+ ## Environment Variables
327
+
328
+ | Variable | Default | Description |
329
+ | --- | --- | --- |
330
+ | `CODEXMATE_PORT` | `3737` | Web server port |
331
+ | `CODEXMATE_HOST` | `0.0.0.0` | Web listen host (set `127.0.0.1` for local-only access) |
332
+ | `CODEXMATE_NO_BROWSER` | unset | Set `1` to disable browser auto-open |
333
+ | `CODEXMATE_MCP_ALLOW_WRITE` | unset | Set `1` to allow MCP write tools by default |
334
+ | `CODEXMATE_FORCE_RESET_EXISTING_CONFIG` | `0` | Set `1` to force bootstrap reset of existing config |
335
+
336
+ ## Tech Stack
337
+
338
+ - Node.js
339
+ - Vue.js 3 (Web UI)
340
+ - Native HTTP server
341
+ - `@iarna/toml`, `json5`
342
+
343
+ ## Contributing
344
+
345
+ Issues and pull requests are accepted.
346
+
347
+ ## License
348
+
349
+ Apache-2.0