ai-or-die 0.1.7 → 0.1.8
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/.github/workflows/release-on-main.yml +77 -4
- package/README.md +127 -103
- package/package.json +1 -1
|
@@ -11,19 +11,22 @@ concurrency:
|
|
|
11
11
|
jobs:
|
|
12
12
|
release:
|
|
13
13
|
name: Tag, Release, and Publish
|
|
14
|
-
# Skip if the push was an automated version bump
|
|
15
14
|
if: "!startsWith(github.event.head_commit.message, 'chore: bump version')"
|
|
16
15
|
runs-on: ubuntu-latest
|
|
17
16
|
permissions:
|
|
18
17
|
contents: write
|
|
18
|
+
packages: write
|
|
19
19
|
id-token: write
|
|
20
|
+
outputs:
|
|
21
|
+
version: ${{ steps.version.outputs.version }}
|
|
22
|
+
released: ${{ steps.version.outputs.released }}
|
|
20
23
|
steps:
|
|
21
24
|
- name: Checkout
|
|
22
25
|
uses: actions/checkout@v4
|
|
23
26
|
with:
|
|
24
27
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
25
28
|
|
|
26
|
-
- name: Setup Node.js
|
|
29
|
+
- name: Setup Node.js (npm registry)
|
|
27
30
|
uses: actions/setup-node@v4
|
|
28
31
|
with:
|
|
29
32
|
node-version: '22'
|
|
@@ -54,11 +57,10 @@ jobs:
|
|
|
54
57
|
git commit -m "chore: bump version to ${NEW}"
|
|
55
58
|
git push
|
|
56
59
|
echo "version=${NEW}" >> $GITHUB_OUTPUT
|
|
57
|
-
echo "bumped=true" >> $GITHUB_OUTPUT
|
|
58
60
|
else
|
|
59
61
|
echo "version=${CURRENT}" >> $GITHUB_OUTPUT
|
|
60
|
-
echo "bumped=false" >> $GITHUB_OUTPUT
|
|
61
62
|
fi
|
|
63
|
+
echo "released=true" >> $GITHUB_OUTPUT
|
|
62
64
|
|
|
63
65
|
- name: Create GitHub Release
|
|
64
66
|
uses: softprops/action-gh-release@v2
|
|
@@ -78,3 +80,74 @@ jobs:
|
|
|
78
80
|
run: npm publish --access public --provenance
|
|
79
81
|
env:
|
|
80
82
|
NODE_AUTH_TOKEN: ""
|
|
83
|
+
|
|
84
|
+
- name: Publish to GitHub Packages
|
|
85
|
+
run: |
|
|
86
|
+
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
|
|
87
|
+
echo "@animeshkundu:registry=https://npm.pkg.github.com" >> ~/.npmrc
|
|
88
|
+
# Temporarily scope the package for GitHub Packages
|
|
89
|
+
node -e "
|
|
90
|
+
const pkg = require('./package.json');
|
|
91
|
+
pkg.name = '@animeshkundu/ai-or-die';
|
|
92
|
+
require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
|
|
93
|
+
"
|
|
94
|
+
npm publish --access public
|
|
95
|
+
# Restore original package.json
|
|
96
|
+
git checkout -- package.json
|
|
97
|
+
|
|
98
|
+
build-binaries:
|
|
99
|
+
name: Build ${{ matrix.artifact }}
|
|
100
|
+
needs: release
|
|
101
|
+
if: needs.release.outputs.released == 'true'
|
|
102
|
+
runs-on: ${{ matrix.os }}
|
|
103
|
+
permissions:
|
|
104
|
+
contents: write
|
|
105
|
+
strategy:
|
|
106
|
+
matrix:
|
|
107
|
+
include:
|
|
108
|
+
- os: ubuntu-latest
|
|
109
|
+
platform: linux
|
|
110
|
+
artifact: ai-or-die-linux-x64
|
|
111
|
+
- os: windows-latest
|
|
112
|
+
platform: win32
|
|
113
|
+
artifact: ai-or-die-windows-x64.exe
|
|
114
|
+
steps:
|
|
115
|
+
- uses: actions/checkout@v4
|
|
116
|
+
with:
|
|
117
|
+
ref: v${{ needs.release.outputs.version }}
|
|
118
|
+
|
|
119
|
+
- uses: actions/setup-node@v4
|
|
120
|
+
with:
|
|
121
|
+
node-version: '22'
|
|
122
|
+
|
|
123
|
+
- run: npm ci
|
|
124
|
+
|
|
125
|
+
- name: Build SEA binary
|
|
126
|
+
run: node scripts/build-sea.js
|
|
127
|
+
|
|
128
|
+
- name: Rename artifact
|
|
129
|
+
shell: bash
|
|
130
|
+
run: |
|
|
131
|
+
if [ "${{ matrix.platform }}" = "win32" ]; then
|
|
132
|
+
mv dist/ai-or-die.exe "dist/${{ matrix.artifact }}"
|
|
133
|
+
else
|
|
134
|
+
mv dist/ai-or-die "dist/${{ matrix.artifact }}"
|
|
135
|
+
chmod +x "dist/${{ matrix.artifact }}"
|
|
136
|
+
fi
|
|
137
|
+
|
|
138
|
+
- name: Smoke test
|
|
139
|
+
shell: bash
|
|
140
|
+
run: |
|
|
141
|
+
if [ "${{ matrix.platform }}" = "win32" ]; then
|
|
142
|
+
./dist/${{ matrix.artifact }} --help || true
|
|
143
|
+
else
|
|
144
|
+
./dist/${{ matrix.artifact }} --help || true
|
|
145
|
+
fi
|
|
146
|
+
|
|
147
|
+
- name: Upload to GitHub Release
|
|
148
|
+
uses: softprops/action-gh-release@v2
|
|
149
|
+
with:
|
|
150
|
+
tag_name: v${{ needs.release.outputs.version }}
|
|
151
|
+
files: dist/${{ matrix.artifact }}
|
|
152
|
+
env:
|
|
153
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/README.md
CHANGED
|
@@ -1,165 +1,189 @@
|
|
|
1
|
-
|
|
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
|
+
---
|
|
2
24
|
|
|
3
|
-
|
|
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
|
+
---
|
|
4
32
|
|
|
5
|
-
ai-or-die
|
|
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.
|
|
6
38
|
|
|
7
39
|
## Features
|
|
8
40
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Requirements
|
|
22
|
-
|
|
23
|
-
- Node.js >= 22
|
|
24
|
-
- At least one supported CLI tool installed:
|
|
25
|
-
- [Claude Code](https://claude.ai/code) — `claude`
|
|
26
|
-
- [GitHub Copilot CLI](https://github.com/features/copilot/cli) — `copilot`
|
|
27
|
-
- [Google Gemini CLI](https://github.com/google-gemini/gemini-cli) — `gemini`
|
|
28
|
-
- [OpenAI Codex](https://openai.com/codex) — `codex`
|
|
29
|
-
- Terminal is always available (bash/PowerShell)
|
|
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 |
|
|
30
53
|
|
|
31
54
|
## Quick Start
|
|
32
55
|
|
|
56
|
+
### Via npx (recommended)
|
|
57
|
+
|
|
33
58
|
```bash
|
|
34
|
-
# Run without installing
|
|
35
59
|
npx ai-or-die
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Requires **Node.js 22+**. Opens `http://localhost:7777` with a secure token in the URL.
|
|
36
63
|
|
|
37
|
-
|
|
64
|
+
### Global install
|
|
65
|
+
|
|
66
|
+
```bash
|
|
38
67
|
npm install -g ai-or-die
|
|
39
68
|
ai-or-die
|
|
40
69
|
```
|
|
41
70
|
|
|
71
|
+
### Standalone binary
|
|
72
|
+
|
|
73
|
+
Download from [Releases](https://github.com/animeshkundu/ai-or-die/releases) — no Node.js needed.
|
|
74
|
+
|
|
75
|
+
| Platform | Binary |
|
|
76
|
+
|----------|--------|
|
|
77
|
+
| Linux x64 | `ai-or-die-linux-x64` |
|
|
78
|
+
| Windows x64 | `ai-or-die-windows-x64.exe` |
|
|
79
|
+
|
|
42
80
|
## Usage
|
|
43
81
|
|
|
44
82
|
```bash
|
|
45
|
-
#
|
|
83
|
+
# Default — opens browser with secure token
|
|
46
84
|
ai-or-die
|
|
47
85
|
|
|
48
86
|
# Custom port
|
|
49
87
|
ai-or-die --port 8080
|
|
50
88
|
|
|
51
|
-
#
|
|
52
|
-
ai-or-die --auth
|
|
89
|
+
# Explicit auth token
|
|
90
|
+
ai-or-die --auth my-secret-token
|
|
53
91
|
|
|
54
|
-
#
|
|
55
|
-
ai-or-die --
|
|
92
|
+
# Remote access via Dev Tunnel
|
|
93
|
+
ai-or-die --tunnel
|
|
56
94
|
|
|
57
|
-
# HTTPS
|
|
95
|
+
# HTTPS
|
|
58
96
|
ai-or-die --https --cert cert.pem --key key.pem
|
|
59
97
|
|
|
60
|
-
#
|
|
61
|
-
ai-or-die --
|
|
62
|
-
|
|
63
|
-
# Custom tool aliases
|
|
64
|
-
ai-or-die --claude-alias "AI" --copilot-alias "CP" --gemini-alias "Gem"
|
|
98
|
+
# Development mode (verbose logging)
|
|
99
|
+
ai-or-die --dev
|
|
65
100
|
|
|
66
|
-
#
|
|
67
|
-
ai-or-die --
|
|
101
|
+
# Custom tool display names
|
|
102
|
+
ai-or-die --claude-alias "Sonnet" --gemini-alias "Gem"
|
|
68
103
|
```
|
|
69
104
|
|
|
70
|
-
## CLI
|
|
105
|
+
## CLI Reference
|
|
71
106
|
|
|
72
107
|
| Flag | Description | Default |
|
|
73
108
|
|------|-------------|---------|
|
|
74
109
|
| `-p, --port <number>` | Server port | `7777` |
|
|
75
|
-
| `--no-open` | Don't auto-open browser | |
|
|
76
110
|
| `--auth <token>` | Set auth token | auto-generated |
|
|
77
|
-
| `--disable-auth` | Disable authentication | |
|
|
78
|
-
| `--
|
|
111
|
+
| `--disable-auth` | Disable authentication | `false` |
|
|
112
|
+
| `--tunnel` | Enable Microsoft Dev Tunnel | `false` |
|
|
113
|
+
| `--tunnel-allow-anonymous` | Allow anonymous tunnel access | `false` |
|
|
114
|
+
| `--https` | Enable HTTPS | `false` |
|
|
79
115
|
| `--cert <path>` | SSL certificate file | |
|
|
80
116
|
| `--key <path>` | SSL private key file | |
|
|
81
|
-
| `--dev` |
|
|
82
|
-
| `--
|
|
83
|
-
| `--
|
|
84
|
-
| `--tunnel-allow-anonymous` | Allow anonymous tunnel access | |
|
|
85
|
-
| `--claude-alias <name>` | Display name for Claude | `Claude` |
|
|
86
|
-
| `--codex-alias <name>` | Display name for Codex | `Codex` |
|
|
87
|
-
| `--copilot-alias <name>` | Display name for Copilot | `Copilot` |
|
|
88
|
-
| `--gemini-alias <name>` | Display name for Gemini | `Gemini` |
|
|
89
|
-
| `--terminal-alias <name>` | Display name for Terminal | `Terminal` |
|
|
90
|
-
|
|
91
|
-
## Dev Tunnels Setup
|
|
117
|
+
| `--dev` | Verbose logging | `false` |
|
|
118
|
+
| `--no-open` | Don't auto-open browser | `false` |
|
|
119
|
+
| `--plan <type>` | Subscription plan (`pro`, `max5`, `max20`) | `max20` |
|
|
92
120
|
|
|
93
|
-
|
|
121
|
+
## Supported Tools
|
|
94
122
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
123
|
+
| Tool | Command | Install |
|
|
124
|
+
|------|---------|---------|
|
|
125
|
+
| Claude Code | `claude` | [claude.ai/code](https://claude.ai/code) |
|
|
126
|
+
| GitHub Copilot | `copilot` | [github.com/features/copilot](https://github.com/features/copilot) |
|
|
127
|
+
| Google Gemini | `gemini` | [github.com/google-gemini/gemini-cli](https://github.com/google-gemini/gemini-cli) |
|
|
128
|
+
| OpenAI Codex | `codex` | [openai.com/codex](https://openai.com/codex) |
|
|
129
|
+
| Terminal | bash / PowerShell | Always available |
|
|
99
130
|
|
|
100
|
-
|
|
101
|
-
curl -sL https://aka.ms/DevTunnelCliInstall | bash
|
|
131
|
+
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.
|
|
102
132
|
|
|
103
|
-
|
|
104
|
-
devtunnel user login
|
|
133
|
+
## Dev Tunnels
|
|
105
134
|
|
|
106
|
-
|
|
107
|
-
ai-or-die --tunnel --tunnel-allow-anonymous
|
|
108
|
-
```
|
|
135
|
+
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.
|
|
109
136
|
|
|
110
|
-
|
|
137
|
+
```bash
|
|
138
|
+
# Install devtunnel CLI (one-time)
|
|
139
|
+
winget install Microsoft.devtunnel # Windows
|
|
140
|
+
curl -sL https://aka.ms/DevTunnelCliInstall | bash # Linux
|
|
111
141
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
| Copilot | `copilot` | `npm install -g @github/copilot` or `winget install GitHub.Copilot` |
|
|
116
|
-
| Gemini | `gemini` | `npm install -g @google/gemini-cli` |
|
|
117
|
-
| Codex | `codex` | [openai.com/codex](https://openai.com/codex) |
|
|
118
|
-
| Terminal | bash/PowerShell | Always available |
|
|
142
|
+
# Start with tunnel (auto-login if needed)
|
|
143
|
+
ai-or-die --tunnel
|
|
144
|
+
```
|
|
119
145
|
|
|
120
|
-
|
|
146
|
+
When `--tunnel` is active, auth is disabled — the tunnel itself controls access.
|
|
121
147
|
|
|
122
148
|
## Architecture
|
|
123
149
|
|
|
124
|
-
|
|
150
|
+
```
|
|
151
|
+
Browser (xterm.js)
|
|
152
|
+
|
|
|
153
|
+
| WebSocket
|
|
154
|
+
v
|
|
155
|
+
Express Server ──> Session Store (~/.ai-or-die/sessions.json)
|
|
156
|
+
|
|
|
157
|
+
| node-pty
|
|
158
|
+
v
|
|
159
|
+
Claude / Copilot / Gemini / Codex / bash
|
|
160
|
+
```
|
|
125
161
|
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
162
|
+
- **Server** (`src/server.js`) — Express + WebSocket, session persistence, auth, rate limiting
|
|
163
|
+
- **Bridges** (`src/*-bridge.js`) — Spawn CLI processes via node-pty, output buffering
|
|
164
|
+
- **Client** (`src/public/`) — Vanilla JS + xterm.js, tabbed sessions, PWA
|
|
165
|
+
- **Tunnel** (`src/tunnel-manager.js`) — devtunnel lifecycle, auto-login, auto-restart
|
|
166
|
+
|
|
167
|
+
See [docs/](docs/) for [ADRs](docs/adrs/), [specs](docs/specs/), and [architecture diagrams](docs/architecture/).
|
|
130
168
|
|
|
131
169
|
## Development
|
|
132
170
|
|
|
133
171
|
```bash
|
|
134
|
-
# Clone and install
|
|
135
172
|
git clone https://github.com/animeshkundu/ai-or-die.git
|
|
136
173
|
cd ai-or-die
|
|
137
174
|
npm install
|
|
138
|
-
|
|
139
|
-
#
|
|
140
|
-
npm run
|
|
141
|
-
|
|
142
|
-
# Run tests
|
|
143
|
-
npm test
|
|
175
|
+
npm run dev # start with verbose logging
|
|
176
|
+
npm test # run tests
|
|
177
|
+
npm run build:sea # build standalone binary
|
|
144
178
|
```
|
|
145
179
|
|
|
146
|
-
##
|
|
147
|
-
|
|
148
|
-
### REST Endpoints
|
|
149
|
-
|
|
150
|
-
| Method | Endpoint | Description |
|
|
151
|
-
|--------|----------|-------------|
|
|
152
|
-
| `GET` | `/api/health` | Server health check |
|
|
153
|
-
| `GET` | `/api/config` | Server config + tool availability |
|
|
154
|
-
| `GET` | `/api/sessions/list` | List all sessions |
|
|
155
|
-
| `POST` | `/api/sessions/create` | Create a new session |
|
|
156
|
-
| `DELETE` | `/api/sessions/:id` | Delete a session |
|
|
157
|
-
| `GET` | `/api/folders` | Browse directories |
|
|
158
|
-
|
|
159
|
-
### WebSocket
|
|
180
|
+
## Contributing
|
|
160
181
|
|
|
161
|
-
|
|
182
|
+
1. Check [ADRs](docs/adrs/) before proposing architectural changes
|
|
183
|
+
2. Update [specs](docs/specs/) when changing component behavior
|
|
184
|
+
3. Add tests for every feature and bug fix
|
|
185
|
+
4. Use [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:`, `test:`, `chore:`)
|
|
162
186
|
|
|
163
187
|
## License
|
|
164
188
|
|
|
165
|
-
MIT
|
|
189
|
+
[MIT](LICENSE) — Animesh Kundu
|