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.
- package/.gitattributes +3 -3
- package/CHANGELOG.md +25 -25
- package/LICENSE +22 -22
- package/README.md +228 -228
- package/bin/ai-or-die.js +169 -169
- package/bin/supervisor.js +121 -121
- package/package.json +60 -60
- package/scripts/build-sea.js +209 -209
- package/scripts/download-model.js +27 -27
- package/scripts/pty-sea-shim.js +21 -21
- package/scripts/publish-both.sh +21 -21
- package/scripts/release-pr.sh +73 -73
- package/scripts/sherpa-onnx-sea-shim.js +63 -63
- package/scripts/smoke-test-binary.js +195 -195
- package/scripts/update-vendor.sh +6 -0
- package/scripts/validate.ps1 +25 -25
- package/scripts/validate.sh +16 -16
- package/sea-bootstrap.js +58 -58
- package/site/ADVANCED_ANALYTICS.md +173 -173
- package/site/docs.html +1021 -1021
- package/site/index.html +379 -379
- package/site/script.js +153 -153
- package/site/style.css +370 -370
- package/src/base-bridge.js +497 -497
- package/src/claude-bridge.js +48 -48
- package/src/codex-bridge.js +27 -27
- package/src/copilot-bridge.js +30 -30
- package/src/gemini-bridge.js +27 -27
- package/src/install-advisor.js +259 -259
- package/src/public/app-tunnel.js +402 -283
- package/src/public/app.js +4856 -4516
- package/src/public/auth.js +244 -244
- package/src/public/base.css +164 -164
- package/src/public/clipboard-handler.js +109 -119
- package/src/public/command-palette.js +406 -406
- package/src/public/components/banner-base.css +96 -0
- package/src/public/components/bottom-nav.css +66 -66
- package/src/public/components/buttons.css +270 -270
- package/src/public/components/cards.css +504 -504
- package/src/public/components/extra-keys.css +85 -85
- package/src/public/components/feedback.css +131 -0
- package/src/public/components/file-browser.css +592 -592
- package/src/public/components/input-overlay.css +168 -0
- package/src/public/components/menus.css +171 -171
- package/src/public/components/modals.css +822 -792
- package/src/public/components/notifications.css +85 -149
- package/src/public/components/tabs.css +659 -554
- package/src/public/components/terminal.css +280 -280
- package/src/public/components/voice-input.css +181 -181
- package/src/public/components/vscode-tunnel.css +333 -333
- package/src/public/extra-keys.js +238 -238
- package/src/public/feedback-manager.js +113 -0
- package/src/public/file-browser.js +1587 -1587
- package/src/public/file-editor.js +549 -549
- package/src/public/fonts.css +207 -207
- package/src/public/icon-generator.js +26 -26
- package/src/public/icons.js +55 -55
- package/src/public/image-handler.js +653 -653
- package/src/public/index.html +807 -753
- package/src/public/input-overlay.js +285 -0
- package/src/public/manifest.json +45 -45
- package/src/public/mobile.css +371 -371
- package/src/public/plan-detector.js +439 -218
- package/src/public/service-worker.js +159 -159
- package/src/public/session-manager.js +1391 -1458
- package/src/public/splits.js +704 -699
- package/src/public/style.css +207 -207
- package/src/public/tokens.css +386 -381
- package/src/public/vendor/marked.min.js +69 -0
- package/src/public/vendor/purify.min.js +3 -0
- package/src/public/voice-handler.js +862 -857
- package/src/public/voice-processor.js +20 -20
- package/src/public/vscode-tunnel.js +544 -422
- package/src/restart-manager.js +132 -132
- package/src/server.js +2750 -2648
- package/src/stt-engine.js +330 -330
- package/src/stt-worker.js +91 -91
- package/src/terminal-bridge.js +38 -38
- package/src/tunnel-manager.js +448 -448
- package/src/usage-analytics.js +493 -493
- package/src/usage-reader.js +894 -894
- package/src/utils/auth.js +141 -141
- package/src/utils/circular-buffer.js +80 -80
- package/src/utils/file-utils.js +219 -219
- package/src/utils/model-manager.js +274 -274
- package/src/utils/session-store.js +221 -218
- package/src/vscode-tunnel.js +1082 -1075
- package/.cursor/commands/commit-push.md +0 -18
- package/.github/agents/architect.md +0 -26
- package/.github/agents/engineer.md +0 -29
- package/.github/agents/qa-reviewer.md +0 -31
- package/.github/agents/researcher.md +0 -30
- package/.github/agents/troubleshooter.md +0 -33
- package/.github/copilot-instructions.md +0 -55
- package/.github/pull_request_template.md +0 -21
- package/.github/workflows/build-binaries.yml +0 -76
- package/.github/workflows/ci.yml +0 -589
- package/.github/workflows/pages.yml +0 -31
- package/.github/workflows/release-on-main.yml +0 -202
- package/.github/workflows/test-voice.yml +0 -99
- package/.prompts/log.md +0 -9
- package/AGENTS.md +0 -84
- package/CLAUDE.md +0 -142
- package/CONTRIBUTING.md +0 -76
- package/docs/.nojekyll +0 -1
- package/docs/README.md +0 -52
- package/docs/adrs/0000-template.md +0 -35
- package/docs/adrs/0001-bridge-base-class.md +0 -53
- package/docs/adrs/0002-devtunnels-over-ngrok.md +0 -56
- package/docs/adrs/0003-multi-tool-architecture.md +0 -71
- package/docs/adrs/0004-cross-platform-support.md +0 -101
- package/docs/adrs/0005-single-binary-distribution.md +0 -58
- package/docs/adrs/0006-test-driven-bug-fixes.md +0 -49
- package/docs/adrs/0007-design-token-system.md +0 -66
- package/docs/adrs/0008-e2e-parallelization.md +0 -65
- package/docs/adrs/0009-output-throttling.md +0 -67
- package/docs/adrs/0010-holistic-nerd-font-support.md +0 -30
- package/docs/adrs/0011-decouple-vscode-server-from-tunnel.md +0 -63
- package/docs/adrs/0012-file-browser-architecture.md +0 -82
- package/docs/adrs/0013-ws-io-optimizations.md +0 -77
- package/docs/agent-instructions/00-philosophy.md +0 -55
- package/docs/agent-instructions/01-research-and-web.md +0 -49
- package/docs/agent-instructions/02-testing-and-validation.md +0 -130
- package/docs/agent-instructions/03-tooling-and-pipelines.md +0 -58
- package/docs/agent-instructions/04-handoff-protocol.md +0 -63
- package/docs/agent-instructions/05-defensive-coding.md +0 -170
- package/docs/agent-instructions/06-ci-first-testing.md +0 -282
- package/docs/agent-instructions/07-docs-hygiene.md +0 -124
- package/docs/agent-instructions/08-multi-agent-consultation.md +0 -168
- package/docs/agent-instructions/09-copilot-agent-testing.md +0 -523
- package/docs/architecture/bridge-pattern.md +0 -510
- package/docs/architecture/overview.md +0 -216
- package/docs/architecture/websocket-protocol.md +0 -609
- package/docs/audits/SUMMARY.md +0 -151
- package/docs/history/README.md +0 -26
- package/docs/history/file-browser-bugs.md +0 -111
- package/docs/history/flaky-image-paste-test.md +0 -20
- package/docs/history/mobile-ux-overhaul-deferrals.md +0 -107
- package/docs/history/nerd-font-tofu-rendering.md +0 -32
- package/docs/history/voice-input-implementation.md +0 -62
- package/docs/planning/qol2-handoff.md +0 -119
- package/docs/specs/authentication.md +0 -167
- package/docs/specs/bridges.md +0 -217
- package/docs/specs/client-app.md +0 -615
- package/docs/specs/e2e-testing.md +0 -308
- package/docs/specs/file-browser.md +0 -557
- package/docs/specs/image-paste.md +0 -245
- package/docs/specs/install-advisor.md +0 -104
- package/docs/specs/notifications.md +0 -122
- package/docs/specs/server.md +0 -480
- package/docs/specs/session-store.md +0 -170
- package/docs/specs/usage-analytics.md +0 -342
- package/docs/specs/voice-input.md +0 -211
- package/docs/specs/vscode-tunnel.md +0 -408
- package/e2e/fixtures/fake-code.cmd +0 -20
- package/e2e/fixtures/fake-code.sh +0 -23
- package/e2e/fixtures/fake-devtunnel.cmd +0 -39
- package/e2e/fixtures/fake-devtunnel.sh +0 -43
- package/e2e/helpers/server-factory.js +0 -98
- package/e2e/helpers/terminal-helpers.js +0 -295
- package/e2e/playwright.config.js +0 -137
- package/poc/ws-perf/RESULTS.md +0 -76
- package/poc/ws-perf/benchmark.js +0 -288
- package/poc/ws-perf/circular-buffer.js +0 -50
- package/poc/ws-perf/heavy-output.ps1 +0 -60
- package/poc/ws-perf/heavy-output.sh +0 -59
- package/poc/ws-perf/latency-proxy.js +0 -139
- package/poc/ws-perf/package.json +0 -16
- package/poc/ws-perf/pty-worker.js +0 -55
- package/poc/ws-perf/run-all.js +0 -320
- package/poc/ws-perf/server.js +0 -585
- package/site/screenshots/app-after-terminal-click.png +0 -0
- package/site/screenshots/app-desktop-full.png +0 -0
- package/site/screenshots/app-main-interface.png +0 -0
- package/site/screenshots/app-mobile.png +0 -0
- 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> ·
|
|
19
|
-
<a href="https://www.npmjs.com/package/ai-or-die">npm</a> ·
|
|
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> ·
|
|
19
|
+
<a href="https://www.npmjs.com/package/ai-or-die">npm</a> ·
|
|
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
|