codemax-cli 0.1.1 → 0.1.4

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
@@ -31,6 +31,14 @@
31
31
 
32
32
  ## Get started
33
33
 
34
+ **Any system with Node.js 18+** (brings its own Bun):
35
+
36
+ ```sh
37
+ npm install -g codemax-cli
38
+ ```
39
+
40
+ Or without npm:
41
+
34
42
  **macOS and Linux:**
35
43
 
36
44
  ```sh
@@ -82,6 +90,11 @@ cd codemax-cli && bun install && bun link
82
90
  | `/ask codex <msg>` | One question to another agent |
83
91
  | `@file` | Attach a file to your message |
84
92
  | `/task` | The shared task: plan, who did what, where it stopped, files changed |
93
+ | `/update` | Update codemax when a new version is out (also `codemax update`) |
94
+ | `/config` | Every setting in one panel: theme, keep awake, side agent and its model, handoffs, snapshots… |
95
+ | `/side` | Pick a side agent and its model; it reviews each turn and leaves a note when something needs attention (`/side codex <model> auto` forwards notes itself) |
96
+ | `/forward`, `/notes`, `/review` | Send the side agent's note to the main agent; list notes; ask for a review now. How often it reviews is in `/config`; each review uses the side agent's plan, so a different subscription than the main agent is best |
97
+ | `/awake on`, `/awake lid` | Keep the machine from sleeping while agents work; `lid` also with the lid closed |
85
98
  | `/undo` | Revert the last turn's changes |
86
99
  | `/usage`, `/budget` | Usage and spend per agent |
87
100
  | `/model`, `/effort`, **Shift+Tab** | Pick the model or reasoning effort, cycle permission mode |
@@ -129,7 +142,7 @@ codemax history | brief | status | config | keys
129
142
  - Your code goes only to the agents you already use, under your own logins.
130
143
  - codemax always removes vendor API keys from the agents it starts, and `codemax doctor --fix` removes any left in Claude Code's settings.
131
144
  - Grok follows your Claude Code permission setting. If that is `auto`, Grok acts without asking, and codemax warns you.
132
- - Its only network call is a weekly price-list download, which `priceUpdates: false` turns off.
145
+ - Its own network calls are a weekly price-list download (`priceUpdates: false` turns it off) and a version check at most every 12 hours against npm or GitHub releases (`updateCheck: false` turns it off). Both are in `/config`.
133
146
  - Usage values are what your plans covered at public API rates, not money you spent.
134
147
 
135
148
  </details>
package/bin/codemax.cjs CHANGED
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  // codemax launcher for npm installs (`npm i -g codemax-cli`, `npx codemax-cli`).
3
3
  // codemax runs on Bun; this finds a Bun binary and starts src/cli.ts with it:
4
- // 1. the `bun` npm package installed alongside codemax (a dependency),
5
- // 2. its platform package directly (when install scripts were skipped),
4
+ // 1. the `bun` npm package, if one is installed alongside codemax,
5
+ // 2. the matching @oven/bun-<platform> package (an optional dependency of
6
+ // codemax; npm installs only the one for this machine, no install script),
6
7
  // 3. a `bun` already on PATH.
7
8
  "use strict";
8
9
  const { spawn, spawnSync } = require("node:child_process");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codemax-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.4",
4
4
  "description": "One terminal for every coding agent you pay for: drive Claude Code, Codex, OpenCode, Grok and Gemini CLI from one chat, on your subscriptions, with context that survives switching agents.",
5
5
  "keywords": [
6
6
  "acp",
@@ -50,10 +50,19 @@
50
50
  "prepublishOnly": "bun run typecheck && bun test"
51
51
  },
52
52
  "dependencies": {
53
+ "@agentclientprotocol/claude-agent-acp": "0.93.0",
53
54
  "@agentclientprotocol/sdk": "1.9.0",
54
- "@opentui/core": "0.6.6",
55
- "@zed-industries/claude-code-acp": "0.16.2",
56
- "bun": "^1.3.5"
55
+ "@opentui/core": "0.6.6"
56
+ },
57
+ "optionalDependencies": {
58
+ "@oven/bun-darwin-aarch64": "1.4.3",
59
+ "@oven/bun-darwin-x64": "1.4.3",
60
+ "@oven/bun-linux-aarch64": "1.4.3",
61
+ "@oven/bun-linux-aarch64-musl": "1.4.3",
62
+ "@oven/bun-linux-x64": "1.4.3",
63
+ "@oven/bun-linux-x64-musl": "1.4.3",
64
+ "@oven/bun-windows-aarch64": "1.4.3",
65
+ "@oven/bun-windows-x64": "1.4.3"
57
66
  },
58
67
  "devDependencies": {
59
68
  "@types/bun": "latest",
@@ -3,19 +3,25 @@ import { claude } from "./claude.ts";
3
3
  import { codex } from "./codex.ts";
4
4
  import { opencode, cursor, grok, gemini, copilot, fake } from "./simple.ts";
5
5
 
6
- const all: Adapter[] = [claude, codex, opencode, cursor, grok, gemini, copilot];
7
- if (process.env.CODEMAX_FAKE_AGENT) all.push(fake);
6
+ const real: Adapter[] = [claude, codex, opencode, cursor, grok, gemini, copilot];
8
7
 
9
- export const adapters: Record<string, Adapter> = Object.fromEntries(all.map((a) => [a.id, a]));
8
+ /**
9
+ * The adapters, read at call time: tests set CODEMAX_FAKE_AGENT after another
10
+ * test file may already have imported this module (bun runs all files in one
11
+ * process), so the fake agent must not be decided once at import.
12
+ */
13
+ function all(): Adapter[] {
14
+ return process.env.CODEMAX_FAKE_AGENT ? [...real, fake] : real;
15
+ }
10
16
 
11
17
  export function getAdapter(id: string): Adapter {
12
- const a = adapters[id];
13
- if (!a) throw new Error(`unknown agent "${id}". Known: ${Object.keys(adapters).join(", ")}`);
18
+ const a = all().find((x) => x.id === id);
19
+ if (!a) throw new Error(`unknown agent "${id}". Known: ${all().map((x) => x.id).join(", ")}`);
14
20
  return a;
15
21
  }
16
22
 
17
23
  export function listAdapters(order: AgentId[]): Adapter[] {
18
- const ranked = order.map((id) => adapters[id]).filter((a): a is Adapter => !!a);
19
- const rest = all.filter((a) => !ranked.includes(a));
20
- return [...ranked, ...rest];
24
+ const list = all();
25
+ const ranked = order.map((id) => list.find((a) => a.id === id)).filter((a): a is Adapter => !!a);
26
+ return [...ranked, ...list.filter((a) => !ranked.includes(a))];
21
27
  }