{"_id":"@aatosolavi/t-0","name":"@aatosolavi/t-0","dist-tags":{"latest":"0.3.0"},"versions":{"0.3.0":{"name":"@aatosolavi/t-0","version":"0.3.0","description":"T-0 — browser terminal + agent launcher (real local PTY in a tab)","license":"MIT","type":"module","bin":{"t-0":"bin/t-0.mjs"},"scripts":{"terminal":"bun run terminal:vendor:build && node terminal/start.mjs","terminal:vendor:build":"bun build terminal/vendor.ts --outdir terminal/dist --target browser --minify --entry-naming vendor.[ext]","terminal:pty":"node terminal/pty-server.mjs","terminal:html":"bun run terminal:vendor:build && bun run terminal/server.ts","terminal:launcher:build":"node terminal/build-launcher.mjs","terminal:launcher:install":"node terminal/build-launcher.mjs","terminal:install":"bun run terminal:vendor:build && bun run terminal:launcher:install && ./terminal/install-launch-agent.sh","portless:repair":"bunx portless alias t0 4321 && bunx portless proxy start && bunx portless doctor","start":"bun run terminal","dev":"bun run terminal","install:service":"./terminal/install-launch-agent.sh","typecheck":"tsc -p tsconfig.json","check:shell":"bash -n install.sh && bash -n terminal/install-launch-agent.sh","check:data-dir":"node --input-type=module -e \"import { modernDataDir, dataDir } from './terminal/data-dir.mjs'; if (!modernDataDir().endsWith('.t-0')) process.exit(1); dataDir(); console.log('data-dir ok')\"","check:rust":"rustup run stable cargo check --locked --manifest-path terminal/launcher-ratatui/Cargo.toml","check":"bun run terminal:vendor:build && bun run typecheck && bun run check:shell && bun run check:data-dir && bun run check:rust","prepublishOnly":"bun run terminal:vendor:build && bun run typecheck"},"engines":{"node":">=20"},"os":["darwin"],"keywords":["terminal","pty","xterm","browser-terminal","tui","launcher","coding-agents","macos","local-first"],"homepage":"https://github.com/aatosolavi/t-0#readme","bugs":{"url":"https://github.com/aatosolavi/t-0/issues"},"repository":{"type":"git","url":"git+https://github.com/aatosolavi/t-0.git"},"author":{"name":"aatosolavi"},"dependencies":{"@lydell/node-pty":"^1.2.0-beta.14","@xterm/addon-canvas":"0.7.0","@xterm/addon-fit":"0.11.0","@xterm/addon-web-links":"0.12.0","@xterm/addon-webgl":"0.19.0","@xterm/xterm":"6.0.0","portless":"^0.15.5","ws":"^8.21.2"},"devDependencies":{"@types/bun":"^1.3.14","@types/node":"^26.1.2","typescript":"^7.0.2"},"gitHead":"ce6e2ed00d954ca35f6bfc91dfbe9669e93aab7f","_id":"@aatosolavi/t-0@0.3.0","_nodeVersion":"26.5.0","_npmVersion":"12.0.1","dist":{"integrity":"sha512-VxGvS0jdKtImhkcaqo7LME/OiZDzL8QzH1n+Nyv2cKVCsfs+ScPrqd9gGOb53YGZNGQJpnfNfthynjI7i5RGaw==","shasum":"2646fdfaaa54bc4d1e04d585d8588327cef028c9","tarball":"https://registry.npmjs.org/@aatosolavi/t-0/-/t-0-0.3.0.tgz","fileCount":34,"unpackedSize":923432,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAOAZ+WGo0tA9gV4ieGAuKm1DkBbjNCBf0nShWhVV3ywAiEA3MDWsbbhdLsvbNlZQJzC2MbpVX2aaZuZmWxjjdRbvro="}]},"_npmUser":{"name":"aatosolavi","email":"aatos@akvilander.com"},"directories":{},"maintainers":[{"name":"aatosolavi","email":"aatos@akvilander.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/t-0_0.3.0_1785861785351_0.5914193200004161"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-04T16:43:05.133Z","0.3.0":"2026-08-04T16:43:05.511Z","modified":"2026-08-04T16:43:05.738Z"},"maintainers":[{"name":"aatosolavi","email":"aatos@akvilander.com"}],"description":"T-0 — browser terminal + agent launcher (real local PTY in a tab)","homepage":"https://github.com/aatosolavi/t-0#readme","keywords":["terminal","pty","xterm","browser-terminal","tui","launcher","coding-agents","macos","local-first"],"repository":{"type":"git","url":"git+https://github.com/aatosolavi/t-0.git"},"author":{"name":"aatosolavi"},"bugs":{"url":"https://github.com/aatosolavi/t-0/issues"},"license":"MIT","readme":"# T-0\n\n**A real local terminal in a browser tab** — plus a launcher for workspaces and coding agents.\n\nOpen a tab. Get a full PTY. Pick a workspace. Launch Claude, Codex, Pi, Cursor, Grok, Amp, Devin, Droid, or a plain shell.\n\n> T-0 — countdown done. Workspaces in, agents out.\n\n[![local-first](https://img.shields.io/badge/local--first-orange)](https://github.com/aatosolavi/t-0)\n[![npm](https://img.shields.io/npm/v/@aatosolavi/t-0?color=f97316)](https://www.npmjs.com/package/@aatosolavi/t-0)\n[![MIT](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)\n[![macOS](https://img.shields.io/badge/platform-macOS-lightgrey)](#install-macos)\n[![CLI](https://img.shields.io/badge/CLI-t0-f97316)](#t-0-keys-t0)\n\n**Repo:** [aatosolavi/t-0](https://github.com/aatosolavi/t-0) · **CLI:** `t0` (legacy alias `mc`) · **State:** `~/.t-0`\n\n<p align=\"center\">\n  <img\n    src=\"https://raw.githubusercontent.com/aatosolavi/t-0/main/docs/assets/launchpad.png\"\n    alt=\"T-0 launcher — pick a workspace and agent (demo data)\"\n    width=\"920\"\n  />\n</p>\n\n<p align=\"center\"><sub>T-0 launcher (<code>t0</code>)</sub></p>\n\n## Install (macOS)\n\n### npm (global)\n\n```bash\nnpm install -g @aatosolavi/t-0\nt-0 install                 # build t0 + LaunchAgent + portless\nopen https://t0.localhost   # or http://127.0.0.1:4321\nt-0 doctor                  # stack health\n```\n\nPackage is **`@aatosolavi/t-0`** (unscoped `t-0` is blocked by npm as too similar to unrelated `t0`). The **stack CLI** bin is still `t-0` (install / start / doctor). The Ratatui workspace pad is **`t0`** (legacy `mc`).\n\n### One-liner\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/aatosolavi/t-0/main/install.sh | bash\n```\n\n### From a clone\n\n```bash\ngit clone https://github.com/aatosolavi/t-0.git\ncd t-0\nbun install\nbun run terminal:install   # build t0 + LaunchAgent\nopen https://t0.localhost   # or http://127.0.0.1:4321\n```\n\n### Requirements\n\n| Tool | Why |\n|---|---|\n| **Node.js 24+** | PTY broker (`@lydell/node-pty`); 20+ runs T-0, 24+ needed for the `t0.localhost` proxy |\n| **Bun** | Tiny HTML server |\n| **Rust / rustup** | Build the `t0` launcher (prebuilt binaries planned) |\n| **macOS** | LaunchAgent install path (Linux/Windows later) |\n\nForeground without installing the agent:\n\n```bash\nbun run terminal\n# → http://127.0.0.1:4321\n```\n\nThen in any shell:\n\n```bash\nt0                 # open the workspace / agent pad\nMC_DEMO=1 t0       # same UI with fake public-looking repos (for screenshots)\n```\n\n## What you get\n\n| Piece | Role |\n|---|---|\n| **Browser UI** | Full-page xterm.js, light/dark/system, orange accent |\n| **PTY broker** | Real local shell over WebSocket on **127.0.0.1:4322** (page reaches it same-origin at `/pty`) |\n| **`t0`** | Workspace list + agent pad inside the PTY |\n| **Sessions** | Reload reattaches; idle retain across laptop sleep |\n| **Helium extension** | `extension/` → Cmd+T becomes a terminal |\n\n### Workspace list (`t0`)\n\nSections, top to bottom:\n\n1. **★ favorites**\n2. **recent**\n3. **last** (last session / cwd)\n4. **root** (the workspace root itself, if it is a repo)\n5. **scan** under the workspace root (section label = that path)\n\nType to filter by name or path. **Git rows:** branch · `*` dirty · `↑N` ahead · remembered agent. Selection is a full-width surface with a `▌` accent bar.\n\nDemo mode (`MC_DEMO=1 t0` / `MC_MOCK=1`) uses the **same section order** with fake repos under `~/work/…` and skips splash.\n\n### T-0 keys (`t0`)\n\n| Key | Does |\n|-----|------|\n| **enter** | Open selected workspace with agent |\n| **`.`** | Resume last workspace + agent (filter empty) |\n| **space** | Toggle favorite (`★`) (filter empty) |\n| **1–9** | Pick agent chip |\n| **n** | New Project popup |\n| **s** | Settings |\n| **?** | Full keymap overlay |\n| type | Filter by name or path · **esc** clears |\n| **tab** / ←→ | Move between agent chips |\n| ↑↓ / wheel | Move through workspaces |\n\n**Agents (1–9)**\n\n| Key | App |\n|-----|-----|\n| 1 | Grok |\n| 2 | Codex |\n| 3 | Pi |\n| 4 | Cursor (agent CLI) |\n| 5 | Claude |\n| 6 | Amp |\n| 7 | Devin |\n| 8 | Droid |\n| 9 | Shell |\n\nMissing CLIs are **dimmed**. **Hover** a dim chip (or press its number / enter) to **install** npm-backed agents (Codex, Claude, Pi) when a recipe is known. Script-based installers need `MC_ALLOW_SCRIPT_INSTALL=1`.\n\n**New Project (`n`)** — scaffold a git repo under a chosen parent, optional headless agent init (Grok / Codex / Claude / …). Multi-line notes with **Shift+Enter**; you stay in the pad while init streams into a job bar.\n\n**Settings (`s`)** — splash, default agent, IDE for `e`, UI theme (`auto` / `dark` / `light`), workspace root picker.\n\n**Side actions** (filter empty)\n\n| Key | Does |\n|-----|------|\n| **`e`** | Open folder in Cursor/IDE |\n| **`f`** | Finder |\n| **`c`** | Copy path |\n| **`g`** | GitHub origin |\n\n**Memory** — last agent per workspace (auto-select on highlight); favorites / settings in `$MC_DATA_DIR/launcher-state.json`; recents also in `recent-workspaces.txt`.\n\n**Motion** — one live status region (tips ~every 30 s when idle); spinner only while install/init jobs run. Full map: [launcher README](./terminal/launcher-ratatui/README.md).\n\n### Themes\n\n**Browser chrome**\n- `?theme=light` · `?theme=dark` · `?theme=system`\n- **⌘/Ctrl+Shift+L** cycles\n\n**Launcher (`t0`)** — Settings → UI theme: `auto` / `dark` / `light`\n\n### Stable URL — `https://t0.localhost`\n\nThe standard address is **`https://t0.localhost`**, fronted by [portless](https://portless.sh/) (ships as a dev dependency; `portless.json` in the repo). `install.sh` sets it up automatically — route, HTTPS CA trust (one sudo prompt), and a startup service. The PTY websocket is served same-origin at `/pty`, so the one URL carries everything.\n\nManual setup or repair:\n\n```bash\nbun run portless:repair        # alias + proxy start + doctor (from a clone)\n# or, step by step:\nbunx portless alias t0 4321 && bunx portless proxy start\nbunx portless trust            # once; adds the local CA (sudo)\nbunx portless service install  # once; start proxy at login (survives reboot)\n```\n\n**Split brain:** LaunchAgent can be healthy (`http://127.0.0.1:4321` → 200) while portless is down (`https://t0.localhost` connection refused on `:443`). Repair portless; do not restart T-0 in a loop.\n\nNo portless (or Node < 24)? Nothing breaks — `http://127.0.0.1:4321` always works.\n\n### Config (env)\n\n| Variable | Default |\n|---|---|\n| `MC_WORKSPACE_ROOT` | `~/dev` if it exists, else `$HOME` (or path set in Settings) |\n| `MC_DATA_DIR` | `~/.t-0` (legacy `~/.mission-control` / `~/.grok-mission-control` auto-migrated) |\n| `MC_BIND_HOST` | `127.0.0.1` |\n| `MC_SPLASH` | splash on cold start (`0` to disable; also settable in Settings) |\n| `MC_DEMO` / `MC_MOCK` | `1` = fake workspaces for marketing screenshots (skips splash) |\n| `MC_SESSION_RETAIN_MS` | idle session retain (default 6 h; alias `GROK_TERMINAL_SESSION_RETAIN_MS`) |\n| `MC_USE_LAUNCHER` | `0` = shell-first (skip launcher; alias `GROK_TERMINAL_USE_LAUNCHER`) |\n| `GROK_TERMINAL_*_COMMAND` | override agent CLI paths |\n\n## For coding agents\n\nIf another agent is installing or debugging T-0 for a human:\n\n- Playbook: [docs/for-coding-agents.md](./docs/for-coding-agents.md)\n- Skill: [.agents/skills/install-t0/SKILL.md](./.agents/skills/install-t0/SKILL.md)  \n  Copy into the host skill dir (e.g. `~/.agents/skills/install-t0/`) for auto-invocation / `/install-t0`.\n\n## Security\n\nThis is a **full shell as your user**, bound to **localhost only**. Do not expose ports 4321/4322. See [SECURITY.md](./SECURITY.md).\n\n## Contributing\n\nIdeas and PRs welcome — especially if you live in agent CLIs too.\n\n**Actively looking for help on:**\n\n1. **Finder-class UX in `t0`** — make the workspace/folder browser feel like a small Finder replacement for the launcher (navigation, jumps, keyboard/mouse polish).\n2. **Splash + logo (ASCII)** — terminal splash animation and a solid T-0 ASCII logo. ANSI art welcome; keep it skippable and light/dark friendly.\n\nDetails: [CONTRIBUTING.md](./CONTRIBUTING.md). Short version: **humans own PRs**; AI help is fine if you reviewed and ran the change. Unreviewed agent spam will be closed.\n\n## Docs\n\n- [docs/browser-terminal.md](./docs/browser-terminal.md) — PTY notes, sessions, launcher  \n- [CONTRIBUTING.md](./CONTRIBUTING.md) · [SECURITY.md](./SECURITY.md)  \n- [terminal/launcher-ratatui/README.md](./terminal/launcher-ratatui/README.md) — full key map  \n\n## Stack\n\n- **xterm.js** (locally bundled) · **@lydell/node-pty** · **ws**\n- **Bun** HTML server · **Node** PTY broker\n- **Rust / Ratatui** T-0 UI (`t0`)\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md","_rev":"1-82d6f5035f0e1b31220bb2e55638bc4b"}