codexmate 0.0.31 → 0.0.32

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 (145) hide show
  1. package/README.md +363 -363
  2. package/README.zh.md +371 -371
  3. package/cli/agents-files.js +224 -224
  4. package/cli/archive-helpers.js +446 -446
  5. package/cli/auth-profiles.js +375 -375
  6. package/cli/builtin-proxy.js +1725 -1725
  7. package/cli/claude-proxy.js +1022 -1022
  8. package/cli/config-bootstrap.js +402 -402
  9. package/cli/config-health.js +454 -454
  10. package/cli/doctor-core.js +903 -903
  11. package/cli/import-skills-url.js +356 -356
  12. package/cli/local-bridge.js +324 -324
  13. package/cli/openai-bridge.js +1653 -1653
  14. package/cli/openclaw-config.js +629 -629
  15. package/cli/session-convert-args.js +69 -69
  16. package/cli/session-convert-io.js +82 -82
  17. package/cli/session-convert.js +150 -150
  18. package/cli/session-usage.concurrent.js +28 -28
  19. package/cli/session-usage.js +118 -118
  20. package/cli/session-usage.models.js +176 -176
  21. package/cli/skills.js +1141 -1141
  22. package/cli/zip-commands.js +510 -510
  23. package/cli.js +15829 -15778
  24. package/lib/automation.js +404 -404
  25. package/lib/cli-file-utils.js +151 -151
  26. package/lib/cli-models-utils.js +440 -440
  27. package/lib/cli-network-utils.js +190 -190
  28. package/lib/cli-path-utils.js +85 -85
  29. package/lib/cli-session-utils.js +121 -121
  30. package/lib/cli-sessions.js +426 -417
  31. package/lib/cli-utils.js +155 -155
  32. package/lib/cli-webhook.js +126 -126
  33. package/lib/download-artifacts.js +92 -92
  34. package/lib/mcp-stdio.js +453 -453
  35. package/lib/task-orchestrator.js +869 -869
  36. package/lib/text-diff.js +303 -303
  37. package/lib/workflow-engine.js +340 -340
  38. package/package.json +76 -76
  39. package/plugins/README.md +20 -20
  40. package/plugins/README.zh-CN.md +20 -20
  41. package/plugins/prompt-templates/comment-polish/index.mjs +25 -25
  42. package/plugins/prompt-templates/computed.mjs +253 -253
  43. package/plugins/prompt-templates/index.mjs +8 -8
  44. package/plugins/prompt-templates/manifest.mjs +15 -15
  45. package/plugins/prompt-templates/methods.mjs +553 -553
  46. package/plugins/prompt-templates/overview.mjs +91 -91
  47. package/plugins/prompt-templates/ownership.mjs +19 -19
  48. package/plugins/prompt-templates/rule-ack/index.mjs +21 -21
  49. package/plugins/prompt-templates/storage.mjs +64 -64
  50. package/plugins/registry.mjs +16 -16
  51. package/web-ui/app.js +647 -646
  52. package/web-ui/index.html +36 -36
  53. package/web-ui/logic.agents-diff.mjs +386 -386
  54. package/web-ui/logic.claude.mjs +168 -168
  55. package/web-ui/logic.codex.mjs +69 -69
  56. package/web-ui/logic.mjs +5 -5
  57. package/web-ui/logic.runtime.mjs +128 -128
  58. package/web-ui/logic.session-convert.mjs +70 -70
  59. package/web-ui/logic.sessions.mjs +781 -765
  60. package/web-ui/modules/api.mjs +90 -90
  61. package/web-ui/modules/app.computed.dashboard.mjs +248 -248
  62. package/web-ui/modules/app.computed.index.mjs +17 -17
  63. package/web-ui/modules/app.computed.main-tabs.mjs +205 -205
  64. package/web-ui/modules/app.computed.session.mjs +693 -999
  65. package/web-ui/modules/app.constants.mjs +15 -15
  66. package/web-ui/modules/app.methods.agents.mjs +651 -632
  67. package/web-ui/modules/app.methods.claude-config.mjs +200 -200
  68. package/web-ui/modules/app.methods.codex-config.mjs +861 -841
  69. package/web-ui/modules/app.methods.index.mjs +94 -94
  70. package/web-ui/modules/app.methods.install.mjs +205 -205
  71. package/web-ui/modules/app.methods.navigation.mjs +774 -774
  72. package/web-ui/modules/app.methods.openclaw-core.mjs +814 -814
  73. package/web-ui/modules/app.methods.openclaw-editing.mjs +372 -372
  74. package/web-ui/modules/app.methods.openclaw-persist.mjs +369 -369
  75. package/web-ui/modules/app.methods.providers.mjs +529 -529
  76. package/web-ui/modules/app.methods.runtime.mjs +345 -345
  77. package/web-ui/modules/app.methods.session-actions.mjs +591 -591
  78. package/web-ui/modules/app.methods.session-browser.mjs +1012 -984
  79. package/web-ui/modules/app.methods.session-timeline.mjs +479 -479
  80. package/web-ui/modules/app.methods.session-trash.mjs +438 -438
  81. package/web-ui/modules/app.methods.startup-claude.mjs +537 -534
  82. package/web-ui/modules/app.methods.task-orchestration.mjs +556 -556
  83. package/web-ui/modules/app.methods.webhook.mjs +79 -79
  84. package/web-ui/modules/config-mode.computed.mjs +124 -124
  85. package/web-ui/modules/config-template-confirm-pref.mjs +33 -33
  86. package/web-ui/modules/i18n.dict.mjs +3177 -3174
  87. package/web-ui/modules/i18n.mjs +62 -62
  88. package/web-ui/modules/plugins.computed.mjs +3 -3
  89. package/web-ui/modules/plugins.methods.mjs +3 -3
  90. package/web-ui/modules/plugins.storage.mjs +11 -11
  91. package/web-ui/modules/provider-url-display.mjs +17 -17
  92. package/web-ui/modules/sessions-filters-url.mjs +85 -85
  93. package/web-ui/modules/skills.computed.mjs +107 -107
  94. package/web-ui/modules/skills.methods.mjs +482 -482
  95. package/web-ui/partials/index/layout-footer.html +13 -13
  96. package/web-ui/partials/index/layout-header.html +503 -500
  97. package/web-ui/partials/index/modal-config-template-agents.html +185 -174
  98. package/web-ui/partials/index/modal-confirm-toast.html +32 -32
  99. package/web-ui/partials/index/modal-health-check.html +45 -45
  100. package/web-ui/partials/index/modal-openclaw-config.html +280 -280
  101. package/web-ui/partials/index/modal-skills.html +200 -200
  102. package/web-ui/partials/index/modals-basic.html +162 -162
  103. package/web-ui/partials/index/panel-config-claude.html +136 -194
  104. package/web-ui/partials/index/panel-config-codex.html +197 -357
  105. package/web-ui/partials/index/panel-config-openclaw.html +83 -83
  106. package/web-ui/partials/index/panel-dashboard.html +219 -219
  107. package/web-ui/partials/index/panel-docs.html +115 -147
  108. package/web-ui/partials/index/panel-market.html +177 -177
  109. package/web-ui/partials/index/panel-orchestration.html +391 -391
  110. package/web-ui/partials/index/panel-plugins.html +253 -253
  111. package/web-ui/partials/index/panel-sessions.html +313 -302
  112. package/web-ui/partials/index/panel-settings.html +190 -190
  113. package/web-ui/partials/index/panel-trash.html +83 -88
  114. package/web-ui/partials/index/panel-usage.html +138 -371
  115. package/web-ui/res/json5.min.js +1 -1
  116. package/web-ui/res/vue.global.prod.js +13 -13
  117. package/web-ui/session-helpers.mjs +591 -591
  118. package/web-ui/source-bundle.cjs +233 -233
  119. package/web-ui/styles/base-theme.css +281 -281
  120. package/web-ui/styles/bridge-pool.css +197 -197
  121. package/web-ui/styles/controls-forms.css +433 -422
  122. package/web-ui/styles/dashboard.css +406 -406
  123. package/web-ui/styles/docs-panel.css +245 -271
  124. package/web-ui/styles/feedback.css +108 -108
  125. package/web-ui/styles/health-check-dialog.css +144 -144
  126. package/web-ui/styles/layout-shell.css +638 -626
  127. package/web-ui/styles/modals-core.css +466 -466
  128. package/web-ui/styles/navigation-panels.css +391 -391
  129. package/web-ui/styles/openclaw-structured.css +266 -266
  130. package/web-ui/styles/plugins-panel.css +564 -564
  131. package/web-ui/styles/responsive.css +392 -454
  132. package/web-ui/styles/sessions-list.css +647 -417
  133. package/web-ui/styles/sessions-preview.css +407 -407
  134. package/web-ui/styles/sessions-toolbar-trash.css +518 -348
  135. package/web-ui/styles/sessions-usage.css +588 -1040
  136. package/web-ui/styles/settings-panel.css +349 -349
  137. package/web-ui/styles/skills-list.css +305 -305
  138. package/web-ui/styles/skills-market.css +429 -429
  139. package/web-ui/styles/task-orchestration.css +822 -822
  140. package/web-ui/styles/titles-cards.css +472 -472
  141. package/web-ui/styles/trash-panel.css +90 -90
  142. package/web-ui/styles/webhook.css +81 -81
  143. package/web-ui/styles.css +24 -24
  144. package/web-ui.html +17 -17
  145. package/web-ui/partials/index/panel-config-codex.html.bak +0 -337
