ai-or-die
v0.1.36
Published
Universal AI coding terminal — Claude, Copilot, Gemini & more in your browser
Maintainers
Readme
npx ai-or-dieOne command. Opens your browser. Every AI coding assistant you have installed, ready to go.
Why ai-or-die?
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.
No config files. No Docker. No complex setup. Just npx ai-or-die and start coding.
Features
| Feature | Details |
|---|---|
| Multi-tool | Claude, Copilot, Gemini, Codex, Terminal — auto-detects what's installed |
| Multi-session | Tabbed browser sessions — run different tools in parallel |
| Real-time | xterm.js + WebSocket streaming with full 256-color terminal emulation |
| Secure by default | Auto-generated auth token embedded in URL — one click to open |
| Remote access | Dev Tunnels via --tunnel — auto-login, named tunnels per machine |
| Multi-device | Same session accessible from phone, tablet, or another machine |
| Persistent sessions | Sessions survive server restarts — output buffer saved to disk |
| Cross-platform | Windows (ConPTY) + Linux — tested in CI on both |
| PWA | Installable web app with offline-capable shell |
| Standalone binaries | Pre-built binaries for Linux x64 and Windows x64 — no Node.js required |
Quick Start
Via npx (recommended)
npx ai-or-dieRequires Node.js 22+. Opens http://localhost:7777 with a secure token in the URL.
Global install
npm install -g ai-or-die
ai-or-dieStandalone binary
Download from Releases — no Node.js needed.
| Platform | Binary |
|----------|--------|
| Linux x64 | ai-or-die-linux-x64 |
| Windows x64 | ai-or-die-windows-x64.exe |
Usage
# Default — opens browser with secure token
ai-or-die
# Custom port
ai-or-die --port 8080
# Explicit auth token
ai-or-die --auth my-secret-token
# Remote access via Dev Tunnel
ai-or-die --tunnel
# HTTPS
ai-or-die --https --cert cert.pem --key key.pem
# Development mode (verbose logging)
ai-or-die --dev
# Custom tool display names
ai-or-die --claude-alias "Sonnet" --gemini-alias "Gem"CLI Reference
| Flag | Description | Default |
|------|-------------|---------|
| -p, --port <number> | Server port | 7777 |
| --auth <token> | Set auth token | auto-generated |
| --disable-auth | Disable authentication | false |
| --tunnel | Enable Microsoft Dev Tunnel | false |
| --tunnel-allow-anonymous | Allow anonymous tunnel access | false |
| --https | Enable HTTPS | false |
| --cert <path> | SSL certificate file | |
| --key <path> | SSL private key file | |
| --dev | Verbose logging | false |
| --no-open | Don't auto-open browser | false |
| --plan <type> | Subscription plan (pro, max5, max20) | max20 |
Supported Tools
| Tool | Command | Install |
|------|---------|---------|
| Claude Code | claude | claude.ai/code |
| GitHub Copilot | copilot | github.com/features/copilot |
| Google Gemini | gemini | github.com/google-gemini/gemini-cli |
| OpenAI Codex | codex | openai.com/codex |
| Terminal | bash / PowerShell | Always available |
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.
Dev Tunnels
For secure remote access, ai-or-die integrates with Microsoft Dev Tunnels. Each machine gets a persistent named tunnel based on hostname.
# Install devtunnel CLI (one-time)
winget install Microsoft.devtunnel # Windows
curl -sL https://aka.ms/DevTunnelCliInstall | bash # Linux
# Start with tunnel (auto-login if needed)
ai-or-die --tunnelWhen --tunnel is active, auth is disabled — the tunnel itself controls access.
Architecture
Browser (xterm.js)
|
| WebSocket
v
Express Server ──> Session Store (~/.ai-or-die/sessions.json)
|
| node-pty
v
Claude / Copilot / Gemini / Codex / bash- Server (
src/server.js) — Express + WebSocket, session persistence, auth, rate limiting - Bridges (
src/*-bridge.js) — Spawn CLI processes via node-pty, output buffering - Client (
src/public/) — Vanilla JS + xterm.js, tabbed sessions, PWA - Tunnel (
src/tunnel-manager.js) — devtunnel lifecycle, auto-login, auto-restart
See docs/ for ADRs, specs, and architecture diagrams.
Development
git clone https://github.com/animeshkundu/ai-or-die.git
cd ai-or-die
npm install
npm run dev # start with verbose logging
npm test # run tests
npm run build:sea # build standalone binaryContributing
- Check ADRs before proposing architectural changes
- Update specs when changing component behavior
- Add tests for every feature and bug fix
- Use Conventional Commits (
feat:,fix:,docs:,test:,chore:)
License
MIT — Animesh Kundu
