ai-or-die 0.1.47 → 0.1.49

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 (176) hide show
  1. package/.gitattributes +3 -3
  2. package/CHANGELOG.md +25 -25
  3. package/LICENSE +22 -22
  4. package/README.md +228 -228
  5. package/bin/ai-or-die.js +169 -169
  6. package/bin/supervisor.js +121 -121
  7. package/package.json +60 -60
  8. package/scripts/build-sea.js +209 -209
  9. package/scripts/download-model.js +27 -27
  10. package/scripts/pty-sea-shim.js +21 -21
  11. package/scripts/publish-both.sh +21 -21
  12. package/scripts/release-pr.sh +73 -73
  13. package/scripts/sherpa-onnx-sea-shim.js +63 -63
  14. package/scripts/smoke-test-binary.js +195 -195
  15. package/scripts/update-vendor.sh +6 -0
  16. package/scripts/validate.ps1 +25 -25
  17. package/scripts/validate.sh +16 -16
  18. package/sea-bootstrap.js +58 -58
  19. package/site/ADVANCED_ANALYTICS.md +173 -173
  20. package/site/docs.html +1021 -1021
  21. package/site/index.html +379 -379
  22. package/site/script.js +153 -153
  23. package/site/style.css +370 -370
  24. package/src/base-bridge.js +497 -497
  25. package/src/claude-bridge.js +48 -48
  26. package/src/codex-bridge.js +27 -27
  27. package/src/copilot-bridge.js +30 -30
  28. package/src/gemini-bridge.js +27 -27
  29. package/src/install-advisor.js +259 -259
  30. package/src/public/app-tunnel.js +402 -283
  31. package/src/public/app.js +4856 -4516
  32. package/src/public/auth.js +244 -244
  33. package/src/public/base.css +164 -164
  34. package/src/public/clipboard-handler.js +109 -119
  35. package/src/public/command-palette.js +406 -406
  36. package/src/public/components/banner-base.css +96 -0
  37. package/src/public/components/bottom-nav.css +66 -66
  38. package/src/public/components/buttons.css +270 -270
  39. package/src/public/components/cards.css +504 -504
  40. package/src/public/components/extra-keys.css +85 -85
  41. package/src/public/components/feedback.css +131 -0
  42. package/src/public/components/file-browser.css +592 -592
  43. package/src/public/components/input-overlay.css +168 -0
  44. package/src/public/components/menus.css +171 -171
  45. package/src/public/components/modals.css +822 -792
  46. package/src/public/components/notifications.css +85 -149
  47. package/src/public/components/tabs.css +659 -554
  48. package/src/public/components/terminal.css +280 -280
  49. package/src/public/components/voice-input.css +181 -181
  50. package/src/public/components/vscode-tunnel.css +333 -333
  51. package/src/public/extra-keys.js +238 -238
  52. package/src/public/feedback-manager.js +113 -0
  53. package/src/public/file-browser.js +1587 -1587
  54. package/src/public/file-editor.js +549 -549
  55. package/src/public/fonts.css +207 -207
  56. package/src/public/icon-generator.js +26 -26
  57. package/src/public/icons.js +55 -55
  58. package/src/public/image-handler.js +653 -653
  59. package/src/public/index.html +807 -753
  60. package/src/public/input-overlay.js +285 -0
  61. package/src/public/manifest.json +45 -45
  62. package/src/public/mobile.css +371 -371
  63. package/src/public/plan-detector.js +439 -218
  64. package/src/public/service-worker.js +159 -159
  65. package/src/public/session-manager.js +1391 -1458
  66. package/src/public/splits.js +704 -699
  67. package/src/public/style.css +207 -207
  68. package/src/public/tokens.css +386 -381
  69. package/src/public/vendor/marked.min.js +69 -0
  70. package/src/public/vendor/purify.min.js +3 -0
  71. package/src/public/voice-handler.js +862 -857
  72. package/src/public/voice-processor.js +20 -20
  73. package/src/public/vscode-tunnel.js +544 -422
  74. package/src/restart-manager.js +132 -132
  75. package/src/server.js +2750 -2648
  76. package/src/stt-engine.js +330 -330
  77. package/src/stt-worker.js +91 -91
  78. package/src/terminal-bridge.js +38 -38
  79. package/src/tunnel-manager.js +448 -448
  80. package/src/usage-analytics.js +493 -493
  81. package/src/usage-reader.js +894 -894
  82. package/src/utils/auth.js +141 -141
  83. package/src/utils/circular-buffer.js +80 -80
  84. package/src/utils/file-utils.js +219 -219
  85. package/src/utils/model-manager.js +274 -274
  86. package/src/utils/session-store.js +221 -218
  87. package/src/vscode-tunnel.js +1082 -1075
  88. package/.cursor/commands/commit-push.md +0 -18
  89. package/.github/agents/architect.md +0 -26
  90. package/.github/agents/engineer.md +0 -29
  91. package/.github/agents/qa-reviewer.md +0 -31
  92. package/.github/agents/researcher.md +0 -30
  93. package/.github/agents/troubleshooter.md +0 -33
  94. package/.github/copilot-instructions.md +0 -55
  95. package/.github/pull_request_template.md +0 -21
  96. package/.github/workflows/build-binaries.yml +0 -76
  97. package/.github/workflows/ci.yml +0 -589
  98. package/.github/workflows/pages.yml +0 -31
  99. package/.github/workflows/release-on-main.yml +0 -202
  100. package/.github/workflows/test-voice.yml +0 -99
  101. package/.prompts/log.md +0 -9
  102. package/AGENTS.md +0 -84
  103. package/CLAUDE.md +0 -142
  104. package/CONTRIBUTING.md +0 -76
  105. package/docs/.nojekyll +0 -1
  106. package/docs/README.md +0 -52
  107. package/docs/adrs/0000-template.md +0 -35
  108. package/docs/adrs/0001-bridge-base-class.md +0 -53
  109. package/docs/adrs/0002-devtunnels-over-ngrok.md +0 -56
  110. package/docs/adrs/0003-multi-tool-architecture.md +0 -71
  111. package/docs/adrs/0004-cross-platform-support.md +0 -101
  112. package/docs/adrs/0005-single-binary-distribution.md +0 -58
  113. package/docs/adrs/0006-test-driven-bug-fixes.md +0 -49
  114. package/docs/adrs/0007-design-token-system.md +0 -66
  115. package/docs/adrs/0008-e2e-parallelization.md +0 -65
  116. package/docs/adrs/0009-output-throttling.md +0 -67
  117. package/docs/adrs/0010-holistic-nerd-font-support.md +0 -30
  118. package/docs/adrs/0011-decouple-vscode-server-from-tunnel.md +0 -63
  119. package/docs/adrs/0012-file-browser-architecture.md +0 -82
  120. package/docs/adrs/0013-ws-io-optimizations.md +0 -77
  121. package/docs/agent-instructions/00-philosophy.md +0 -55
  122. package/docs/agent-instructions/01-research-and-web.md +0 -49
  123. package/docs/agent-instructions/02-testing-and-validation.md +0 -130
  124. package/docs/agent-instructions/03-tooling-and-pipelines.md +0 -58
  125. package/docs/agent-instructions/04-handoff-protocol.md +0 -63
  126. package/docs/agent-instructions/05-defensive-coding.md +0 -170
  127. package/docs/agent-instructions/06-ci-first-testing.md +0 -282
  128. package/docs/agent-instructions/07-docs-hygiene.md +0 -124
  129. package/docs/agent-instructions/08-multi-agent-consultation.md +0 -168
  130. package/docs/agent-instructions/09-copilot-agent-testing.md +0 -523
  131. package/docs/architecture/bridge-pattern.md +0 -510
  132. package/docs/architecture/overview.md +0 -216
  133. package/docs/architecture/websocket-protocol.md +0 -609
  134. package/docs/audits/SUMMARY.md +0 -151
  135. package/docs/history/README.md +0 -26
  136. package/docs/history/file-browser-bugs.md +0 -111
  137. package/docs/history/flaky-image-paste-test.md +0 -20
  138. package/docs/history/mobile-ux-overhaul-deferrals.md +0 -107
  139. package/docs/history/nerd-font-tofu-rendering.md +0 -32
  140. package/docs/history/voice-input-implementation.md +0 -62
  141. package/docs/planning/qol2-handoff.md +0 -119
  142. package/docs/specs/authentication.md +0 -167
  143. package/docs/specs/bridges.md +0 -217
  144. package/docs/specs/client-app.md +0 -615
  145. package/docs/specs/e2e-testing.md +0 -308
  146. package/docs/specs/file-browser.md +0 -557
  147. package/docs/specs/image-paste.md +0 -245
  148. package/docs/specs/install-advisor.md +0 -104
  149. package/docs/specs/notifications.md +0 -122
  150. package/docs/specs/server.md +0 -480
  151. package/docs/specs/session-store.md +0 -170
  152. package/docs/specs/usage-analytics.md +0 -342
  153. package/docs/specs/voice-input.md +0 -211
  154. package/docs/specs/vscode-tunnel.md +0 -408
  155. package/e2e/fixtures/fake-code.cmd +0 -20
  156. package/e2e/fixtures/fake-code.sh +0 -23
  157. package/e2e/fixtures/fake-devtunnel.cmd +0 -39
  158. package/e2e/fixtures/fake-devtunnel.sh +0 -43
  159. package/e2e/helpers/server-factory.js +0 -98
  160. package/e2e/helpers/terminal-helpers.js +0 -295
  161. package/e2e/playwright.config.js +0 -137
  162. package/poc/ws-perf/RESULTS.md +0 -76
  163. package/poc/ws-perf/benchmark.js +0 -288
  164. package/poc/ws-perf/circular-buffer.js +0 -50
  165. package/poc/ws-perf/heavy-output.ps1 +0 -60
  166. package/poc/ws-perf/heavy-output.sh +0 -59
  167. package/poc/ws-perf/latency-proxy.js +0 -139
  168. package/poc/ws-perf/package.json +0 -16
  169. package/poc/ws-perf/pty-worker.js +0 -55
  170. package/poc/ws-perf/run-all.js +0 -320
  171. package/poc/ws-perf/server.js +0 -585
  172. package/site/screenshots/app-after-terminal-click.png +0 -0
  173. package/site/screenshots/app-desktop-full.png +0 -0
  174. package/site/screenshots/app-main-interface.png +0 -0
  175. package/site/screenshots/app-mobile.png +0 -0
  176. package/site/screenshots/app-tools-view.png +0 -0