package/README.md CHANGED
@@ -1,363 +1,363 @@
1
- <div align="center">
2
-
3
- <img src="site/.vitepress/public/images/logo.png" alt="Codex Mate logo" width="180" />
4
-
5
- # Codex Mate
6
-
7
- **One dashboard for all your local AI coding tools — switch providers, manage sessions, edit configs, and orchestrate tasks across Codex, Claude Code, and OpenClaw. Built-in OpenAI-compatible bridge, usage analytics, and prompt templates. Zero cloud, zero setup.**
8
-
9
- [![Version](https://img.shields.io/npm/v/codexmate?label=version&style=flat)](https://www.npmjs.com/package/codexmate)
10
- [![Build](https://img.shields.io/github/actions/workflow/status/SakuraByteCore/codexmate/release.yml?label=build&style=flat)](https://github.com/SakuraByteCore/codexmate/actions/workflows/release.yml)
11
- [![Downloads](https://img.shields.io/npm/dt/codexmate?label=downloads&style=flat)](https://www.npmjs.com/package/codexmate)
12
- [![Install](https://img.shields.io/badge/install-curl%20%7C%20npm-0A0?style=flat)](#install-via-curl-standalone)
13
- [![Platform](https://img.shields.io/badge/platform-Termux%20%7C%20Linux%20%7C%20macOS%20%7C%20Windows-555?style=flat)](#quick-start)
14
- [![Node](https://img.shields.io/node/v/codexmate?label=Node.js&style=flat&logo=node.js&logoColor=white)](https://nodejs.org/)
15
- [![License](https://img.shields.io/npm/l/codexmate?label=license&style=flat)](LICENSE)
16
- [![Stars](https://img.shields.io/github/stars/SakuraByteCore/codexmate?label=stars&style=flat)](https://github.com/SakuraByteCore/codexmate/stargazers)
17
- [![Issues](https://img.shields.io/github/issues/SakuraByteCore/codexmate?label=issues&style=flat)](https://github.com/SakuraByteCore/codexmate/issues)
18
-
19
- [Docs](https://sakurabytecore.github.io/codexmate/) · [Quick Start](#quick-start) · [Commands](#command-reference) · [Web UI](#web-ui) · [MCP](#mcp) · [中文](README.zh.md)
20
-
21
- <br />
22
- <img src="site/.vitepress/public/images/readme-hero.png" alt="Codex Mate screenshot" width="960" />
23
-
24
- </div>
25
-
26
- ---
27
-
28
- ## What Is This?
29
-
30
- Codex Mate is a local-first CLI + Web UI for unified management of:
31
-
32
- - Codex provider/model switching and config writes
33
- - OpenAI-compatible bridge mode for Codex Responses API conversion
34
- - Claude Code profiles (writes to `~/.claude/settings.json`)
35
- - Claude Code `CLAUDE.md` editing (writes to `~/.claude/CLAUDE.md`)
36
- - OpenClaw JSON5 profiles and workspace `AGENTS.md`
37
- - Local skills market for Codex / Claude Code (target switching, local skills management, cross-app import, ZIP distribution)
38
- - Local Codex/Claude/Gemini CLI/CodeBuddy Code sessions (list/filter/export/delete) with Usage analytics overview
39
- - Plugins (Prompt templates): reusable templates with variables and one-click copy
40
- - Task orchestration: plan/queue/run/review local tasks
41
-
42
- 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.
43
-
44
- ## Comparison
45
-
46
- | Dimension | Codex Mate | Manual File Editing |
47
- | --- | --- | --- |
48
- | Multi-tool management | Codex + Claude Code + OpenClaw in one entry | Different files and folders per tool |
49
- | Operation mode | CLI + local Web UI | Manual TOML/JSON/JSON5 edits |
50
- | Session handling | Browse/filter/Usage analytics/export/batch cleanup | Manual file location and processing |
51
- | Skills reuse | Local skills market + cross-app import + ZIP distribution | Manual folder copy and reconciliation |
52
- | Operational visibility | Unified view of config, sessions, and Usage summaries | Depends on manual file inspection and scattered commands |
53
- | Rollback readiness | Backup before first takeover | Easy to overwrite by mistake |
54
- | Automation integration | MCP stdio (read-only by default) | Requires custom scripting |
55
-
56
- ## Core Features
57
-
58
- **Configuration**
59
- - Provider/model switching (`switch`, `use`)
60
- - Codex `config.toml` template confirmation before write
61
- - OpenAI bridge providers: write Codex to a local `/bridge/openai/<provider>/v1` endpoint and normalize Responses API requests for OpenAI-compatible upstreams
62
- - Claude Code profile management and apply
63
- - Claude Code `CLAUDE.md` editing (writes to `~/.claude/CLAUDE.md`)
64
- - OpenClaw JSON5 profile management
65
-
66
- **Session Management**
67
- - Unified Codex + Claude + Gemini CLI + CodeBuddy Code session list
68
- - Session locations (local-first, configurable):
69
- - Codex: `~/.codex/sessions/*.jsonl` (or `$CODEX_HOME/sessions`, `$XDG_CONFIG_HOME/codex/sessions`)
70
- - Claude: `~/.claude/projects/**/**/*.jsonl` (or `$CLAUDE_HOME/projects`, `$XDG_CONFIG_HOME/claude/projects`)
71
- - Gemini: `~/.gemini/tmp/*/chats/*.json` (or `$GEMINI_HOME/tmp`, `$XDG_CONFIG_HOME/gemini/tmp`)
72
- - CodeBuddy: `~/.codebuddy/projects/**/**/*.jsonl` (or `$CODEBUDDY_CODE_HOME_DIR/projects`)
73
- - Local session pinning with persistent pinned state and pinned-first ordering
74
- - Keyword/source/cwd/role/time filters, plus shareable filter links
75
- - Copy resume command (Codex/Gemini/CodeBuddy): `codex resume <sessionId>` / `gemini -r <sessionId>` / `codebuddy -r <sessionId>`
76
- - Fast search UX: short-lived query result caching to avoid rescanning on each keystroke
77
- - Usage subview with 7d / 30d session trends, message trends, source share, and top paths
78
- - Markdown export (Web UI + `codexmate export-session`, supports `--session-id` or `--file`)
79
- - Session-level and message-level delete (supports batch), with a local recycle bin for restore/purge
80
- - Large-session preview optimization (fast tail preview path)
81
-
82
- **Skills Market**
83
- - Switch the skills install target between Codex and Claude Code
84
- - Inspect local installed skills, root paths, and status
85
- - Scan importable sources from `Codex` / `Claude Code` / `Agents`
86
- - Support cross-app import, ZIP import/export, and batch delete
87
-
88
- **Plugins**
89
- - Prompt templates: save, edit, and reuse prompts with variables
90
- - Compose + copy workflow for fast prompt iteration (stored locally in browser storage)
91
-
92
- **Engineering Utilities**
93
- - MCP stdio domains (`tools`, `resources`, `prompts`)
94
- - Automation hooks (`/hooks/*`) + outbound webhook notifiers
95
- - Built-in proxy controls (`proxy`)
96
- - OpenAI bridge conversion for Codex `/v1/responses` requests, including upstream `/responses` preference, `/chat/completions` fallback, and function-tool normalization
97
- - Auth profile management (`auth`)
98
- - Zip/unzip utilities
99
-
100
- ## Automation (signal → action)
101
-
102
- When running `codexmate run`, you can accept external webhooks and convert them into queued tasks:
103
-
104
- - Webhook entry: `POST /hooks/<source>` (currently `github`, `gitlab`)
105
- - Rule config: `~/.codex/codexmate-automation.json`
106
- - Supported action: `task.queue.add` (optionally `startQueue: true`)
107
- - Notifications: `notifiers[]` supports `type: "webhook"` for Slack/Feishu-style incoming webhooks
108
-
109
- ## Architecture
110
-
111
- ### At a glance (what it does → what you get)
112
-
113
- ```mermaid
114
- flowchart LR
115
- subgraph You["You"]
116
- CLI["CLI"]
117
- WEB["Web UI"]
118
- MCP["MCP (stdio)"]
119
- end
120
-
121
- subgraph Mate["Codex Mate (local control panel)"]
122
- API["Local HTTP API"]
123
- CFG["Config management"]
124
- SESS["Sessions & Usage"]
125
- SKL["Skills management"]
126
- PLG["Plugins: Prompt templates"]
127
- end
128
-
129
- subgraph Files["Local files only (auditable & reversible)"]
130
- CODEX["~/.codex/*"]
131
- CLAUDE["~/.claude/settings.json + CLAUDE.md"]
132
- OPENCLAW["~/.openclaw/*.json5 + ~/.openclaw/openclaw.json + workspace/AGENTS.md"]
133
- SKILLS["~/.{codex,claude,agents}/skills"]
134
- STATE["sessions / usage / trash / runs"]
135
- BROWSER["Browser storage (templates)"]
136
- end
137
-
138
- CLI --> API
139
- WEB --> API
140
- MCP --> API
141
- WEB --> PLG
142
-
143
- API --> CFG
144
- API --> SESS
145
- API --> SKL
146
- PLG --> BROWSER
147
-
148
- CFG --> CODEX
149
- CFG --> CLAUDE
150
- CFG --> OPENCLAW
151
- SKL --> SKILLS
152
- SESS --> STATE
153
- ```
154
-
155
- ### Capability → Local target → Outcome
156
-
157
- | Capability | Local target | What you get |
158
- | --- | --- | --- |
159
- | Config management (Codex / Claude / OpenClaw) | `~/.codex/*`, `~/.claude/settings.json`, `~/.claude/CLAUDE.md`, `~/.openclaw/*` | Faster provider/model switching, multi-profile management, safer writes with backups |
160
- | Sessions & Usage | sessions / usage aggregates / trash | Quickly locate sessions, filter/export, batch cleanup, and view trends |
161
- | Skills market | `~/.{codex,claude,agents}/skills` | Local install/import/export (ZIP), cross-app reuse |
162
- | Plugins (Prompt templates) | Browser storage | Reusable prompt templates with variables and one-click copy |
163
- | MCP (stdio) | local API + file operations | Integrate with external tools under controllable permissions (read-only by default) |
164
-
165
- ## Quick Start
166
-
167
- ### Install from npm
168
-
169
- ```bash
170
- npm install -g codexmate
171
- codexmate setup
172
- codexmate status
173
- codexmate run
174
- ```
175
-
176
- Default listen address is `0.0.0.0:3737` for LAN access, and browser auto-open is enabled by default.
177
-
178
- > 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`.
179
-
180
- ### Install via curl (standalone)
181
-
182
- No npm required. Downloads a self-contained tarball with `node_modules` bundled:
183
-
184
- ```bash
185
- curl -fsSL https://raw.githubusercontent.com/SakuraByteCore/codexmate/main/scripts/install.sh | bash
186
- ```
187
-
188
- Installs to `~/.codexmate`, symlinks to `~/.local/bin/codexmate`, and auto-adds PATH.
189
-
190
- | Variable | Default | Description |
191
- | --- | --- | --- |
192
- | `CODEXMATE_INSTALL_DIR` | `~/.codexmate` | Installation directory |
193
- | `CODEXMATE_BIN_DIR` | `~/.local/bin` | Symlink directory |
194
-
195
- ### Install Codex CLI / Claude Code CLI (optional)
196
-
197
- Codex Mate can pass through to the official CLIs (e.g. `codexmate codex ...`). Install them first:
198
-
199
- ```bash
200
- # Codex CLI (default)
201
- npm install -g @openai/codex
202
-
203
- # Codex CLI on Termux (Android)
204
- npm install -g @mmmbuto/codex-cli-termux@latest
205
-
206
- # Claude Code
207
- npm install -g @anthropic-ai/claude-code
208
-
209
- # Gemini CLI
210
- npm install -g @google/gemini-cli
211
-
212
- # CodeBuddy Code
213
- npm install -g @tencent-ai/codebuddy-code
214
- ```
215
-
216
- ### Run from source
217
-
218
- ```bash
219
- git clone https://github.com/SakuraByteCore/codexmate.git
220
- cd codexmate
221
- npm install
222
- npm start run
223
- ```
224
-
225
- ### Tests / CI (service only)
226
-
227
- ```bash
228
- npm start run --no-browser
229
- ```
230
-
231
- > Convention: automated tests validate service and API behavior only, without opening browser pages.
232
-
233
- ### Developer helper scripts
234
-
235
- ```bash
236
- npm run reset
237
- npm run reset 79
238
- ```
239
-
240
- - `npm run reset`: reset to default `origin/main`
241
- - `npm run reset 79`: sync directly to the latest head snapshot of PR `#79`
242
- - The script also handles local branch switching, workspace cleanup, untracked file cleanup, and final state validation
243
-
244
- ## Command Reference
245
-
246
- | Command | Description |
247
- | --- | --- |
248
- | `codexmate status` | Show current config status |
249
- | `codexmate setup` | Interactive setup |
250
- | `codexmate list` / `codexmate models` | List providers / models |
251
- | `codexmate switch <provider>` / `codexmate use <model>` | Switch provider / model |
252
- | `codexmate add <name> <URL> [API_KEY] [--bridge openai]` | Add provider; `--bridge openai` creates a local Codex Responses-compatible bridge for OpenAI-style upstreams |
253
- | `codexmate delete <name>` | Delete provider |
254
- | `codexmate claude <BaseURL> <API_KEY> [model]` | Write Claude Code config |
255
- | `codexmate auth <list\|import\|switch\|delete\|status>` | Auth profile management |
256
- | `codexmate workflow <list\|get\|validate\|run\|runs>` | MCP workflow management |
257
- | `codexmate codex [args...] [--follow-up <text> repeatable]` | Codex CLI passthrough entrypoint (auto-adds `--yolo`, supports queued follow-up appends) |
258
- | `codexmate qwen [args...]` | Qwen CLI passthrough entrypoint |
259
- | `codexmate run [--host <HOST>] [--no-browser]` | Start Web UI |
260
- | `codexmate mcp serve [--read-only\|--allow-write]` | Start MCP stdio server |
261
- | `codexmate export-session --source <codex\|claude\|gemini\|codebuddy> ...` | Export session to Markdown |
262
- | `codexmate zip <path> [--max:0-9]` / `codexmate unzip <zip> [out]` | Zip / unzip |
263
- | `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) |
264
-
265
- ### Codex Follow-up Append (Optional)
266
-
267
- ```bash
268
- codexmate codex --follow-up "scan repository first" --follow-up "then fix failing tests"
269
- codexmate codex --model gpt-5.3-codex --follow-up "step1" --follow-up "step2"
270
- ```
271
-
272
- > Note: both `--follow-up` and `--queued-follow-up` are accepted and repeatable.
273
-
274
- ## Web UI
275
-
276
- ### Codex Mode
277
- - Provider/model switching
278
- - Model list management
279
- - OpenAI bridge providers for Codex Responses API conversion to OpenAI-compatible upstreams
280
- - `~/.codex/AGENTS.md` editing
281
-
282
- ### Claude Code Mode
283
- - Multi-profile management
284
- - Default write to `~/.claude/settings.json`
285
- - `~/.claude/CLAUDE.md` editing
286
- - Shareable import command copy
287
-
288
- ### OpenClaw Mode
289
- - JSON5 multi-profile management
290
- - Apply to `~/.openclaw/openclaw.json`
291
- - Manage `~/.openclaw/workspace/AGENTS.md`
292
-
293
- ### Plugins Mode (Prompt Templates)
294
- - Entry: switch to **Plugins** → **Prompt Templates**
295
- - Manage custom templates (JSON import/export)
296
- - Variables: in **Manage**, you can “Add variable” (inserts `{{var}}`) and fill variable values in the Variables panel
297
- - Generate & copy: after filling variables, copy the final rendered prompt from **Preview**
298
- - Built-in template: ships a single read-only template for light code-comment polishing
299
-
300
- ### Sessions Mode
301
- - Unified Codex + Claude sessions
302
- - Browser / Usage subview switching
303
- - Local pin/unpin with persistent storage and pinned-first ordering
304
- - Search, filter, export, delete, batch cleanup
305
- - Usage view includes 7d / 30d session trends, message trends, source share, and top paths
306
-
307
- ### Skills Market Tab
308
- - Switch the skills install target between `Codex` and `Claude Code`
309
- - Show the current local skills root, installed items, and importable items
310
- - Scan importable sources under `Codex` / `Claude Code` / `Agents`
311
- - Support cross-app import, ZIP import/export, and batch delete
312
-
313
- ## MCP
314
-
315
- > Transport: `stdio`
316
-
317
- - Default: read-only tools
318
- - Enable writes: `--allow-write` or `CODEXMATE_MCP_ALLOW_WRITE=1`
319
- - Domains: `tools`, `resources`, `prompts`
320
-
321
- Examples:
322
-
323
- ```bash
324
- codexmate mcp serve --read-only
325
- codexmate mcp serve --allow-write
326
- ```
327
-
328
- ## Config Files
329
-
330
- - `~/.codex/config.toml`
331
- - `~/.codex/auth.json`
332
- - `~/.codex/models.json`
333
- - `~/.codex/provider-current-models.json`
334
- - `~/.codex/codexmate-openai-bridge.json`
335
- - `~/.claude/settings.json`
336
- - `~/.claude/CLAUDE.md`
337
- - `~/.openclaw/openclaw.json`
338
- - `~/.openclaw/workspace/AGENTS.md`
339
-
340
- ## Environment Variables
341
-
342
- | Variable | Default | Description |
343
- | --- | --- | --- |
344
- | `CODEXMATE_PORT` | `3737` | Web server port |
345
- | `CODEXMATE_HOST` | `0.0.0.0` | Web listen host (set `127.0.0.1` for local-only access) |
346
- | `CODEXMATE_NO_BROWSER` | unset | Set `1` to disable browser auto-open |
347
- | `CODEXMATE_MCP_ALLOW_WRITE` | unset | Set `1` to allow MCP write tools by default |
348
- | `CODEXMATE_FORCE_RESET_EXISTING_CONFIG` | `0` | Set `1` to force bootstrap reset of existing config |
349
-
350
- ## Tech Stack
351
-
352
- - Node.js
353
- - Vue.js 3 (Web UI)
354
- - Native HTTP server
355
- - `@iarna/toml`, `json5`
356
-
357
- ## Contributing
358
-
359
- Issues and pull requests are accepted.
360
-
361
- ## License
362
-
363
- Apache-2.0
1
+ <div align="center">
2
+
3
+ <img src="site/.vitepress/public/images/logo.png" alt="Codex Mate logo" width="180" />
4
+
5
+ # Codex Mate
6
+
7
+ **One dashboard for all your local AI coding tools — switch providers, manage sessions, edit configs, and orchestrate tasks across Codex, Claude Code, and OpenClaw. Built-in OpenAI-compatible bridge, usage analytics, and prompt templates. Zero cloud, zero setup.**
8
+
9
+ [![Version](https://img.shields.io/npm/v/codexmate?label=version&style=flat)](https://www.npmjs.com/package/codexmate)
10
+ [![Build](https://img.shields.io/github/actions/workflow/status/SakuraByteCore/codexmate/release.yml?label=build&style=flat)](https://github.com/SakuraByteCore/codexmate/actions/workflows/release.yml)
11
+ [![Downloads](https://img.shields.io/npm/dt/codexmate?label=downloads&style=flat)](https://www.npmjs.com/package/codexmate)
12
+ [![Install](https://img.shields.io/badge/install-curl%20%7C%20npm-0A0?style=flat)](#install-via-curl-standalone)
13
+ [![Platform](https://img.shields.io/badge/platform-Termux%20%7C%20Linux%20%7C%20macOS%20%7C%20Windows-555?style=flat)](#quick-start)
14
+ [![Node](https://img.shields.io/node/v/codexmate?label=Node.js&style=flat&logo=node.js&logoColor=white)](https://nodejs.org/)
15
+ [![License](https://img.shields.io/npm/l/codexmate?label=license&style=flat)](LICENSE)
16
+ [![Stars](https://img.shields.io/github/stars/SakuraByteCore/codexmate?label=stars&style=flat)](https://github.com/SakuraByteCore/codexmate/stargazers)
17
+ [![Issues](https://img.shields.io/github/issues/SakuraByteCore/codexmate?label=issues&style=flat)](https://github.com/SakuraByteCore/codexmate/issues)
18
+
19
+ [Docs](https://sakurabytecore.github.io/codexmate/) · [Quick Start](#quick-start) · [Commands](#command-reference) · [Web UI](#web-ui) · [MCP](#mcp) · [中文](README.zh.md)
20
+
21
+ <br />
22
+ <img src="site/.vitepress/public/images/readme-hero.png" alt="Codex Mate screenshot" width="960" />
23
+
24
+ </div>
25
+
26
+ ---
27
+
28
+ ## What Is This?
29
+
30
+ Codex Mate is a local-first CLI + Web UI for unified management of:
31
+
32
+ - Codex provider/model switching and config writes
33
+ - OpenAI-compatible bridge mode for Codex Responses API conversion
34
+ - Claude Code profiles (writes to `~/.claude/settings.json`)
35
+ - Claude Code `CLAUDE.md` editing (writes to `~/.claude/CLAUDE.md`)
36
+ - OpenClaw JSON5 profiles and workspace `AGENTS.md`
37
+ - Local skills market for Codex / Claude Code (target switching, local skills management, cross-app import, ZIP distribution)
38
+ - Local Codex/Claude/Gemini CLI/CodeBuddy Code sessions (list/filter/export/delete) with Usage analytics overview
39
+ - Plugins (Prompt templates): reusable templates with variables and one-click copy
40
+ - Task orchestration: plan/queue/run/review local tasks
41
+
42
+ 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.
43
+
44
+ ## Comparison
45
+
46
+ | Dimension | Codex Mate | Manual File Editing |
47
+ | --- | --- | --- |
48
+ | Multi-tool management | Codex + Claude Code + OpenClaw in one entry | Different files and folders per tool |
49
+ | Operation mode | CLI + local Web UI | Manual TOML/JSON/JSON5 edits |
50
+ | Session handling | Browse/filter/Usage analytics/export/batch cleanup | Manual file location and processing |
51
+ | Skills reuse | Local skills market + cross-app import + ZIP distribution | Manual folder copy and reconciliation |
52
+ | Operational visibility | Unified view of config, sessions, and Usage summaries | Depends on manual file inspection and scattered commands |
53
+ | Rollback readiness | Backup before first takeover | Easy to overwrite by mistake |
54
+ | Automation integration | MCP stdio (read-only by default) | Requires custom scripting |
55
+
56
+ ## Core Features
57
+
58
+ **Configuration**
59
+ - Provider/model switching (`switch`, `use`)
60
+ - Codex `config.toml` template confirmation before write
61
+ - OpenAI bridge providers: write Codex to a local `/bridge/openai/<provider>/v1` endpoint and normalize Responses API requests for OpenAI-compatible upstreams
62
+ - Claude Code profile management and apply
63
+ - Claude Code `CLAUDE.md` editing (writes to `~/.claude/CLAUDE.md`)
64
+ - OpenClaw JSON5 profile management
65
+
66
+ **Session Management**
67
+ - Unified Codex + Claude + Gemini CLI + CodeBuddy Code session list
68
+ - Session locations (local-first, configurable):
69
+ - Codex: `~/.codex/sessions/*.jsonl` (or `$CODEX_HOME/sessions`, `$XDG_CONFIG_HOME/codex/sessions`)
70
+ - Claude: `~/.claude/projects/**/**/*.jsonl` (or `$CLAUDE_HOME/projects`, `$XDG_CONFIG_HOME/claude/projects`)
71
+ - Gemini: `~/.gemini/tmp/*/chats/*.json` (or `$GEMINI_HOME/tmp`, `$XDG_CONFIG_HOME/gemini/tmp`)
72
+ - CodeBuddy: `~/.codebuddy/projects/**/**/*.jsonl` (or `$CODEBUDDY_CODE_HOME_DIR/projects`)
73
+ - Local session pinning with persistent pinned state and pinned-first ordering
74
+ - Keyword/source/cwd/role/time filters, plus shareable filter links
75
+ - Copy resume command (Codex/Gemini/CodeBuddy): `codex resume <sessionId>` / `gemini -r <sessionId>` / `codebuddy -r <sessionId>`
76
+ - Fast search UX: short-lived query result caching to avoid rescanning on each keystroke
77
+ - Usage subview with 7d / 30d session trends, message trends, source share, and top paths
78
+ - Markdown export (Web UI + `codexmate export-session`, supports `--session-id` or `--file`)
79
+ - Session-level and message-level delete (supports batch), with a local recycle bin for restore/purge
80
+ - Large-session preview optimization (fast tail preview path)
81
+
82
+ **Skills Market**
83
+ - Switch the skills install target between Codex and Claude Code
84
+ - Inspect local installed skills, root paths, and status
85
+ - Scan importable sources from `Codex` / `Claude Code` / `Agents`
86
+ - Support cross-app import, ZIP import/export, and batch delete
87
+
88
+ **Plugins**
89
+ - Prompt templates: save, edit, and reuse prompts with variables
90
+ - Compose + copy workflow for fast prompt iteration (stored locally in browser storage)
91
+
92
+ **Engineering Utilities**
93
+ - MCP stdio domains (`tools`, `resources`, `prompts`)
94
+ - Automation hooks (`/hooks/*`) + outbound webhook notifiers
95
+ - Built-in proxy controls (`proxy`)
96
+ - OpenAI bridge conversion for Codex `/v1/responses` requests, including upstream `/responses` preference, `/chat/completions` fallback, and function-tool normalization
97
+ - Auth profile management (`auth`)
98
+ - Zip/unzip utilities
99
+
100
+ ## Automation (signal → action)
101
+
102
+ When running `codexmate run`, you can accept external webhooks and convert them into queued tasks:
103
+
104
+ - Webhook entry: `POST /hooks/<source>` (currently `github`, `gitlab`)
105
+ - Rule config: `~/.codex/codexmate-automation.json`
106
+ - Supported action: `task.queue.add` (optionally `startQueue: true`)
107
+ - Notifications: `notifiers[]` supports `type: "webhook"` for Slack/Feishu-style incoming webhooks
108
+
109
+ ## Architecture
110
+
111
+ ### At a glance (what it does → what you get)
112
+
113
+ ```mermaid
114
+ flowchart LR
115
+ subgraph You["You"]
116
+ CLI["CLI"]
117
+ WEB["Web UI"]
118
+ MCP["MCP (stdio)"]
119
+ end
120
+
121
+ subgraph Mate["Codex Mate (local control panel)"]
122
+ API["Local HTTP API"]
123
+ CFG["Config management"]
124
+ SESS["Sessions & Usage"]
125
+ SKL["Skills management"]
126
+ PLG["Plugins: Prompt templates"]
127
+ end
128
+
129
+ subgraph Files["Local files only (auditable & reversible)"]
130
+ CODEX["~/.codex/*"]
131
+ CLAUDE["~/.claude/settings.json + CLAUDE.md"]
132
+ OPENCLAW["~/.openclaw/*.json5 + ~/.openclaw/openclaw.json + workspace/AGENTS.md"]
133
+ SKILLS["~/.{codex,claude,agents}/skills"]
134
+ STATE["sessions / usage / trash / runs"]
135
+ BROWSER["Browser storage (templates)"]
136
+ end
137
+
138
+ CLI --> API
139
+ WEB --> API
140
+ MCP --> API
141
+ WEB --> PLG
142
+
143
+ API --> CFG
144
+ API --> SESS
145
+ API --> SKL
146
+ PLG --> BROWSER
147
+
148
+ CFG --> CODEX
149
+ CFG --> CLAUDE
150
+ CFG --> OPENCLAW
151
+ SKL --> SKILLS
152
+ SESS --> STATE
153
+ ```
154
+
155
+ ### Capability → Local target → Outcome
156
+
157
+ | Capability | Local target | What you get |
158
+ | --- | --- | --- |
159
+ | Config management (Codex / Claude / OpenClaw) | `~/.codex/*`, `~/.claude/settings.json`, `~/.claude/CLAUDE.md`, `~/.openclaw/*` | Faster provider/model switching, multi-profile management, safer writes with backups |
160
+ | Sessions & Usage | sessions / usage aggregates / trash | Quickly locate sessions, filter/export, batch cleanup, and view trends |
161
+ | Skills market | `~/.{codex,claude,agents}/skills` | Local install/import/export (ZIP), cross-app reuse |
162
+ | Plugins (Prompt templates) | Browser storage | Reusable prompt templates with variables and one-click copy |
163
+ | MCP (stdio) | local API + file operations | Integrate with external tools under controllable permissions (read-only by default) |
164
+
165
+ ## Quick Start
166
+
167
+ ### Install from npm
168
+
169
+ ```bash
170
+ npm install -g codexmate
171
+ codexmate setup
172
+ codexmate status
173
+ codexmate run
174
+ ```
175
+
176
+ Default listen address is `0.0.0.0:3737` for LAN access, and browser auto-open is enabled by default.
177
+
178
+ > 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`.
179
+
180
+ ### Install via curl (standalone)
181
+
182
+ No npm required. Downloads a self-contained tarball with `node_modules` bundled:
183
+
184
+ ```bash
185
+ curl -fsSL https://raw.githubusercontent.com/SakuraByteCore/codexmate/main/scripts/install.sh | bash
186
+ ```
187
+
188
+ Installs to `~/.codexmate`, symlinks to `~/.local/bin/codexmate`, and auto-adds PATH.
189
+
190
+ | Variable | Default | Description |
191
+ | --- | --- | --- |
192
+ | `CODEXMATE_INSTALL_DIR` | `~/.codexmate` | Installation directory |
193
+ | `CODEXMATE_BIN_DIR` | `~/.local/bin` | Symlink directory |
194
+
195
+ ### Install Codex CLI / Claude Code CLI (optional)
196
+
197
+ Codex Mate can pass through to the official CLIs (e.g. `codexmate codex ...`). Install them first:
198
+
199
+ ```bash
200
+ # Codex CLI (default)
201
+ npm install -g @openai/codex
202
+
203
+ # Codex CLI on Termux (Android)
204
+ npm install -g @mmmbuto/codex-cli-termux@latest
205
+
206
+ # Claude Code
207
+ npm install -g @anthropic-ai/claude-code
208
+
209
+ # Gemini CLI
210
+ npm install -g @google/gemini-cli
211
+
212
+ # CodeBuddy Code
213
+ npm install -g @tencent-ai/codebuddy-code
214
+ ```
215
+
216
+ ### Run from source
217
+
218
+ ```bash
219
+ git clone https://github.com/SakuraByteCore/codexmate.git
220
+ cd codexmate
221
+ npm install
222
+ npm start run
223
+ ```
224
+
225
+ ### Tests / CI (service only)
226
+
227
+ ```bash
228
+ npm start run --no-browser
229
+ ```
230
+
231
+ > Convention: automated tests validate service and API behavior only, without opening browser pages.
232
+
233
+ ### Developer helper scripts
234
+
235
+ ```bash
236
+ npm run reset
237
+ npm run reset 79
238
+ ```
239
+
240
+ - `npm run reset`: reset to default `origin/main`
241
+ - `npm run reset 79`: sync directly to the latest head snapshot of PR `#79`
242
+ - The script also handles local branch switching, workspace cleanup, untracked file cleanup, and final state validation
243
+
244
+ ## Command Reference
245
+
246
+ | Command | Description |
247
+ | --- | --- |
248
+ | `codexmate status` | Show current config status |
249
+ | `codexmate setup` | Interactive setup |
250
+ | `codexmate list` / `codexmate models` | List providers / models |
251
+ | `codexmate switch <provider>` / `codexmate use <model>` | Switch provider / model |
252
+ | `codexmate add <name> <URL> [API_KEY] [--bridge openai]` | Add provider; `--bridge openai` creates a local Codex Responses-compatible bridge for OpenAI-style upstreams |
253
+ | `codexmate delete <name>` | Delete provider |
254
+ | `codexmate claude <BaseURL> <API_KEY> [model]` | Write Claude Code config |
255
+ | `codexmate auth <list\|import\|switch\|delete\|status>` | Auth profile management |
256
+ | `codexmate workflow <list\|get\|validate\|run\|runs>` | MCP workflow management |
257
+ | `codexmate codex [args...] [--follow-up <text> repeatable]` | Codex CLI passthrough entrypoint (auto-adds `--yolo`, supports queued follow-up appends) |
258
+ | `codexmate qwen [args...]` | Qwen CLI passthrough entrypoint |
259
+ | `codexmate run [--host <HOST>] [--no-browser]` | Start Web UI |
260
+ | `codexmate mcp serve [--read-only\|--allow-write]` | Start MCP stdio server |
261
+ | `codexmate export-session --source <codex\|claude\|gemini\|codebuddy> ...` | Export session to Markdown |
262
+ | `codexmate zip <path> [--max:0-9]` / `codexmate unzip <zip> [out]` | Zip / unzip |
263
+ | `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) |
264
+
265
+ ### Codex Follow-up Append (Optional)
266
+
267
+ ```bash
268
+ codexmate codex --follow-up "scan repository first" --follow-up "then fix failing tests"
269
+ codexmate codex --model gpt-5.3-codex --follow-up "step1" --follow-up "step2"
270
+ ```
271
+
272
+ > Note: both `--follow-up` and `--queued-follow-up` are accepted and repeatable.
273
+
274
+ ## Web UI
275
+
276
+ ### Codex Mode
277
+ - Provider/model switching
278
+ - Model list management
279
+ - OpenAI bridge providers for Codex Responses API conversion to OpenAI-compatible upstreams
280
+ - `~/.codex/AGENTS.md` editing
281
+
282
+ ### Claude Code Mode
283
+ - Multi-profile management
284
+ - Default write to `~/.claude/settings.json`
285
+ - `~/.claude/CLAUDE.md` editing
286
+ - Shareable import command copy
287
+
288
+ ### OpenClaw Mode
289
+ - JSON5 multi-profile management
290
+ - Apply to `~/.openclaw/openclaw.json`
291
+ - Manage `~/.openclaw/workspace/AGENTS.md`
292
+
293
+ ### Plugins Mode (Prompt Templates)
294
+ - Entry: switch to **Plugins** → **Prompt Templates**
295
+ - Manage custom templates (JSON import/export)
296
+ - Variables: in **Manage**, you can “Add variable” (inserts `{{var}}`) and fill variable values in the Variables panel
297
+ - Generate & copy: after filling variables, copy the final rendered prompt from **Preview**
298
+ - Built-in template: ships a single read-only template for light code-comment polishing
299
+
300
+ ### Sessions Mode
301
+ - Unified Codex + Claude sessions
302
+ - Browser / Usage subview switching
303
+ - Local pin/unpin with persistent storage and pinned-first ordering
304
+ - Search, filter, export, delete, batch cleanup
305
+ - Usage view includes 7d / 30d session trends, message trends, source share, and top paths
306
+
307
+ ### Skills Market Tab
308
+ - Switch the skills install target between `Codex` and `Claude Code`
309
+ - Show the current local skills root, installed items, and importable items
310
+ - Scan importable sources under `Codex` / `Claude Code` / `Agents`
311
+ - Support cross-app import, ZIP import/export, and batch delete
312
+
313
+ ## MCP
314
+
315
+ > Transport: `stdio`
316
+
317
+ - Default: read-only tools
318
+ - Enable writes: `--allow-write` or `CODEXMATE_MCP_ALLOW_WRITE=1`
319
+ - Domains: `tools`, `resources`, `prompts`
320
+
321
+ Examples:
322
+
323
+ ```bash
324
+ codexmate mcp serve --read-only
325
+ codexmate mcp serve --allow-write
326
+ ```
327
+
328
+ ## Config Files
329
+
330
+ - `~/.codex/config.toml`
331
+ - `~/.codex/auth.json`
332
+ - `~/.codex/models.json`
333
+ - `~/.codex/provider-current-models.json`
334
+ - `~/.codex/codexmate-openai-bridge.json`
335
+ - `~/.claude/settings.json`
336
+ - `~/.claude/CLAUDE.md`
337
+ - `~/.openclaw/openclaw.json`
338
+ - `~/.openclaw/workspace/AGENTS.md`
339
+
340
+ ## Environment Variables
341
+
342
+ | Variable | Default | Description |
343
+ | --- | --- | --- |
344
+ | `CODEXMATE_PORT` | `3737` | Web server port |
345
+ | `CODEXMATE_HOST` | `0.0.0.0` | Web listen host (set `127.0.0.1` for local-only access) |
346
+ | `CODEXMATE_NO_BROWSER` | unset | Set `1` to disable browser auto-open |
347
+ | `CODEXMATE_MCP_ALLOW_WRITE` | unset | Set `1` to allow MCP write tools by default |
348
+ | `CODEXMATE_FORCE_RESET_EXISTING_CONFIG` | `0` | Set `1` to force bootstrap reset of existing config |
349
+
350
+ ## Tech Stack
351
+
352
+ - Node.js
353
+ - Vue.js 3 (Web UI)
354
+ - Native HTTP server
355
+ - `@iarna/toml`, `json5`
356
+
357
+ ## Contributing
358
+
359
+ Issues and pull requests are accepted.
360
+
361
+ ## License
362
+
363
+ Apache-2.0