cdx-manager 0.5.6 → 0.6.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # CDX Manager
2
2
 
3
- [![License](https://img.shields.io/badge/license-MIT-4C8BF5)](LICENSE) ![Version](https://img.shields.io/badge/version-v0.5.6-4C8BF5) ![Python](https://img.shields.io/badge/python-3.9%2B-3776AB?logo=python&logoColor=white)
3
+ [![License](https://img.shields.io/badge/license-MIT-4C8BF5)](LICENSE) ![Version](https://img.shields.io/badge/version-v0.6.0-4C8BF5) ![Python](https://img.shields.io/badge/python-3.9%2B-3776AB?logo=python&logoColor=white)
4
4
 
5
5
  **Run multiple Codex and Claude sessions from one terminal. Switch between accounts instantly.**
6
6
 
@@ -34,9 +34,14 @@ One command to launch any session. Zero auth juggling.
34
34
 
35
35
  - **Multiple accounts, one tool.** Register as many Codex or Claude sessions as you need. Each one gets its own isolated auth environment — no cross-contamination between accounts.
36
36
  - **Instant launch.** `cdx work` opens your "work" session. `cdx personal` opens another. No config files to edit mid-flow.
37
+ - **Quick relaunch.** `cdx last` reopens the most recently launched assistant profile.
37
38
  - **Auth guardrails.** `cdx` checks authentication before launching. If a session is not logged in, it tells you exactly what to run — no silent failures.
38
39
  - **Usage at a glance.** `cdx status` shows token usage, 5-hour window quota, weekly quota, last-updated timestamps, priority guidance, and the last launched session in one aligned table.
40
+ - **Next-ready notification.** `cdx ready` schedules a native system notification for the next assistant that comes back from cooldown, then returns immediately.
39
41
  - **Session control.** Disable a session without deleting it when an account is temporarily out of credits; disabled sessions remain visible and sort last.
42
+ - **Persistent launch settings.** Pin per-session power, permission, and fast-mode preferences once; `cdx` reapplies them on every launch until you unset them.
43
+ - **Launch history.** Inspect recent launches with provider, result, duration, working directory, launch settings, and transcript path.
44
+ - **Update prompts.** Periodic update checks surface `cdx update` directly in the `cdx`, `cdx status`, and launch output when a newer release is available.
40
45
  - **Shared handoff context.** Keep a per-workspace Markdown context, or build one from a source session transcript, and install it into another assistant session before switching providers or accounts.
41
46
  - **Passive status resolution.** Codex status is read from the local Codex app-server rate-limit API when available, with legacy transcript/history parsing kept as a fallback.
42
47
  - **Session transcript capture.** Every launch is recorded to a local log file via `script`, giving you a full terminal transcript for each session.
@@ -126,7 +131,7 @@ For a specific version:
126
131
 
127
132
  ```bash
128
133
  curl -fsSL https://raw.githubusercontent.com/AlexAgo83/cdx-manager/main/install.sh -o install.sh
129
- CDX_VERSION=v0.5.6 sh install.sh
134
+ CDX_VERSION=v0.6.0 sh install.sh
130
135
  ```
131
136
 
132
137
  From source:
@@ -229,8 +234,55 @@ cdx work
229
234
 
230
235
  # Check usage across all sessions
231
236
  cdx status
237
+
238
+ # Notify when the next cooling-down assistant is ready
239
+ cdx ready
240
+ ```
241
+
242
+ ### Next-Ready Notifications
243
+
244
+ Use `cdx ready` when every useful assistant is cooling down and you want your terminal back. It is shorthand for `cdx notify --schedule --next-ready`: cdx picks the next known reset, registers a native OS notification, and exits immediately.
245
+
246
+ ```bash
247
+ cdx ready
248
+ cdx ready --refresh
249
+ ```
250
+
251
+ ### Persistent Launch Settings
252
+
253
+ By default, `cdx` launches provider CLIs without forcing model effort, permission mode, or fast behavior. Set only the values you want to pin:
254
+
255
+ ```bash
256
+ cdx set work --power medium --permission full --fast off
257
+ cdx set personal --power low --permission review
258
+ cdx config work
232
259
  ```
233
260
 
261
+ Those values are stored on the session and reapplied every time you run `cdx work`. Remove overrides to return to provider defaults:
262
+
263
+ ```bash
264
+ cdx unset work --power
265
+ cdx unset work --all
266
+ ```
267
+
268
+ `--power` maps to Codex `model_reasoning_effort` and Claude `--effort`. `--permission` maps to provider-native permission flags. `--fast on` uses low effort when no explicit power is set.
269
+
270
+ ### Launch History
271
+
272
+ Every interactive `cdx <name>` launch is recorded under `CDX_HOME`, including success/failure, duration, cwd, launch settings, and transcript path.
273
+
274
+ ```bash
275
+ cdx history
276
+ cdx history work
277
+ cdx history work --limit 5
278
+ cdx history work --json
279
+ cdx history --summary
280
+ cdx history --summary --since 7d
281
+ cdx history --summary --from 2026-05-01 --to 2026-05-28
282
+ ```
283
+
284
+ `cdx history --summary` aggregates total time per assistant. Add `--since`, `--from`, or `--to` to focus on a period.
285
+
234
286
  ---
235
287
 
236
288
  ## All Commands
@@ -248,6 +300,11 @@ cdx status
248
300
  | `cdx logout <name> [--json]` | Log out of a session |
249
301
  | `cdx disable <name> [--json]` | Disable a session without deleting it; disabled sessions stay visible and cannot launch |
250
302
  | `cdx enable <name> [--json]` | Re-enable a disabled session |
303
+ | `cdx config <name> [--json]` | Show persistent launch settings for a session |
304
+ | `cdx set <name> [--power low\|medium\|high\|xhigh\|max] [--permission review\|default\|auto\|full] [--fast on\|off] [--json]` | Persist launch settings for a session |
305
+ | `cdx unset <name> (--power\|--permission\|--fast\|--all) [--json]` | Remove persisted launch settings and fall back to provider defaults |
306
+ | `cdx history [name] [--limit N] [--summary] [--since 7d\|today\|DATE] [--from DATE] [--to DATE] [--json]` | Show recent launch history or aggregate total launch time per assistant, optionally filtered by period |
307
+ | `cdx last [--json]` | Launch the most recent existing session from launch history |
251
308
  | `cdx context show\|path\|init\|edit\|clear\|set [text...] [--json]` | Manage the shared Markdown context for the current workspace |
252
309
  | `cdx handoff <name> [--json]` | Install the current workspace context into a target session and launch it unless `--json` is used |
253
310
  | `cdx handoff <source> <target> [--json]` | Build shared context from the source session's latest launch transcript, install it into the target session, and launch the target unless `--json` is used; supports Codex and Claude targets, including cross-provider handoff |
@@ -258,8 +315,9 @@ cdx status
258
315
  | `cdx doctor [--json]` | Inspect CLI dependencies, CDX_HOME permissions, missing state, orphan profiles, and pending quarantines |
259
316
  | `cdx repair [--dry-run] [--force] [--json]` | Plan or apply safe repairs for missing state files, quarantines, and orphan profiles |
260
317
  | `cdx update [--check] [--yes] [--json] [--version TAG]` | Update cdx-manager using the installer that matches how it was installed |
261
- | `cdx notify <name> --at-reset [--poll seconds] [--once] [--refresh] [--json]` | Wait for a session reset time and send a desktop notification when due |
262
- | `cdx notify --next-ready [--poll seconds] [--once] [--refresh] [--json]` | Wait until the recommended session is usable or needs a refresh after reset |
318
+ | `cdx ready [--refresh] [--json]` | Schedule an OS notification for the next cooling-down assistant that becomes ready, then return immediately |
319
+ | `cdx notify <name> --at-reset [--poll seconds] [--once] [--schedule] [--refresh] [--json]` | Wait for a session reset time or schedule an OS wake-up notification when due |
320
+ | `cdx notify --next-ready [--poll seconds] [--once] [--schedule] [--refresh] [--json]` | Wait until the recommended session is usable, or schedule the next known reset notification |
263
321
  | `cdx status [--json] [--refresh]` | Show token usage table for all sessions; JSON returns a versioned payload with structured warnings |
264
322
  | `cdx status --small [--refresh]` / `cdx status -s [--refresh]` | Show compact token usage table without provider, blocking quota, credits, and updated columns |
265
323
  | `cdx status <name> [--json] [--refresh]` | Show detailed usage breakdown for one session |
@@ -290,9 +348,12 @@ Commands with machine-readable output:
290
348
  - `cdx enable ... --json`
291
349
  - `cdx context ... --json`
292
350
  - `cdx handoff ... --json`
351
+ - `cdx history ... --json`
352
+ - `cdx last --json`
293
353
  - `cdx doctor --json`
294
354
  - `cdx repair --json`
295
355
  - `cdx update --json`
356
+ - `cdx ready --json`
296
357
  - `cdx notify ... --json`
297
358
 
298
359
  Success payloads follow a shared envelope:
@@ -429,6 +490,7 @@ All session data lives under `CDX_HOME` (default: `~/.cdx/`):
429
490
  sessions.json # Session registry (versioned, all sessions)
430
491
  state/
431
492
  <encoded-name>.json # Per-session rehydration state
493
+ launch_history.jsonl # Append-only launch history
432
494
  profiles/
433
495
  <encoded-name>/ # Codex session: CODEX_HOME points here
434
496
  log/
@@ -0,0 +1,45 @@
1
+ # Changelog (`0.5.6 -> 0.5.7`)
2
+
3
+ Release date: 2026-05-27
4
+
5
+ ## Major Highlights
6
+
7
+ - Added persistent per-session launch settings for Codex and Claude assistants.
8
+ - Let users pin power, permission, and fast-mode preferences once and have `cdx` reapply them on every launch.
9
+ - Preserved native provider defaults when no launch settings are configured.
10
+
11
+ ## Launch Settings
12
+
13
+ - Added `cdx set <name>` with `--power`, `--permission`, and `--fast` options.
14
+ - Added `cdx config <name>` to inspect the launch settings stored on a session.
15
+ - Added `cdx unset <name>` to clear individual launch settings or all overrides with `--all`.
16
+ - Stored launch settings directly on each CDX session record.
17
+ - Copied launch settings when copying a session.
18
+ - Exported and imported launch settings with session bundles.
19
+
20
+ ## Provider Runtime
21
+
22
+ - Mapped Codex power settings to `model_reasoning_effort`.
23
+ - Mapped Claude power settings to `--effort`.
24
+ - Mapped Codex permission presets to sandbox and approval flags.
25
+ - Mapped Claude permission presets to `--permission-mode`.
26
+ - Treated `--fast on` as low effort when no explicit power setting is configured.
27
+
28
+ ## CLI Output and Documentation
29
+
30
+ - Added launch settings to `cdx --help`.
31
+ - Added a compact launch-settings column to `cdx` session listings when any session has overrides.
32
+ - Documented the persistent launch-settings workflow in the README.
33
+ - Updated package metadata, CLI version output, README badge, and pinned installer example to `v0.5.7`.
34
+
35
+ ## Validation and Regression Coverage
36
+
37
+ - Added regression coverage for persistent Codex launch settings and `unset --all`.
38
+ - Added regression coverage for persistent Claude launch settings and `cdx config`.
39
+ - Added runtime coverage for `fast on` resolving to low effort when no power is configured.
40
+
41
+ ## Validation and Regression Evidence
42
+
43
+ - `python -m py_compile bin/cdx src/*.py test/test_*_py.py`
44
+ - `python -m unittest discover -s test -p 'test_*_py.py'`
45
+ - `npm pack --dry-run`
@@ -0,0 +1,47 @@
1
+ # Changelog (`0.5.7 -> 0.6.0`)
2
+
3
+ Release date: 2026-05-28
4
+
5
+ ## Major Highlights
6
+
7
+ - Added launch history workflows for reviewing, summarizing, and relaunching assistant sessions.
8
+ - Improved `cdx status` guidance with reset-week countdowns, active-session marking, cleaner blocking quota labels, and periodic update notices.
9
+ - Added shortcut commands that reduce routine assistant switching and waiting friction.
10
+
11
+ ## Launch History and Relaunch
12
+
13
+ - Added `cdx history` to inspect recent assistant launches with provider, result, duration, working directory, launch settings, and transcript path.
14
+ - Added `cdx history --summary` to aggregate assistant time by session.
15
+ - Added period filters for history summaries with `--since`, `--from`, and `--to`.
16
+ - Added `cdx last` to relaunch the most recent existing session from launch history.
17
+ - Skips removed sessions when resolving the last launch target.
18
+
19
+ ## Status and Availability
20
+
21
+ - Added reset-week countdowns to status output.
22
+ - Hid healthy blocking quota labels so status tables stay focused on actionable quota limits.
23
+ - Marked the active launched session in status and list output.
24
+ - Added `cdx ready` as a shortcut for scheduling the next assistant reset notification.
25
+ - Added update notices to `cdx status`, matching the existing periodic update check behavior.
26
+ - Changed visual update notices to show `Run: cdx update` instead of a release URL.
27
+
28
+ ## CLI Ergonomics
29
+
30
+ - Curated the main screen next-actions list around the commands users are most likely to run next.
31
+ - Kept release URLs in JSON warning payloads for integrations while making text output directly actionable.
32
+ - Added `cdx last [--json]` to help output and README command documentation.
33
+
34
+ ## Release Metadata and Documentation
35
+
36
+ - Updated package metadata, CLI version output, README badge, and pinned installer example to `v0.6.0`.
37
+ - Documented `cdx last` and the action-oriented update notices in the README.
38
+
39
+ ## Validation and Regression Coverage
40
+
41
+ - Added regression coverage for launch history, assistant-time summaries, period filters, active session indicators, `cdx ready`, `cdx last`, and update notices in `cdx status`.
42
+ - Added coverage to ensure visual update notices show `Run: cdx update` without leaking the release URL.
43
+
44
+ ## Validation and Regression Evidence
45
+
46
+ - `npm run lint`
47
+ - `npm test`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cdx-manager",
3
- "version": "0.5.6",
3
+ "version": "0.6.0",
4
4
  "description": "Terminal session manager for Codex and Claude accounts.",
5
5
  "license": "MIT",
6
6
  "author": "Alexandre Agostini",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cdx-manager"
7
- version = "0.5.6"
7
+ version = "0.6.0"
8
8
  description = "Terminal session manager for Codex and Claude accounts."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
package/src/cli.py CHANGED
@@ -9,6 +9,7 @@ from .cli_commands import (
9
9
  STATUS_USAGE,
10
10
  handle_add,
11
11
  handle_clean,
12
+ handle_config,
12
13
  handle_context,
13
14
  handle_copy,
14
15
  handle_doctor,
@@ -17,6 +18,8 @@ from .cli_commands import (
17
18
  handle_export,
18
19
  handle_import,
19
20
  handle_handoff,
21
+ handle_history,
22
+ handle_last,
20
23
  handle_launch,
21
24
  handle_login,
22
25
  handle_logout,
@@ -25,6 +28,8 @@ from .cli_commands import (
25
28
  handle_repair,
26
29
  handle_rename,
27
30
  handle_status,
31
+ handle_set,
32
+ handle_unset,
28
33
  handle_update,
29
34
  )
30
35
  from .cli_render import (
@@ -49,7 +54,7 @@ from .status_view import (
49
54
  )
50
55
  from .update_check import check_for_update
51
56
 
52
- VERSION = "0.5.6"
57
+ VERSION = "0.6.0"
53
58
 
54
59
 
55
60
  # ---------------------------------------------------------------------------
@@ -67,6 +72,11 @@ def _print_help(use_color=False):
67
72
  f" {_style('cdx status --small|-s [--refresh]', '36', use_color)}",
68
73
  f" {_style('cdx status <name> [--json] [--refresh]', '36', use_color)}",
69
74
  f" {_style('cdx context show|path|init|edit|clear|set [text...] [--json]', '36', use_color)}",
75
+ f" {_style('cdx config <name> [--json]', '36', use_color)}",
76
+ f" {_style('cdx set <name> [--power low|medium|high|xhigh|max] [--permission review|default|auto|full] [--fast on|off] [--json]', '36', use_color)}",
77
+ f" {_style('cdx unset <name> (--power|--permission|--fast|--all) [--json]', '36', use_color)}",
78
+ f" {_style('cdx history [name] [--limit N] [--summary] [--since 7d|today|DATE] [--from DATE] [--to DATE] [--json]', '36', use_color)}",
79
+ f" {_style('cdx last [--json]', '36', use_color)}",
70
80
  f" {_style('cdx handoff <name> [--json]', '36', use_color)}",
71
81
  f" {_style('cdx handoff <source> <target> [--json]', '36', use_color)}",
72
82
  f" {_style('cdx add [provider] <name> [--json]', '36', use_color)}",
@@ -83,8 +93,9 @@ def _print_help(use_color=False):
83
93
  f" {_style('cdx doctor [--json]', '36', use_color)}",
84
94
  f" {_style('cdx repair [--dry-run] [--force] [--json]', '36', use_color)}",
85
95
  f" {_style('cdx update [--check] [--yes] [--json] [--version TAG]', '36', use_color)}",
86
- f" {_style('cdx notify <name> --at-reset [--refresh] [--json]', '36', use_color)}",
87
- f" {_style('cdx notify --next-ready [--refresh] [--json]', '36', use_color)}",
96
+ f" {_style('cdx ready [--refresh] [--json]', '36', use_color)}",
97
+ f" {_style('cdx notify <name> --at-reset [--schedule] [--refresh] [--json]', '36', use_color)}",
98
+ f" {_style('cdx notify --next-ready [--schedule] [--refresh] [--json]', '36', use_color)}",
88
99
  f" {_style('cdx <name> [--json]', '36', use_color)}",
89
100
  f" {_style('cdx --help', '36', use_color)}",
90
101
  f" {_style('cdx --version', '36', use_color)}",
@@ -150,8 +161,7 @@ def _update_warning_payload(notice):
150
161
  def _update_warning_text(notice):
151
162
  if not notice:
152
163
  return None
153
- suffix = f" {notice['url']}" if notice.get("url") else ""
154
- return f"Update available: cdx-manager {notice['latest_version']} (current {VERSION}).{suffix}"
164
+ return f"Update available: cdx-manager {notice['latest_version']} (current {VERSION}). Run: cdx update"
155
165
 
156
166
 
157
167
  # ---------------------------------------------------------------------------
@@ -221,7 +231,7 @@ def main(argv, options=None):
221
231
  "version": VERSION,
222
232
  "cwd": options.get("cwd") or os.getcwd(),
223
233
  "update_notice": _get_update_notice(service, env, options) if command not in (
224
- "add", "cp", "ren", "rename", "mv", "rmv", "clean", "doctor", "repair", "update", "notify", "status", "context", "handoff", "login", "logout", "disable", "enable", "export", "import", "help", "version"
234
+ "add", "cp", "ren", "rename", "mv", "rmv", "clean", "doctor", "repair", "update", "ready", "notify", "context", "config", "set", "unset", "history", "handoff", "login", "logout", "disable", "enable", "export", "import", "help", "version"
225
235
  ) else None,
226
236
  "use_color": use_color,
227
237
  }
@@ -262,12 +272,32 @@ def main(argv, options=None):
262
272
  if command == "update":
263
273
  return handle_update(rest, ctx)
264
274
 
275
+ if command == "ready":
276
+ if any(arg not in ("--refresh", "--json") for arg in rest):
277
+ raise CdxError("Usage: cdx ready [--refresh] [--json]")
278
+ return handle_notify(["--next-ready", "--schedule", *rest], ctx)
279
+
265
280
  if command == "notify":
266
281
  return handle_notify(rest, ctx)
267
282
 
268
283
  if command == "context":
269
284
  return handle_context(rest, ctx)
270
285
 
286
+ if command == "config":
287
+ return handle_config(rest, ctx)
288
+
289
+ if command == "set":
290
+ return handle_set(rest, ctx)
291
+
292
+ if command == "unset":
293
+ return handle_unset(rest, ctx)
294
+
295
+ if command == "history":
296
+ return handle_history(rest, ctx)
297
+
298
+ if command == "last":
299
+ return handle_last(rest, ctx)
300
+
271
301
  if command == "handoff":
272
302
  return handle_handoff(rest, ctx)
273
303