package/.gitattributes CHANGED
@@ -1,3 +1,3 @@
1
- # Force LF line endings for shell scripts (prevents CRLF corruption on Windows checkout)
2
- e2e/fixtures/fake-code.sh text eol=lf
3
- e2e/fixtures/fake-devtunnel.sh text eol=lf
1
+ # Force LF line endings for shell scripts (prevents CRLF corruption on Windows checkout)
2
+ e2e/fixtures/fake-code.sh text eol=lf
3
+ e2e/fixtures/fake-devtunnel.sh text eol=lf
package/CHANGELOG.md CHANGED
@@ -1,25 +1,25 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [0.1.0] - 2025-02-06
9
-
10
- ### Added
11
- - Multi-tool support: Claude, GitHub Copilot, Google Gemini, OpenAI Codex, and raw Terminal
12
- - BaseBridge architecture for cross-platform CLI tool management
13
- - Dynamic tool card UI — automatically detects installed tools
14
- - Microsoft Dev Tunnels integration for secure remote access
15
- - Real-time terminal streaming via xterm.js and WebSocket
16
- - Multi-session support with persistent tabs
17
- - Token-based authentication (auto-generated by default)
18
- - Session persistence across server restarts
19
- - Cross-platform support (Linux and Windows via ConPTY)
20
- - Progressive Web App (PWA) with installable manifest
21
- - Mobile-responsive design with touch-optimized controls
22
- - Comprehensive documentation in docs/ (architecture, specs, ADRs, agent instructions)
23
- - AI agent infrastructure with 5 specialized personas
24
- - CI/CD pipeline with cross-platform test matrix
25
- - Validation scripts for Linux and Windows
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2025-02-06
9
+
10
+ ### Added
11
+ - Multi-tool support: Claude, GitHub Copilot, Google Gemini, OpenAI Codex, and raw Terminal
12
+ - BaseBridge architecture for cross-platform CLI tool management
13
+ - Dynamic tool card UI — automatically detects installed tools
14
+ - Microsoft Dev Tunnels integration for secure remote access
15
+ - Real-time terminal streaming via xterm.js and WebSocket
16
+ - Multi-session support with persistent tabs
17
+ - Token-based authentication (auto-generated by default)
18
+ - Session persistence across server restarts
19
+ - Cross-platform support (Linux and Windows via ConPTY)
20
+ - Progressive Web App (PWA) with installable manifest
21
+ - Mobile-responsive design with touch-optimized controls
22
+ - Comprehensive documentation in docs/ (architecture, specs, ADRs, agent instructions)
23
+ - AI agent infrastructure with 5 specialized personas
24
+ - CI/CD pipeline with cross-platform test matrix
25
+ - Validation scripts for Linux and Windows
package/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 ai-or-die contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
22
-
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ai-or-die contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md CHANGED
@@ -1,228 +1,228 @@
1
- <p align="center">
2
- <h1 align="center">ai-or-die</h1>
3
- <p align="center">
4
- Universal AI coding terminal — Claude, Copilot, Gemini, Codex & raw terminal in one browser UI.
5
- </p>
6
- </p>
7
-
8
- <p align="center">
9
- <a href="https://github.com/animeshkundu/ai-or-die/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/animeshkundu/ai-or-die/ci.yml?branch=main&label=CI&style=flat-square" alt="CI"></a>
10
- <a href="https://www.npmjs.com/package/ai-or-die"><img src="https://img.shields.io/npm/v/ai-or-die?style=flat-square&color=cb3837" alt="npm version"></a>
11
- <a href="https://www.npmjs.com/package/ai-or-die"><img src="https://img.shields.io/npm/dm/ai-or-die?style=flat-square" alt="npm downloads"></a>
12
- <a href="https://github.com/animeshkundu/ai-or-die/blob/main/LICENSE"><img src="https://img.shields.io/github/license/animeshkundu/ai-or-die?style=flat-square" alt="License"></a>
13
- <img src="https://img.shields.io/node/v/ai-or-die?style=flat-square" alt="Node.js version">
14
- <a href="https://github.com/animeshkundu/ai-or-die/stargazers"><img src="https://img.shields.io/github/stars/animeshkundu/ai-or-die?style=flat-square" alt="GitHub stars"></a>
15
- </p>
16
-
17
- <p align="center">
18
- <a href="https://animesh.kundus.in/ai-or-die/">Website</a> &middot;
19
- <a href="https://www.npmjs.com/package/ai-or-die">npm</a> &middot;
20
- <a href="https://github.com/animeshkundu/ai-or-die/releases">Releases</a>
21
- </p>
22
-
23
- ---
24
-
25
- ```bash
26
- npx ai-or-die
27
- ```
28
-
29
- One command. Opens your browser. Every AI coding assistant you have installed, ready to go.
30
-
31
- ---
32
-
33
- ## Why ai-or-die?
34
-
35
- You have Claude Code, GitHub Copilot CLI, Gemini CLI, and OpenAI Codex all installed — but you can only use one terminal at a time. **ai-or-die** gives you a single browser-based workspace where you can run them all, side by side, in tabbed sessions with full terminal emulation.
36
-
37
- No config files. No Docker. No complex setup. Just `npx ai-or-die` and start coding.
38
-
39
- ## Features
40
-
41
- | Feature | Details |
42
- |---|---|
43
- | **Multi-tool** | Claude, Copilot, Gemini, Codex, Terminal — auto-detects what's installed |
44
- | **Multi-session** | Tabbed browser sessions — run different tools in parallel |
45
- | **Real-time** | xterm.js + WebSocket streaming with full 256-color terminal emulation |
46
- | **Secure by default** | Auto-generated auth token embedded in URL — one click to open |
47
- | **Remote access** | Dev Tunnels via `--tunnel` — auto-login, named tunnels per machine |
48
- | **Multi-device** | Same session accessible from phone, tablet, or another machine |
49
- | **Persistent sessions** | Sessions survive server restarts — output buffer saved to disk |
50
- | **Cross-platform** | Windows (ConPTY) + Linux — tested in CI on both |
51
- | **PWA** | Installable web app with offline-capable shell |
52
- | **Standalone binaries** | Pre-built binaries for Linux x64 and Windows x64 — no Node.js required |
53
- | **Voice input** | Speak instead of type — cloud (Chrome/Edge) or local (private, offline) |
54
-
55
- ## Voice Input
56
-
57
- Speak instead of type. Voice input supports two modes:
58
-
59
- - **Cloud mode** (Chrome/Edge) — uses the browser's built-in speech recognition. Instant, zero download. Always available on Chromium browsers.
60
- - **Local mode** (`--stt` flag) — runs Parakeet V3 speech-to-text on your machine via sherpa-onnx. Fully private, works offline.
61
-
62
- ### Enabling Local Mode
63
-
64
- ```bash
65
- ai-or-die --stt
66
- ```
67
-
68
- On first use, the ~670MB model downloads automatically (cached at `~/.ai-or-die/models/`). The app remains fully usable during download.
69
-
70
- ### Usage
71
-
72
- - Click the **mic button** in the toolbar, or press **Ctrl+Shift+M** to start/stop recording.
73
- - **Hold** Ctrl+Shift+M for push-to-talk (release to transcribe).
74
- - Press **Escape** to cancel a recording.
75
- - Transcribed text appears in the terminal input — review, edit, then press Enter.
76
-
77
- ### Configuration
78
-
79
- | Flag | Description |
80
- |------|-------------|
81
- | `--stt` | Enable local speech-to-text |
82
- | `--stt-endpoint <url>` | Use an external OpenAI-compatible STT endpoint |
83
- | `--stt-model-dir <path>` | Custom model storage directory |
84
- | `--stt-threads <number>` | CPU threads for inference (default: auto, max 4) |
85
-
86
- ## Quick Start
87
-
88
- ### Via npx (recommended)
89
-
90
- ```bash
91
- npx ai-or-die
92
- ```
93
-
94
- Requires **Node.js 22+**. Opens `http://localhost:7777` with a secure token in the URL.
95
-
96
- ### Global install
97
-
98
- ```bash
99
- npm install -g ai-or-die
100
- ai-or-die
101
- ```
102
-
103
- ### Standalone binary
104
-
105
- Download from [Releases](https://github.com/animeshkundu/ai-or-die/releases) — no Node.js needed.
106
-
107
- | Platform | Binary |
108
- |----------|--------|
109
- | Linux x64 | `ai-or-die-linux-x64` |
110
- | Windows x64 | `ai-or-die-windows-x64.exe` |
111
-
112
- ## Usage
113
-
114
- ```bash
115
- # Default — opens browser with secure token
116
- ai-or-die
117
-
118
- # Custom port
119
- ai-or-die --port 8080
120
-
121
- # Explicit auth token
122
- ai-or-die --auth my-secret-token
123
-
124
- # Remote access via Dev Tunnel
125
- ai-or-die --tunnel
126
-
127
- # HTTPS
128
- ai-or-die --https --cert cert.pem --key key.pem
129
-
130
- # Development mode (verbose logging)
131
- ai-or-die --dev
132
-
133
- # Custom tool display names
134
- ai-or-die --claude-alias "Sonnet" --gemini-alias "Gem"
135
-
136
- # Enable local voice-to-text (private, offline)
137
- ai-or-die --stt
138
- ```
139
-
140
- ## CLI Reference
141
-
142
- | Flag | Description | Default |
143
- |------|-------------|---------|
144
- | `-p, --port <number>` | Server port | `7777` |
145
- | `--auth <token>` | Set auth token | auto-generated |
146
- | `--disable-auth` | Disable authentication | `false` |
147
- | `--tunnel` | Enable Microsoft Dev Tunnel | `false` |
148
- | `--tunnel-allow-anonymous` | Allow anonymous tunnel access | `false` |
149
- | `--https` | Enable HTTPS | `false` |
150
- | `--cert <path>` | SSL certificate file | |
151
- | `--key <path>` | SSL private key file | |
152
- | `--dev` | Verbose logging | `false` |
153
- | `--no-open` | Don't auto-open browser | `false` |
154
- | `--plan <type>` | Subscription plan (`pro`, `max5`, `max20`) | `max20` |
155
- | `--stt` | Enable local speech-to-text | `false` |
156
- | `--stt-endpoint <url>` | External STT endpoint (OpenAI-compatible) | |
157
- | `--stt-model-dir <path>` | Custom model directory | `~/.ai-or-die/models/` |
158
- | `--stt-threads <number>` | CPU threads for STT inference | auto (max 4) |
159
-
160
- ## Supported Tools
161
-
162
- | Tool | Command | Install |
163
- |------|---------|---------|
164
- | Claude Code | `claude` | [claude.ai/code](https://claude.ai/code) |
165
- | GitHub Copilot | `copilot` | [github.com/features/copilot](https://github.com/features/copilot) |
166
- | Google Gemini | `gemini` | [github.com/google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli) |
167
- | OpenAI Codex | `codex` | [openai.com/codex](https://openai.com/codex) |
168
- | Terminal | bash / PowerShell | Always available |
169
-
170
- Tools that aren't installed appear as disabled in the UI. Install any of them at any time — ai-or-die detects them on startup.
171
-
172
- ## Dev Tunnels
173
-
174
- For secure remote access, ai-or-die integrates with [Microsoft Dev Tunnels](https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/). Each machine gets a persistent named tunnel based on hostname.
175
-
176
- ```bash
177
- # Install devtunnel CLI (one-time)
178
- winget install Microsoft.devtunnel # Windows
179
- curl -sL https://aka.ms/DevTunnelCliInstall | bash # Linux
180
-
181
- # Start with tunnel (auto-login if needed)
182
- ai-or-die --tunnel
183
- ```
184
-
185
- When `--tunnel` is active, auth is disabled — the tunnel itself controls access.
186
-
187
- ## Architecture
188
-
189
- ```
190
- Browser (xterm.js)
191
- |
192
- | WebSocket
193
- v
194
- Express Server ──> Session Store (~/.ai-or-die/sessions.json)
195
- |
196
- | node-pty
197
- v
198
- Claude / Copilot / Gemini / Codex / bash
199
- ```
200
-
201
- - **Server** (`src/server.js`) — Express + WebSocket, session persistence, auth, rate limiting
202
- - **Bridges** (`src/*-bridge.js`) — Spawn CLI processes via node-pty, output buffering
203
- - **Client** (`src/public/`) — Vanilla JS + xterm.js, tabbed sessions, PWA
204
- - **Tunnel** (`src/tunnel-manager.js`) — devtunnel lifecycle, auto-login, auto-restart
205
-
206
- See [docs/](docs/) for [ADRs](docs/adrs/), [specs](docs/specs/), and [architecture diagrams](docs/architecture/).
207
-
208
- ## Development
209
-
210
- ```bash
211
- git clone https://github.com/animeshkundu/ai-or-die.git
212
- cd ai-or-die
213
- npm install
214
- npm run dev # start with verbose logging
215
- npm test # run tests
216
- npm run build:sea # build standalone binary
217
- ```
218
-
219
- ## Contributing
220
-
221
- 1. Check [ADRs](docs/adrs/) before proposing architectural changes
222
- 2. Update [specs](docs/specs/) when changing component behavior
223
- 3. Add tests for every feature and bug fix
224
- 4. Use [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:`, `test:`, `chore:`)
225
-
226
- ## License
227
-
228
- [MIT](LICENSE) — Animesh Kundu
1
+ <p align="center">
2
+ <h1 align="center">ai-or-die</h1>
3
+ <p align="center">
4
+ Universal AI coding terminal — Claude, Copilot, Gemini, Codex & raw terminal in one browser UI.
5
+ </p>
6
+ </p>
7
+
8
+ <p align="center">
9
+ <a href="https://github.com/animeshkundu/ai-or-die/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/animeshkundu/ai-or-die/ci.yml?branch=main&label=CI&style=flat-square" alt="CI"></a>
10
+ <a href="https://www.npmjs.com/package/ai-or-die"><img src="https://img.shields.io/npm/v/ai-or-die?style=flat-square&color=cb3837" alt="npm version"></a>
11
+ <a href="https://www.npmjs.com/package/ai-or-die"><img src="https://img.shields.io/npm/dm/ai-or-die?style=flat-square" alt="npm downloads"></a>
12
+ <a href="https://github.com/animeshkundu/ai-or-die/blob/main/LICENSE"><img src="https://img.shields.io/github/license/animeshkundu/ai-or-die?style=flat-square" alt="License"></a>
13
+ <img src="https://img.shields.io/node/v/ai-or-die?style=flat-square" alt="Node.js version">
14
+ <a href="https://github.com/animeshkundu/ai-or-die/stargazers"><img src="https://img.shields.io/github/stars/animeshkundu/ai-or-die?style=flat-square" alt="GitHub stars"></a>
15
+ </p>
16
+
17
+ <p align="center">
18
+ <a href="https://animesh.kundus.in/ai-or-die/">Website</a> &middot;
19
+ <a href="https://www.npmjs.com/package/ai-or-die">npm</a> &middot;
20
+ <a href="https://github.com/animeshkundu/ai-or-die/releases">Releases</a>
21
+ </p>
22
+
23
+ ---
24
+
25
+ ```bash
26
+ npx ai-or-die
27
+ ```
28
+
29
+ One command. Opens your browser. Every AI coding assistant you have installed, ready to go.
30
+
31
+ ---
32
+
33
+ ## Why ai-or-die?
34
+
35
+ You have Claude Code, GitHub Copilot CLI, Gemini CLI, and OpenAI Codex all installed — but you can only use one terminal at a time. **ai-or-die** gives you a single browser-based workspace where you can run them all, side by side, in tabbed sessions with full terminal emulation.
36
+
37
+ No config files. No Docker. No complex setup. Just `npx ai-or-die` and start coding.
38
+
39
+ ## Features
40
+
41
+ | Feature | Details |
42
+ |---|---|
43
+ | **Multi-tool** | Claude, Copilot, Gemini, Codex, Terminal — auto-detects what's installed |
44
+ | **Multi-session** | Tabbed browser sessions — run different tools in parallel |
45
+ | **Real-time** | xterm.js + WebSocket streaming with full 256-color terminal emulation |
46
+ | **Secure by default** | Auto-generated auth token embedded in URL — one click to open |
47
+ | **Remote access** | Dev Tunnels via `--tunnel` — auto-login, named tunnels per machine |
48
+ | **Multi-device** | Same session accessible from phone, tablet, or another machine |
49
+ | **Persistent sessions** | Sessions survive server restarts — output buffer saved to disk |
50
+ | **Cross-platform** | Windows (ConPTY) + Linux — tested in CI on both |
51
+ | **PWA** | Installable web app with offline-capable shell |
52
+ | **Standalone binaries** | Pre-built binaries for Linux x64 and Windows x64 — no Node.js required |
53
+ | **Voice input** | Speak instead of type — cloud (Chrome/Edge) or local (private, offline) |
54
+
55
+ ## Voice Input
56
+
57
+ Speak instead of type. Voice input supports two modes:
58
+
59
+ - **Cloud mode** (Chrome/Edge) — uses the browser's built-in speech recognition. Instant, zero download. Always available on Chromium browsers.
60
+ - **Local mode** (`--stt` flag) — runs Parakeet V3 speech-to-text on your machine via sherpa-onnx. Fully private, works offline.
61
+
62
+ ### Enabling Local Mode
63
+
64
+ ```bash
65
+ ai-or-die --stt
66
+ ```
67
+
68
+ On first use, the ~670MB model downloads automatically (cached at `~/.ai-or-die/models/`). The app remains fully usable during download.
69
+
70
+ ### Usage
71
+
72
+ - Click the **mic button** in the toolbar, or press **Ctrl+Shift+M** to start/stop recording.
73
+ - **Hold** Ctrl+Shift+M for push-to-talk (release to transcribe).
74
+ - Press **Escape** to cancel a recording.
75
+ - Transcribed text appears in the terminal input — review, edit, then press Enter.
76
+
77
+ ### Configuration
78
+
79
+ | Flag | Description |
80
+ |------|-------------|
81
+ | `--stt` | Enable local speech-to-text |
82
+ | `--stt-endpoint <url>` | Use an external OpenAI-compatible STT endpoint |
83
+ | `--stt-model-dir <path>` | Custom model storage directory |
84
+ | `--stt-threads <number>` | CPU threads for inference (default: auto, max 4) |
85
+
86
+ ## Quick Start
87
+
88
+ ### Via npx (recommended)
89
+
90
+ ```bash
91
+ npx ai-or-die
92
+ ```
93
+
94
+ Requires **Node.js 22+**. Opens `http://localhost:7777` with a secure token in the URL.
95
+
96
+ ### Global install
97
+
98
+ ```bash
99
+ npm install -g ai-or-die
100
+ ai-or-die
101
+ ```
102
+
103
+ ### Standalone binary
104
+
105
+ Download from [Releases](https://github.com/animeshkundu/ai-or-die/releases) — no Node.js needed.
106
+
107
+ | Platform | Binary |
108
+ |----------|--------|
109
+ | Linux x64 | `ai-or-die-linux-x64` |
110
+ | Windows x64 | `ai-or-die-windows-x64.exe` |
111
+
112
+ ## Usage
113
+
114
+ ```bash
115
+ # Default — opens browser with secure token
116
+ ai-or-die
117
+
118
+ # Custom port
119
+ ai-or-die --port 8080
120
+
121
+ # Explicit auth token
122
+ ai-or-die --auth my-secret-token
123
+
124
+ # Remote access via Dev Tunnel
125
+ ai-or-die --tunnel
126
+
127
+ # HTTPS
128
+ ai-or-die --https --cert cert.pem --key key.pem
129
+
130
+ # Development mode (verbose logging)
131
+ ai-or-die --dev
132
+
133
+ # Custom tool display names
134
+ ai-or-die --claude-alias "Sonnet" --gemini-alias "Gem"
135
+
136
+ # Enable local voice-to-text (private, offline)
137
+ ai-or-die --stt
138
+ ```
139
+
140
+ ## CLI Reference
141
+
142
+ | Flag | Description | Default |
143
+ |------|-------------|---------|
144
+ | `-p, --port <number>` | Server port | `7777` |
145
+ | `--auth <token>` | Set auth token | auto-generated |
146
+ | `--disable-auth` | Disable authentication | `false` |
147
+ | `--tunnel` | Enable Microsoft Dev Tunnel | `false` |
148
+ | `--tunnel-allow-anonymous` | Allow anonymous tunnel access | `false` |
149
+ | `--https` | Enable HTTPS | `false` |
150
+ | `--cert <path>` | SSL certificate file | |
151
+ | `--key <path>` | SSL private key file | |
152
+ | `--dev` | Verbose logging | `false` |
153
+ | `--no-open` | Don't auto-open browser | `false` |
154
+ | `--plan <type>` | Subscription plan (`pro`, `max5`, `max20`) | `max20` |
155
+ | `--stt` | Enable local speech-to-text | `false` |
156
+ | `--stt-endpoint <url>` | External STT endpoint (OpenAI-compatible) | |
157
+ | `--stt-model-dir <path>` | Custom model directory | `~/.ai-or-die/models/` |
158
+ | `--stt-threads <number>` | CPU threads for STT inference | auto (max 4) |
159
+
160
+ ## Supported Tools
161
+
162
+ | Tool | Command | Install |
163
+ |------|---------|---------|
164
+ | Claude Code | `claude` | [claude.ai/code](https://claude.ai/code) |
165
+ | GitHub Copilot | `copilot` | [github.com/features/copilot](https://github.com/features/copilot) |
166
+ | Google Gemini | `gemini` | [github.com/google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli) |
167
+ | OpenAI Codex | `codex` | [openai.com/codex](https://openai.com/codex) |
168
+ | Terminal | bash / PowerShell | Always available |
169
+
170
+ Tools that aren't installed appear as disabled in the UI. Install any of them at any time — ai-or-die detects them on startup.
171
+
172
+ ## Dev Tunnels
173
+
174
+ For secure remote access, ai-or-die integrates with [Microsoft Dev Tunnels](https://learn.microsoft.com/en-us/azure/developer/dev-tunnels/). Each machine gets a persistent named tunnel based on hostname.
175
+
176
+ ```bash
177
+ # Install devtunnel CLI (one-time)
178
+ winget install Microsoft.devtunnel # Windows
179
+ curl -sL https://aka.ms/DevTunnelCliInstall | bash # Linux
180
+
181
+ # Start with tunnel (auto-login if needed)
182
+ ai-or-die --tunnel
183
+ ```
184
+
185
+ When `--tunnel` is active, auth is disabled — the tunnel itself controls access.
186
+
187
+ ## Architecture
188
+
189
+ ```
190
+ Browser (xterm.js)
191
+ |
192
+ | WebSocket
193
+ v
194
+ Express Server ──> Session Store (~/.ai-or-die/sessions.json)
195
+ |
196
+ | node-pty
197
+ v
198
+ Claude / Copilot / Gemini / Codex / bash
199
+ ```
200
+
201
+ - **Server** (`src/server.js`) — Express + WebSocket, session persistence, auth, rate limiting
202
+ - **Bridges** (`src/*-bridge.js`) — Spawn CLI processes via node-pty, output buffering
203
+ - **Client** (`src/public/`) — Vanilla JS + xterm.js, tabbed sessions, PWA
204
+ - **Tunnel** (`src/tunnel-manager.js`) — devtunnel lifecycle, auto-login, auto-restart
205
+
206
+ See [docs/](docs/) for [ADRs](docs/adrs/), [specs](docs/specs/), and [architecture diagrams](docs/architecture/).
207
+
208
+ ## Development
209
+
210
+ ```bash
211
+ git clone https://github.com/animeshkundu/ai-or-die.git
212
+ cd ai-or-die
213
+ npm install
214
+ npm run dev # start with verbose logging
215
+ npm test # run tests
216
+ npm run build:sea # build standalone binary
217
+ ```
218
+
219
+ ## Contributing
220
+
221
+ 1. Check [ADRs](docs/adrs/) before proposing architectural changes
222
+ 2. Update [specs](docs/specs/) when changing component behavior
223
+ 3. Add tests for every feature and bug fix
224
+ 4. Use [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:`, `test:`, `chore:`)
225
+
226
+ ## License
227
+
228
+ [MIT](LICENSE) — Animesh Kundu