@jacobbd/relay-ai 0.3.5 → 0.4.1

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
@@ -9,14 +9,15 @@
9
9
 
10
10
  [![npm version](https://img.shields.io/npm/v/@jacobbd/relay-ai)](https://www.npmjs.com/package/@jacobbd/relay-ai)
11
11
  [![License](https://img.shields.io/npm/l/@jacobbd/relay-ai)](LICENSE)
12
- [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-FFDD00?style=flat-square&logo=buy-me-a-coffee&logoColor=black)](https://buymeacoffee.com/jacobbd)
12
+
13
+ > ☕ **If you find relay-ai useful, consider [buying me a coffee](https://buymeacoffee.com/jacobbd).**
14
+ > It's free and built in my spare time — but testing every provider runs up a real AI bill. A coffee helps me cover it and keep shipping. Thank you! 🙏
15
+ >
16
+ > <a href="https://buymeacoffee.com/jacobbd"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="42"></a>
13
17
 
14
18
  <p align="center">
15
19
  <a href="https://youtu.be/IvsUPHLhX0o">
16
- <img src="https://img.youtube.com/vi/IvsUPHLhX0o/maxresdefault.jpg" alt="relay-ai demo — installation, configuration, Claude Code, Claude Cowork & Claude Code Desktop (Part 1)" width="49%">
17
- </a>
18
- <a href="https://youtu.be/42oiOB8IAu4">
19
- <img src="https://img.youtube.com/vi/42oiOB8IAu4/maxresdefault.jpg" alt="relay-ai demo — OpenAI Codex CLI & Codex Desktop App (Part 2)" width="49%">
20
+ <img src="assets/demo-part1-thumbnail.png" alt="relay-ai demo — installation, configuration, Claude Code, Claude Cowork & Claude Code Desktop (Part 1)" width="100%">
20
21
  </a>
21
22
  </p>
22
23
 
@@ -24,7 +25,7 @@
24
25
  > - **Demo (Part 1):** Installation · Configuration · Claude Code · Claude Cowork & Claude Code Desktop — [watch on YouTube](https://youtu.be/IvsUPHLhX0o)
25
26
  > - **Demo (Part 2):** OpenAI Codex CLI & Codex Desktop App — [watch on YouTube](https://youtu.be/42oiOB8IAu4)
26
27
 
27
- **relay-ai** is an interactive CLI that launches AI coding tools and runs local API gateways on your machine. Currently, it supports **Claude Code**, **Claude Desktop (Cowork + Code)**, the **OpenAI Codex CLI**, the **Codex desktop app (macOS + Windows)**, and the **Google Gemini CLI**.
28
+ **relay-ai** is an interactive CLI — and now a **visual launcher** — that connects AI coding tools to any provider and runs local API gateways on your machine. It supports **Claude Code**, **Claude Desktop (Cowork + Code)**, the **OpenAI Codex CLI**, the **ChatGPT desktop app in Codex mode (macOS + Windows)**, **Google Gemini CLI**, and experimental **Antigravity CLI / IDE** support.
28
29
 
29
30
  Pick your backend:
30
31
 
@@ -38,6 +39,7 @@ Pick your backend:
38
39
  | Command | Description |
39
40
  |---------|-------------|
40
41
  | `relay-ai` | Print help (does not launch Claude Code) |
42
+ | `relay-ai ui` | **Open the visual launcher** — manage providers and launch any tool from a browser UI |
41
43
  | `relay-ai claude` | Pick a provider → launch Claude Code |
42
44
  | `relay-ai providers` | Add, import, list, remove, and refresh your AI providers |
43
45
  | `relay-ai models` | Manage favorite models for mid-session `/model` switching |
@@ -45,12 +47,18 @@ Pick your backend:
45
47
  | `relay-ai server --vertex` | Foreground Anthropic-compatible gateway to Claude on Vertex AI |
46
48
  | `relay-ai claude-app` | Launch Claude Desktop app with registry providers ([guide](docs/CLAUDE_DESKTOP_SETUP.md)) |
47
49
  | `relay-ai codex` | Launch OpenAI Codex CLI with registry providers ([guide](docs/CODEX.md)) |
48
- | `relay-ai codex-app` | Launch Codex desktop app with registry providers ([guide](docs/CODEX.md)) |
50
+ | `relay-ai codex-app` (alias `chatgpt`) | Launch ChatGPT desktop app in Codex mode with registry providers ([guide](docs/CODEX.md)) |
49
51
  | `relay-ai gemini` | Launch Google Gemini CLI with registry providers |
52
+ | `relay-ai agy` | Launch Antigravity CLI with Relay models ([warning + guide](docs/ANTIGRAVITY.md)) |
53
+ | `relay-ai antigravity` | Launch Antigravity app with Relay models, macOS ([warning + guide](docs/ANTIGRAVITY.md)) |
54
+ | `relay-ai antigravity-ide` | Launch Antigravity IDE with Relay models, macOS ([warning + guide](docs/ANTIGRAVITY.md)) |
55
+ | `relay-ai providers auth <id>` | Authenticate an OAuth provider (GitHub Copilot, xAI, OpenAI) |
50
56
  | `relay-ai --ai` | Full agent reference for scripts and alef-agent ([guide](docs/AI-AGENTS.md)) |
51
57
 
52
58
  ## Features
53
59
 
60
+ - **Visual launcher UI:** `relay-ai ui` opens a browser dashboard — launch any supported tool with a point-and-click model picker. Pick provider and model in the UI; the terminal opens straight to the running session with no second selection step. Manage providers and favorites without leaving the browser.
61
+ - **Server tab in the UI:** Run the same API gateway as `relay-ai server` — favorites-only or specific providers, discovery id masking for Claude Desktop / Cowork, local or network listen mode — from a browser form instead of a terminal wizard. Shows live URLs, the API key, and the full model catalog once started, with a one-click Stop.
54
62
  - **Native provider registry:** `relay-ai providers` stores config in `~/.relay-ai/providers.json` and secrets in the OS keychain — no OpenCode binary required at launch. See **[docs/PROVIDERS.md](docs/PROVIDERS.md)** for a full list of providers and known issues.
55
63
  - **Provider templates:** Add Groq, Mistral, Together, OpenRouter, and 15+ SDK-backed providers, plus custom OpenAI/Anthropic-compatible endpoints
56
64
  - **OpenCode import:** One-time migration from OpenCode (`providers import`); validates API keys and skips placeholders like `anything`
@@ -60,8 +68,9 @@ Pick your backend:
60
68
  - **Smart model pickers:** Recent models per provider, search for large lists (>25), paginated browse (15 per page)
61
69
  - **Refresh model lists:** `relay-ai providers refresh-models` updates cached catalogs per provider
62
70
  - **API server:** Run a local gateway on port **17645** for Claude Code, Claude Desktop, or any Anthropic-compatible client
63
- - **Server wizard:** Filter exposed providers, mask discovery ids for Claude Desktop, optional favorites-only catalog, local vs network listen mode
71
+ - **Server wizard:** Filter exposed providers, mask discovery ids for Claude Desktop, optional favorites-only catalog, local vs network listen mode — available in the terminal (`relay-ai server`) or the `relay-ai ui` Server tab
64
72
  - **Vertex gateway:** Anthropic-compatible Claude on Google Vertex AI using gcloud Application Default Credentials
73
+ - **Antigravity CLI / app / IDE support:** Experimental local Cloud Code gateway for Antigravity's native model picker. Read the account warning before using it
65
74
  - **Clean environment isolation:** We strip 17 conflicting env vars (Vertex AI, Bedrock, AWS, Foundry, stale Anthropic config) from the child process only. We never touch `~/.claude/settings.json` (see caveat below)
66
75
  - **Secure key storage:** Per-provider keys and the OpenCode API key go in the OS credential store (macOS Keychain, Windows Credential Manager, Linux Secret Service) or your shell profile
67
76
  - **Cross-platform:** macOS, Windows, Linux (Ubuntu, Fedora, distros with GNOME Keyring or KWallet)
@@ -73,6 +82,7 @@ Pick your backend:
73
82
 
74
83
  | Tool | Command | Status |
75
84
  |------|---------|--------|
85
+ | **Visual launcher UI** | `relay-ai ui` | ✅ Supported — browser dashboard for all tools |
76
86
  | Provider registry | `relay-ai providers` | ✅ Supported ([guide](docs/PROVIDERS.md)) |
77
87
  | Claude Code | `relay-ai claude` | ✅ Supported |
78
88
  | Favorite models | `relay-ai models` | ✅ Supported |
@@ -80,8 +90,14 @@ Pick your backend:
80
90
  | Vertex API gateway | `relay-ai server --vertex` | ✅ Supported |
81
91
  | Claude Desktop (Cowork + Code) | `relay-ai claude-app` | ✅ Supported macOS + Windows ([guide](docs/CLAUDE_DESKTOP_SETUP.md)) |
82
92
  | Codex CLI | `relay-ai codex` | ✅ Supported ([guide](docs/CODEX.md)) |
83
- | Codex desktop app | `relay-ai codex-app` | ✅ Supported macOS + Windows ([guide](docs/CODEX.md)) |
93
+ | ChatGPT desktop app (Codex mode) | `relay-ai codex-app` (alias `chatgpt`) | ✅ Supported macOS + Windows ([guide](docs/CODEX.md)) |
84
94
  | Google Gemini CLI | `relay-ai gemini` | ⚠️ Experimental, model switching is done via .model prompt |
95
+ | Antigravity CLI | `relay-ai agy` | ⚠️ Experimental, use a throwaway Google account ([guide](docs/ANTIGRAVITY.md)) |
96
+ | Antigravity app | `relay-ai antigravity` | ⚠️ Experimental macOS + Windows support, use a throwaway Google account ([guide](docs/ANTIGRAVITY.md)) |
97
+ | Antigravity IDE | `relay-ai antigravity-ide` | ⚠️ Experimental macOS + Windows support, use a throwaway Google account ([guide](docs/ANTIGRAVITY.md)) |
98
+ | GitHub Copilot OAuth | `relay-ai providers auth github-copilot` | ✅ Device code flow ([guide](docs/SUBSCRIPTION-OAUTH.md)) |
99
+ | xAI SuperGrok OAuth | `relay-ai providers auth xai-oauth` | ✅ Device code flow ([guide](docs/SUBSCRIPTION-OAUTH.md)) |
100
+ | OpenAI ChatGPT OAuth | `relay-ai providers auth openai-oauth` | ✅ Device code flow ([guide](docs/SUBSCRIPTION-OAUTH.md)) |
85
101
 
86
102
  ## Prerequisites
87
103
 
@@ -90,6 +106,7 @@ Pick your backend:
90
106
  - At least one provider configured via `relay-ai providers add` or `import` — **or** an [OpenCode API key](https://opencode.ai/auth) for Zen/Go cloud backends
91
107
  - [OpenCode CLI](https://opencode.ai) only if you want **one-time import** from an existing OpenCode setup (optional)
92
108
  - For **Vertex gateway:** [Google Cloud SDK](https://cloud.google.com/sdk) with `gcloud auth application-default login`, a GCP project with Vertex AI enabled, and Claude partner models enabled in that project
109
+ - For **Antigravity CLI / IDE:** a Google account is still needed for Antigravity authentication. Do **not** use your main Google account. Use a throwaway or secondary account you can afford to lose.
93
110
 
94
111
  **A note on providers:** relay-ai keeps your provider list in `~/.relay-ai/providers.json`. You can add providers directly (API key + template), import from OpenCode once, or use Zen/Go cloud backends. OpenCode is not required after setup.
95
112
 
@@ -164,6 +181,22 @@ The key is active in your current session right away, no matter which option you
164
181
 
165
182
  ## Usage
166
183
 
184
+ ### Visual launcher (`relay-ai ui`)
185
+
186
+ ```bash
187
+ relay-ai ui
188
+ ```
189
+
190
+ Opens a browser-based dashboard on a random local port. From the UI you can:
191
+
192
+ - **Launch any supported tool** — app cards for Claude Code CLI, Codex CLI, Gemini CLI, Antigravity CLI, Antigravity App, Antigravity IDE, Claude Code Desktop, and the ChatGPT Desktop app (Codex mode). Select a provider and model in the card, then click **Launch** — a native terminal opens with the selection pre-wired. No second picker in the terminal.
193
+ - **Manage General Favorites** — the sidebar shows your saved favorite models with a slot indicator (Slots used X/20). Favorites launch through all supported agents.
194
+ - **Manage Antigravity Favorites** — separate favorites panel for Antigravity sessions.
195
+ - **Manage providers** — add providers from templates, delete providers, and refresh model lists inline, all without leaving the browser.
196
+ - **Run the Server tab** — configure and start the same gateway as `relay-ai server` (favorites-only or specific providers, discovery id masking, local/network listen mode) and see the resulting URLs, API key, and model catalog right in the browser. Runs in the same process as the UI, so it stops when you close the dashboard. See [Registry gateway (`relay-ai server`)](#registry-gateway-relay-ai-server) below for what each option does.
197
+
198
+ Press `Ctrl+C` in the terminal where `relay-ai ui` is running to shut down the dashboard server (this also stops the gateway if you started it from the Server tab).
199
+
167
200
  ### Launch Claude Code
168
201
 
169
202
  ```bash
@@ -249,12 +282,34 @@ The wizard asks:
249
282
 
250
283
  | Prompt | What it does |
251
284
  |--------|--------------|
252
- | **Configure & start** vs **Start with saved settings** | Full wizard or reuse saved server preferences |
285
+ | **Configure & start** vs **Start with saved settings** | Full wizard or one-step launch from saved server preferences |
253
286
  | **Exposed providers** | Limit which providers appear in the catalog (Zen, Go, Groq, OpenAI, etc.) |
254
287
  | **Mask gateway model ids for discovery?** | Recommended **Yes** for Claude Desktop — hides competitor vendor strings in model ids so discovery works |
255
288
  | **Expose only favorite models?** | Optional cap at your favorites (manage with `relay-ai models`) |
256
289
  | **Listen mode** | **Local only** (`127.0.0.1`) or **Network** (`0.0.0.0` + server password) |
257
290
 
291
+ The same options are available without a terminal in the [Server tab of `relay-ai ui`](#visual-launcher-relay-ai-ui), which also shows the resulting URLs, API key, and model catalog live.
292
+
293
+ After you configure the server once, start it without prompts:
294
+
295
+ ```bash
296
+ relay-ai server --quick
297
+ # same as:
298
+ relay-ai server --saved
299
+ ```
300
+
301
+ Any one-run server option also skips the wizard:
302
+
303
+ | Option | Meaning |
304
+ |--------|---------|
305
+ | `--listen local\|network` | Override the saved listen mode for this run |
306
+ | `--providers all\|favorites\|id1,id2` | Expose all providers, favorites only, or a comma-separated provider id list |
307
+ | `--free-only` / `--no-free-only` | Enable or disable the free/free-access model filter for this run |
308
+ | `--mask-gateway-ids` / `--no-mask-gateway-ids` | Enable or disable discovery id masking for this run |
309
+ | `--password <value>` | One-run password for network mode when you do not want to use a saved password |
310
+
311
+ Non-interactive shells (scripts, services, CI, pipes) use quick mode automatically. If quick mode resolves to network mode, relay-ai uses `--password` first, then a saved server password; without either it exits with a clear error instead of prompting.
312
+
258
313
  **Local mode** — point any Anthropic-compatible client at your machine:
259
314
 
260
315
  ```bash
@@ -269,7 +324,7 @@ export ANTHROPIC_BASE_URL="http://<server-ip>:17645/anthropic"
269
324
  export ANTHROPIC_API_KEY="<server-password>"
270
325
  ```
271
326
 
272
- By default the server password stays in memory only. If you choose to save it, relay-ai stores it in `~/.relay-ai/config.json`.
327
+ By default the server password stays in memory only. If you choose to save it, relay-ai stores it in the OS credential store when available, with `~/.relay-ai/config.json` as a fallback.
273
328
 
274
329
  OpenAI-format models also get an OpenAI-compatible endpoint:
275
330
 
@@ -319,6 +374,36 @@ export ANTHROPIC_API_KEY="anything"
319
374
  unset CLAUDE_CODE_USE_VERTEX ANTHROPIC_VERTEX_PROJECT_ID CLOUD_ML_REGION
320
375
  ```
321
376
 
377
+ ## Antigravity CLI, app, and IDE support
378
+
379
+ Relay AI can launch the Antigravity CLI, standalone Antigravity app, and Antigravity IDE through a local Cloud Code gateway. This lets Antigravity's native model picker show Relay models from your configured providers.
380
+
381
+ ```bash
382
+ relay-ai agy
383
+ relay-ai antigravity
384
+ relay-ai antigravity-ide
385
+ ```
386
+
387
+ > ⚠️ **Do not use your main Google account with Antigravity support.**
388
+ >
389
+ > Antigravity still requires Google authentication before it will run. Relay AI routes Cloud Code generation through your local gateway, but the Antigravity CLI, app, and IDE are still Google software and may contact Google for auth, telemetry, updates, or account checks.
390
+ >
391
+ > This kind of use is probably not what Google intended, may violate Google's terms of service, and could lead to account restrictions or bans. Use a throwaway Google account, a secondary account, or another account you can afford to lose. A free Google account should be enough for authentication. Seriously, don't risk your real Gmail, Workspace, YouTube, Drive, or business account for this.
392
+
393
+ Read the full setup and risk notes in **[docs/ANTIGRAVITY.md](docs/ANTIGRAVITY.md)** before launching any Antigravity surface.
394
+
395
+ ## OAuth Providers
396
+
397
+ relay-ai supports OAuth providers that use device-code sign-in, so you can connect an existing subscription without pasting an API key. See **[docs/SUBSCRIPTION-OAUTH.md](docs/SUBSCRIPTION-OAUTH.md)** for setup details.
398
+
399
+ Device code flows for existing subscriptions:
400
+
401
+ ```bash
402
+ relay-ai providers auth github-copilot # GitHub Copilot
403
+ relay-ai providers auth openai-oauth # ChatGPT Plus / Pro
404
+ relay-ai providers auth xai-oauth # xAI SuperGrok
405
+ ```
406
+
322
407
  ### Codex CLI (`relay-ai codex`)
323
408
 
324
409
  Launch [OpenAI Codex CLI](https://developers.openai.com/codex/cli) with registry providers. Requires `npm install -g @openai/codex`.
@@ -358,18 +443,22 @@ Full details: **[docs/CODEX.md](docs/CODEX.md)** — CLI + desktop app, configs,
358
443
 
359
444
  For agent / alef-agent integration (boot flags, NDJSON, JSONL): **[docs/AI-AGENTS.md](docs/AI-AGENTS.md)** and `relay-ai --ai`.
360
445
 
361
- ### Codex desktop app (`relay-ai codex-app`)
446
+ ### ChatGPT desktop app / Codex mode (`relay-ai codex-app`, alias `relay-ai chatgpt`)
447
+
448
+ > OpenAI merged the standalone Codex app into the ChatGPT desktop app on 2026-07-09 — it's now named "ChatGPT" on disk (bundle id and config format unchanged) and opens in Codex mode for existing Codex users. `relay-ai codex-app` and `relay-ai chatgpt` are the same command.
362
449
 
363
- Launch the **Codex app** (macOS or Windows) with registry providers:
450
+ Launch the **ChatGPT app in Codex mode** (macOS or Windows) with registry providers:
364
451
 
365
452
  ```bash
366
453
  relay-ai codex-app
367
454
  ```
368
455
 
369
- Patches `~/.codex/config.toml` with backup; **Ctrl+C** in the relay-ai terminal restores your config. The app keeps Codex's built-in `openai` provider active so existing conversation history remains visible, and routes the selected model through a foreground local proxy. Preview config without writing: `relay-ai codex-app --config`. Recovery: `relay-ai codex-app --restore`.
456
+ Patches `~/.codex/config.toml` with backup; **Ctrl+C** in the relay-ai terminal asks whether to close ChatGPT Desktop and restore your config (choose "No, keep session running" to decline and keep going). The app keeps Codex's built-in `openai` provider active so existing conversation history remains visible, and routes the selected model through a foreground local proxy. Preview config without writing: `relay-ai codex-app --config`. Recovery: `relay-ai codex-app --restore`.
370
457
 
371
458
  See **[docs/CODEX.md](docs/CODEX.md)** for CLI vs app differences, file ownership, and troubleshooting.
372
459
 
460
+ > **Known limitation — MCP tools (Context7, chrome-devtools, etc.) don't work with non-native models.** Codex wraps local `[mcp_servers.*]` tools in a proprietary, undocumented format that only Codex's own ChatGPT backend can dispatch. When routed through relay-ai (or *any* non-native model provider — this also affects Ollama, OpenRouter, LiteLLM, LM Studio identically), the model can see and call the tools, but Codex's own dispatcher rejects every call with `unsupported call: ...`. This is a confirmed, currently open upstream bug ([openai/codex#20652](https://github.com/openai/codex/issues/20652)) — there is no workaround on relay-ai's side. MCP tools work normally with Codex's native OpenAI/ChatGPT models. See the [MCP troubleshooting row in docs/CODEX.md](docs/CODEX.md#troubleshooting) for details.
461
+
373
462
  **Reasoning effort:** Capable models show Codex's native reasoning picker (low/medium/high, etc.). relay-ai maps your choice to each provider's SDK options and preserves existing `model_reasoning_effort` in Codex config. Claude Code `/effort` and the `relay-ai server` gateway use the same mapping — see the [reasoning section in docs/CODEX.md](docs/CODEX.md#reasoning-effort).
374
463
 
375
464
  ### Google Gemini CLI (`relay-ai gemini`)
@@ -485,9 +574,15 @@ The deprecated `OPENCODE_STARTER_HOME` env var still works as a fallback for `RE
485
574
 
486
575
  Private beta right now. Issues and PRs welcome on GitHub.
487
576
 
577
+ ## Support
578
+
579
+ If relay-ai saves you time or money, you can help cover the AI bills that go into building and testing it against every provider. Any support is hugely appreciated. 🙏
580
+
581
+ <a href="https://buymeacoffee.com/jacobbd"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" height="42"></a>
582
+
488
583
  ## Disclaimer
489
584
 
490
- This project and its creator have **no affiliation** with OpenCode, Anthropic, Claude, Google, or any other vendor named or integrated here. Trademarks belong to their respective owners.
585
+ This project and its creator have **no affiliation** with OpenCode, Anthropic, Claude, Google, GitHub, OpenAI, xAI, or any other vendor named or integrated here. Trademarks belong to their respective owners.
491
586
 
492
587
  relay-ai was built for **education and research**, and mostly for fun. It routes inference through services you configure yourself (OpenCode Zen/Go, OpenCode-configured providers, Vertex AI, and gateways you run locally). Use at your own risk.
493
588