cli-relay 1.0.0 → 1.0.2

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
@@ -6,6 +6,22 @@ Resume-by-reference delegation across codex, agy, claude-code (command-code: fre
6
6
  Built 2026-08-16/17, inspired by DeepSeek Harness's subagent architecture but deliberately
7
7
  smaller — see design history below before re-deriving any of this from scratch.
8
8
 
9
+ ## Built for your agent to drive, not just for you to type
10
+
11
+ cli-relay is designed to be called *by your own coding agent* as a tool, not only typed by
12
+ hand. Every `fresh`/`resume` call returns one structured JSON object on stdout — a native
13
+ session id, the model's answer, exit code, timing/signal info — specifically so an agent can
14
+ parse the result and decide what to do next without guessing at free-form text. Exit codes are
15
+ deliberate and stable (0 success, 1 general error, 2 usage error, 3 "ran but produced no usable
16
+ answer" — see Exit codes below) so an agent's own control flow can branch on them directly.
17
+
18
+ In practice that means: point your daily-driver agent (Claude Code, Codex, whatever you're
19
+ already using) at this README and ask it to use `cli-relay` to delegate a task to a different
20
+ backend, or to resume a thread from three days ago — it has everything it needs in this file
21
+ and in `cli-relay doctor`'s output to do that itself, without you hand-holding it through the
22
+ CLI's own flags. Nothing about this requires an agent, though — every command works exactly the
23
+ same typed directly into a terminal by hand.
24
+
9
25
  ## Installation
10
26
 
11
27
  Requires Node.js 18.17 or newer.
@@ -16,6 +32,19 @@ npm install --global cli-relay
16
32
 
17
33
  The package has no runtime dependencies. Installation exposes the `cli-relay` command.
18
34
 
35
+ ## Prerequisites
36
+
37
+ cli-relay routes between AI coding-agent CLIs — it doesn't include or replace them. Install
38
+ whichever of these you actually use (you don't need all four; `cli-relay doctor` after
39
+ installing any of them confirms cli-relay can see it):
40
+
41
+ - **codex** — `npm install -g @openai/codex`, then `codex login`
42
+ - **claude-code** — `npm install -g @anthropic-ai/claude-code`, then run `claude` once to
43
+ authenticate
44
+ - **agy** (Google's Antigravity CLI) — macOS: `brew install --cask antigravity-cli`; other
45
+ platforms: see [antigravity.google/product/antigravity-cli](https://antigravity.google/product/antigravity-cli)
46
+ - **command-code** — `npm install -g command-code`, then `command-code login`
47
+
19
48
  ## Usage
20
49
 
21
50
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-relay",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Persistent CLI router for resuming named sessions across AI coding-agent backends.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,6 +5,7 @@ export default {
5
5
  name: 'agy',
6
6
  order: 20,
7
7
  binaryCandidates: ['agy'],
8
+ installHint: 'macOS: brew install --cask antigravity-cli — other platforms: https://antigravity.google/product/antigravity-cli',
8
9
  fresh: (prompt) => [
9
10
  'agy', '--dangerously-skip-permissions', '--print-timeout', '10m',
10
11
  '--model', 'gemini-3.6-flash-medium', '--add-dir', process.cwd(),
@@ -5,6 +5,7 @@ export default {
5
5
  name: 'claude-code',
6
6
  order: 30,
7
7
  binaryCandidates: ['claude'],
8
+ installHint: 'npm install -g @anthropic-ai/claude-code, then run: claude (once, to authenticate)',
8
9
  fresh: (prompt) => [
9
10
  'claude', '-p', prompt, '--output-format', 'json', '--dangerously-skip-permissions',
10
11
  ],
@@ -20,6 +20,7 @@ export default {
20
20
  name: 'codex',
21
21
  order: 10,
22
22
  binaryCandidates: ['codex'],
23
+ installHint: 'npm install -g @openai/codex, then: codex login',
23
24
  fresh: (prompt) => [
24
25
  'codex', 'exec', '--skip-git-repo-check', '--sandbox', 'workspace-write',
25
26
  '-m', 'gpt-5.6-sol', '--json', prompt,
@@ -5,6 +5,7 @@ export default {
5
5
  name: 'command-code',
6
6
  order: 40,
7
7
  binaryCandidates: ['command-code'],
8
+ installHint: 'npm install -g command-code, then: command-code login',
8
9
  fresh: (prompt) => [
9
10
  'command-code', '-p', prompt, '-m', 'zai-org/glm-5.2', '--output-format', 'json',
10
11
  '--trust', '--no-auto-update',
@@ -53,7 +53,8 @@ export async function cmdDoctor(adapters, isAvailable = realWhichCheck) {
53
53
  `${check.adapter.name}: available (found; tried: ${tried}; resolved: ${resolved})`,
54
54
  );
55
55
  } else {
56
- console.log(`${check.adapter.name}: unavailable (not found; tried: ${tried})`);
56
+ const hint = check.adapter.installHint ? ` install: ${check.adapter.installHint}` : '';
57
+ console.log(`${check.adapter.name}: unavailable (not found; tried: ${tried})${hint}`);
57
58
  }
58
59
  }
59
60
  }