@christiandoxa/prodex 0.9.0 → 0.10.0

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 (2) hide show
  1. package/README.md +46 -196
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -2,35 +2,26 @@
2
2
 
3
3
  [![CI](https://github.com/christiandoxa/prodex/actions/workflows/ci.yml/badge.svg)](https://github.com/christiandoxa/prodex/actions/workflows/ci.yml)
4
4
 
5
- Run multiple isolated Codex profiles on the same OpenAI account pool.
5
+ Run Codex, Claude Code, and their Caveman-mode variants on top of one OpenAI profile pool.
6
6
 
7
- `prodex` is a small CLI for managing multiple Codex profiles without manually switching logins and local state.
7
+ `prodex` manages isolated `CODEX_HOME` profiles, checks quota before launch, rotates fresh work to another ready profile when needed, and keeps existing continuations attached to the profile that already owns them.
8
8
 
9
- It uses a simple model:
9
+ ## Highlights
10
10
 
11
- - **One account = one profile**
12
- - **Quota is checked before launch**
13
- - **Fresh work can move to another ready profile**
14
- - **Existing continuations stay with the profile that already owns them**
15
-
16
- ## Why `prodex`?
17
-
18
- If you use multiple accounts, doing everything by hand gets old quickly.
19
-
20
- A common case is having 2 or 3 separate $20 accounts instead of paying for a higher-tier plan. That works, but the workflow is annoying. You have to log in and out, switch homes, check quota manually, and remember which session belongs to which account.
21
-
22
- `prodex` handles that setup by keeping profiles isolated, checking quota before launch, and keeping continuations on the profile that already owns them.
11
+ - One account = one profile
12
+ - Built-in quota preflight and fresh-request rotation
13
+ - Continuation affinity for existing Codex sessions
14
+ - `prodex caveman` launches Codex with Caveman mode preloaded
15
+ - `prodex claude caveman` launches Claude Code with Caveman mode preloaded
16
+ - `prodex claude` runs Claude Code through the same profile pool
23
17
 
24
18
  ## Requirements
25
19
 
26
- Before using `prodex`, make sure you have:
27
-
28
- - **An OpenAI account**, plus at least one logged-in Prodex profile
29
- - **Codex CLI**, if you want to use `prodex`
30
- - **Claude Code (`claude`)**, if you want to use `prodex claude`
20
+ - At least one logged-in Prodex profile
21
+ - Codex CLI for `prodex` and `prodex caveman`
22
+ - Claude Code (`claude`) for `prodex claude` and `prodex claude caveman`
31
23
 
32
- > Installing `@christiandoxa/prodex` from npm also installs the Codex runtime dependency for you.
33
- > Claude Code is still a separate CLI and should already be available on your `PATH` when you use `prodex claude`.
24
+ Installing `@christiandoxa/prodex` from npm also installs the Codex runtime dependency for you. Claude Code is still a separate CLI.
34
25
 
35
26
  ## Install
36
27
 
@@ -38,7 +29,7 @@ Before using `prodex`, make sure you have:
38
29
 
39
30
  ```bash
40
31
  npm install -g @christiandoxa/prodex
41
- ````
32
+ ```
42
33
 
43
34
  ### Cargo
44
35
 
@@ -46,37 +37,14 @@ npm install -g @christiandoxa/prodex
46
37
  cargo install prodex
47
38
  ```
48
39
 
49
- The npm package version is kept in lockstep with the published crate version.
50
-
51
- ## Update
52
-
53
- Check your installed version:
54
-
55
- ```bash
56
- prodex --version
57
- ```
58
-
59
- The current local version in this repo is `0.9.0`:
40
+ Version-pinned install:
60
41
 
61
42
  ```bash
62
- npm install -g @christiandoxa/prodex@0.9.0
63
- cargo install prodex --force --version 0.9.0
43
+ npm install -g @christiandoxa/prodex@0.10.0
44
+ cargo install prodex --force --version 0.10.0
64
45
  ```
65
46
 
66
- Dependency status in this repo:
67
-
68
- * The npm runtime dependency follows the `latest` dist-tag declared in the workspace package manifest for `@openai/codex`
69
- * Run `cargo update` whenever dependency metadata changes so the published lockfile stays in sync
70
- * Versioned install snippets in this README and `QUICKSTART.md` are synced from `Cargo.toml`
71
-
72
- Switching from a Cargo-installed binary to npm?
73
-
74
- ```bash
75
- cargo uninstall prodex
76
- npm install -g @christiandoxa/prodex
77
- ```
78
-
79
- ## Quick Setup
47
+ ## Quick Start
80
48
 
81
49
  If your shared Codex home already contains a login:
82
50
 
@@ -84,97 +52,49 @@ If your shared Codex home already contains a login:
84
52
  prodex profile import-current main
85
53
  ```
86
54
 
87
- Or create a profile through the usual login flow:
55
+ Or create profiles through the normal login flow:
88
56
 
89
57
  ```bash
90
58
  prodex login
91
- prodex login --device-auth
92
- ```
93
-
94
- If you want to name the profile first:
95
-
96
- ```bash
97
59
  prodex profile add second
98
60
  prodex login --profile second
99
61
  ```
100
62
 
101
- Check your profile pool and quota status:
63
+ Inspect the pool:
102
64
 
103
65
  ```bash
104
66
  prodex profile list
105
67
  prodex quota --all
106
- prodex info
107
68
  ```
108
69
 
109
- Run Codex CLI or Claude Code through Prodex:
70
+ Run through Prodex:
110
71
 
111
72
  ```bash
112
73
  prodex
74
+ prodex caveman
113
75
  prodex exec "review this repo"
114
76
  prodex claude -- -p "summarize this repo"
77
+ prodex claude caveman -- -p "summarize this repo briefly"
115
78
  ```
116
79
 
117
80
  `prodex` without a subcommand is shorthand for `prodex run`.
118
81
 
119
- ## Common Workflows
120
-
121
- ### Create or import profiles
122
-
123
- ```bash
124
- prodex profile import-current main
125
- prodex profile add second
126
- prodex login --profile second
127
- ```
128
-
129
- ### Inspect your pool
130
-
131
- ```bash
132
- prodex profile list
133
- prodex quota --all
134
- prodex info
135
- ```
136
-
137
- ### Run Codex with automatic profile selection
138
-
139
- ```bash
140
- prodex
141
- prodex run
142
- prodex exec "review this repo"
143
- ```
144
-
145
- ### Resume an existing session on the correct profile
82
+ ## Main Commands
146
83
 
147
- ```bash
148
- prodex run 019c9e3d-45a0-7ad0-a6ee-b194ac2d44f9
149
- ```
150
-
151
- ### Run Claude Code through the same profile pool
152
-
153
- ```bash
154
- prodex claude -- -p "summarize this repo"
155
- prodex claude --profile second -- -p --output-format json "show the latest diff"
156
- ```
157
-
158
- For managed profiles, Prodex can seed Claude state from your existing `~/.claude` and `~/.claude.json` on first use, then keep Claude config and chat history in shared Prodex-managed state.
159
-
160
- ## Command Reference
161
-
162
- ### Profile & Login
84
+ ### Profiles
163
85
 
164
86
  ```bash
165
87
  prodex profile list
166
88
  prodex profile add second
167
89
  prodex profile import-current main
168
- prodex login
169
90
  prodex login --profile second
170
- prodex login --device-auth
171
91
  prodex use --profile main
172
- prodex current
173
92
  prodex logout --profile main
174
93
  prodex profile remove second
94
+ prodex profile remove --all
175
95
  ```
176
96
 
177
- ### Run with Codex CLI
97
+ ### Codex
178
98
 
179
99
  ```bash
180
100
  prodex
@@ -185,110 +105,40 @@ prodex run 019c9e3d-45a0-7ad0-a6ee-b194ac2d44f9
185
105
  printf 'context from stdin' | prodex run exec "summarize this"
186
106
  ```
187
107
 
188
- ### Run with Claude Code
108
+ ### Caveman
189
109
 
190
110
  ```bash
191
- prodex claude -- -p "summarize this repo"
192
- prodex claude --profile second -- -p --output-format json "show the latest diff"
111
+ prodex caveman
112
+ prodex caveman --profile main
113
+ prodex caveman exec "review this repo in caveman mode"
114
+ prodex caveman 019c9e3d-45a0-7ad0-a6ee-b194ac2d44f9
193
115
  ```
194
116
 
195
- ### Export & Import Profiles
117
+ `prodex caveman` uses the Caveman plugin from [JuliusBrussee/caveman](https://github.com/JuliusBrussee/caveman) and launches Codex from a temporary overlay `CODEX_HOME`, so the base profile home stays unchanged after the session ends.
118
+
119
+ ### Claude Code
196
120
 
197
121
  ```bash
198
- prodex profile export
199
- prodex profile export backup.json
200
- prodex profile export --profile main --profile second backup.json
201
- prodex profile import backup.json
122
+ prodex claude -- -p "summarize this repo"
123
+ prodex claude caveman
124
+ prodex claude caveman -- -p "summarize this repo briefly"
125
+ prodex claude --profile second caveman -- -p "review the latest diff briefly"
126
+ prodex claude --profile second -- -p --output-format json "show the latest diff"
202
127
  ```
203
128
 
204
- `prodex profile export` includes each exported profile’s `auth.json`.
205
- By default, it exports every configured profile and asks whether the bundle should be password-protected.
129
+ Use `prodex claude` for the normal Claude Code path, and use `prodex claude caveman` when you want the same Claude front end with Caveman mode preloaded.
130
+
131
+ Prefixing Claude args with `caveman` loads the Caveman plugin for that Claude session only while keeping Claude state under Prodex-managed `CLAUDE_CONFIG_DIR`, so the global `~/.claude` state is not the source of truth for the Prodex session.
206
132
 
207
- ### Quota, Status & Debugging
133
+ ### Export, Quota, and Debugging
208
134
 
209
135
  ```bash
136
+ prodex profile export
210
137
  prodex quota --all
211
138
  prodex quota --all --once
212
- prodex quota --profile main --detail
213
- prodex info
214
- prodex audit
215
- prodex audit --tail 20 --component profile
216
- prodex cleanup
217
- prodex doctor
218
- prodex doctor --quota
219
- prodex doctor --runtime
220
- prodex doctor --runtime --json
221
- ```
222
-
223
- If a runtime session looks stalled, inspect the latest runtime log:
224
-
225
- ```bash
226
139
  prodex doctor --runtime
227
- tail -n 200 "$(cat /tmp/prodex-runtime-latest.path)"
228
- ```
229
-
230
- That pointer path lives in `/tmp` only when you keep the default runtime log directory. If you override the runtime log directory through policy or environment, use `prodex doctor --runtime --json` to read the active `log_path` and live broker metrics.
231
-
232
- Use `prodex cleanup` to remove stale local runtime logs, temporary login homes, dead broker leases and registries, transient runtime cache files in `.prodex`, stale root temp files left by interrupted atomic writes, collapse duplicate profiles that resolve to the same account email into one surviving profile, plus old orphaned managed profile homes that are no longer tracked in state.
233
-
234
- ## Advanced Runtime Configuration
235
-
236
- If you want tighter control over runtime logging, secrets, or proxy behavior, you can pin local settings in `$PRODEX_HOME/policy.toml` or `~/.prodex/policy.toml`.
237
-
238
- ```toml
239
- version = 1
240
-
241
- [runtime]
242
- log_format = "json"
243
- log_dir = "runtime-logs"
244
-
245
- [secrets]
246
- backend = "file"
247
- # keyring_service = "prodex"
248
-
249
- [runtime_proxy]
250
- worker_count = 16
251
- active_request_limit = 128
252
- responses_active_limit = 96
253
- http_connect_timeout_ms = 5000
254
- stream_idle_timeout_ms = 300000
255
140
  ```
256
141
 
257
- Notes:
258
-
259
- * Environment variables still win over `policy.toml`
260
- * `prodex info` and `prodex doctor` show the active policy file, selected secret backend, and effective runtime log mode
261
- * The default runtime log format remains `text`; set `log_format = "json"` or `PRODEX_RUNTIME_LOG_FORMAT=json` when you want machine-readable runtime logs
262
- * Secret backend selection can be overridden with `PRODEX_SECRET_BACKEND` and `PRODEX_SECRET_KEYRING_SERVICE`
263
- * `prodex audit` reads the local append-only audit log and supports `--tail`, `--component`, `--action`, `--outcome`, and `--json`
264
-
265
- ## Hardening And Operational Notes
266
-
267
- The current setup is still local-first, but it already includes:
268
-
269
- * a secret-management abstraction for `auth.json` and exported profile bundles
270
- * a stable live broker snapshot at `GET /__prodex/runtime/metrics`
271
- * a Prometheus scrape target at `GET /__prodex/runtime/metrics/prometheus`
272
- * `prodex info` and `prodex doctor --runtime --json` surfacing live broker metrics targets and the selected secret backend
273
- * append-only audit logging for profile selection, rotation decisions, and admin-facing state changes
274
- * `prodex audit` as a local read-only CLI surface for browsing recent audit events
275
-
276
- Current limitations:
277
-
278
- * local `auth.json` remains the compatibility source of truth for current Codex flows even when a non-file backend is selected
279
- * there is no keychain, Vault, or KMS-backed secret backend implementation yet
280
- * audit logs follow the resolved runtime log directory by default, or `PRODEX_AUDIT_LOG_DIR` when set
281
- * there is no central control plane, RBAC, SSO, or SCIM
282
- * `prodex doctor --runtime --json` is useful operationally, but it is not a full observability stack
283
- * the repo still assumes a per-host profile pool and local state ownership
284
- * runtime-store modularization is still in progress, so persistence and audit/event handling remain implementation details rather than a public API
285
-
286
- ## Notes
287
-
288
- * Managed profiles share persisted Codex state through Prodex-owned shared storage
289
- * `prodex quota --all` refreshes live by default
290
- * Use `--once` if you only want a one-shot snapshot
291
-
292
142
  ## Learn More
293
143
 
294
- For a longer walkthrough, see [QUICKSTART.md](./QUICKSTART.md).
144
+ For a longer walkthrough and the broader command set, see [QUICKSTART.md](./QUICKSTART.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@christiandoxa/prodex",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Safe multi-account auto-rotate for Codex CLI with isolated CODEX_HOME profiles",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -16,12 +16,12 @@
16
16
  "@openai/codex": "latest"
17
17
  },
18
18
  "optionalDependencies": {
19
- "@christiandoxa/prodex-linux-x64": "0.9.0",
20
- "@christiandoxa/prodex-linux-arm64": "0.9.0",
21
- "@christiandoxa/prodex-darwin-x64": "0.9.0",
22
- "@christiandoxa/prodex-darwin-arm64": "0.9.0",
23
- "@christiandoxa/prodex-win32-x64": "0.9.0",
24
- "@christiandoxa/prodex-win32-arm64": "0.9.0"
19
+ "@christiandoxa/prodex-linux-x64": "0.10.0",
20
+ "@christiandoxa/prodex-linux-arm64": "0.10.0",
21
+ "@christiandoxa/prodex-darwin-x64": "0.10.0",
22
+ "@christiandoxa/prodex-darwin-arm64": "0.10.0",
23
+ "@christiandoxa/prodex-win32-x64": "0.10.0",
24
+ "@christiandoxa/prodex-win32-arm64": "0.10.0"
25
25
  },
26
26
  "engines": {
27
27
  "node": ">=18"