https://github.com/shadowhusky/tron
Self-hosted AI-powered terminal. Run shells, use local or cloud LLMs (Ollama, OpenAI, Claude), and get agent-assisted commands from your desktop.
https://github.com/shadowhusky/tron
electron frontend javascript terminal typescript
Last synced: about 1 month ago
JSON representation
Self-hosted AI-powered terminal. Run shells, use local or cloud LLMs (Ollama, OpenAI, Claude), and get agent-assisted commands from your desktop.
- Host: GitHub
- URL: https://github.com/shadowhusky/tron
- Owner: Shadowhusky
- License: mit
- Created: 2026-02-16T11:26:49.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-09T21:39:58.000Z (4 months ago)
- Last Synced: 2026-03-09T23:22:42.366Z (4 months ago)
- Topics: electron, frontend, javascript, terminal, typescript
- Language: TypeScript
- Homepage: https://tronai.dev/
- Size: 39.4 MB
- Stars: 10
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Tron — Vibe Code Anywhere
Open-source AI terminal with a built-in web server.
Open the app, and your AI coding environment is instantly available from any browser — phone, tablet, or another machine.
---
Vibe code from your phone — sessions persist even if you close the browser
## Why Tron?
**Your data never leaves your machine.** Tron runs locally — the AI agent, terminal, and web server all live on your computer. No cloud relay, no third-party servers. Add [Tailscale](https://tailscale.com) for encrypted remote access from anywhere, without exposing a single port.
- **Vibe code everywhere** — built-in web server starts automatically; open any browser on your phone, tablet, or another PC and you're in
- **Sessions never die** — close the browser, reopen it hours later, everything is exactly where you left it: terminal output, agent threads, scroll position
- **AI agent in your real shell** — the agent executes multi-step plans directly in your terminal with live output and permission controls
- **Any model** — Ollama, LM Studio, OpenAI, Anthropic, Gemini, DeepSeek, Kimi, Qwen, GLM, MiniMax, or any compatible API
- **SSH remote** — connect to remote servers; terminal, agent, and all features work identically over SSH
- **Private & secure** — everything runs on your machine, dangerous command detection, permission prompts, loop guards
- **Cross-platform** — macOS, Windows, Linux. Desktop (Electron) or browser
https://github.com/user-attachments/assets/3f83279e-21ea-4b1e-b5a2-786d14d637e5
## Demo
| Terminal & Split Panes | AI Agent |
|:---:|:---:|
|  |  |
| Agent View | Input Modes |
|:---:|:---:|
|  |  |
| Themes | SSH |
|:---:|:---:|
|  |  |
| Web Server |
|:---:|
|  |
## Getting Started
**Prerequisites:** Node.js 18+. Optionally [Ollama](https://ollama.ai) for free local AI.
```bash
git clone https://github.com/Shadowhusky/Tron.git
cd tron && npm install
# Desktop app
npm run dev
# Web app (self-hosted)
npm run dev:web
```
On first launch, the setup wizard walks you through theme selection and AI provider configuration.
## Deployment Modes
| Mode | How | Use Case |
|------|-----|----------|
| **Desktop** | `npm run dev` | Local Electron app |
| **Built-in web server** | Settings > Web Server | Access from any browser on your network |
| **Standalone web** | `npm run start:web` | Headless server deployment |
| **Gateway** | `TRON_MODE=gateway npm run start:web` | SSH-only relay for cloud |
The **built-in web server** is the easiest way to access Tron from another device — toggle it on in Settings, and it shows your local IPs and port. For headless servers without a desktop, use the standalone web mode. Gateway mode restricts access to SSH connections only, making it safe for multi-user cloud deployments.
### Remote Access with Tailscale (2 minutes setup)
Want to code from your phone on the bus, or SSH into your home machine from a coffee shop? [Tailscale](https://tailscale.com) makes this ridiculously easy — no port forwarding, no dynamic DNS, no firewall rules. It just works.
1. **Install Tailscale** on your computer (the one running Tron) and your phone/tablet — [tailscale.com/download](https://tailscale.com/download)
2. **Sign in** with the same account on both devices (Google, GitHub, etc.)
3. **Find your computer's Tailscale IP** — it looks like `100.x.y.z`, shown in the Tailscale app
4. **Open Tron** on your phone's browser: `http://100.x.y.z:3888`
That's it. Encrypted, peer-to-peer, works from anywhere in the world. Free for personal use (up to 100 devices).
> **Tip:** Tailscale IPs are stable — bookmark it once and it works forever, even if your home network changes.
### Docker
Run the web server as a persistent Docker service with auto-restart:
```bash
# Quick start
docker compose up -d
# Rebuild after pulling updates
docker compose build && docker compose up -d
# View logs
docker compose logs -f
# Stop
docker compose down
```
The container runs on port **3888** and auto-restarts on crash or system reboot. Configuration is loaded from your `.env` file.
**What's included:**
- Full terminal access inside the container (bash, git, curl, vim)
- Host filesystem mounted at `/host` (read-write)
- Docker socket access for container management
- `host.docker.internal` resolves to the host machine
**Connecting to host AI providers (e.g. LM Studio, Ollama):**
Use `host.docker.internal` instead of `localhost` for the base URL in Settings:
```
http://host.docker.internal:1234 # LM Studio
http://host.docker.internal:11434 # Ollama
```
**Gateway mode** (SSH-only, no local terminal):
```yaml
# In docker-compose.yml, uncomment:
environment:
- TRON_MODE=gateway
- TRON_SSH_ONLY=true
```
## Features
### Terminal
- Tabbed interface with split panes (vertical/horizontal, recursive nesting)
- Smart input bar with shell completions, AI ghost text, and command history
- Three themes — Dark, Light, Modern (frosty glass) + system auto-detect
- Persistent history — terminal output survives app restarts
### AI Agent
- Autonomous multi-step execution with live terminal output
- **Agent View** — full-height, chat-focused AI-first interface
- Tools: `execute_command`, `run_in_terminal`, `write_file`, `read_file`, `edit_file`, `send_text`, `read_terminal`
- Permission system with dangerous command detection and double-confirm
- Auto-execute mode, thinking mode, streaming overlay with diff previews
- Context management with usage ring, summarization, and `/log` export
### Input Modes
| Mode | Description |
|------|-------------|
| **Auto** | Detects command vs. natural language |
| **Command** | Direct shell with Tab completion |
| **Advice** | AI suggests a single command with explanation |
| **Agent** | Multi-step autonomous execution |
### SSH
- Password, private key, and SSH agent authentication
- Saved profiles with optional credential persistence
- AI agent works fully over SSH (commands, file ops, system inspection)
### Built-in Web Server
- Toggle on in Settings > Web Server — no separate server process needed
- Shows local IP addresses and configurable port
- Access your full terminal from any browser on the network
- Pair with [Tailscale](https://tailscale.com) for secure remote access
### Session Persistence
- Terminal output survives app restarts — reopen and see your full history
- Save tabs to disk and restore them anytime (right-click tab → Save)
- Use your preferred coding agent (Claude Code, Codex, etc.) inside Tron and resume seamlessly even if the page closes
- Agent threads, overlay state, and scroll position are all preserved
### Providers
Ollama, LM Studio, OpenAI, Anthropic, Gemini, DeepSeek, Kimi, Qwen, GLM, MiniMax, OpenAI Compatible, Anthropic Compatible.
### Model Recommendations
Tron's agent is designed for **everyday terminal tasks** — running commands, editing files, managing servers, light automation. You don't need the most powerful model for this.
| Tier | Models | Best For |
|------|--------|----------|
| **Local (free)** | [Qwen3.5-9B](https://ollama.com/library/qwen3.5:9b) (via Ollama/LM Studio) | Surprisingly capable for a local model — multimodal, 256K context, thinking mode. Beats models 13× its size on reasoning benchmarks. Handles agent tasks, file editing, and scripting well. Runs on 8GB+ VRAM. |
| **Budget cloud** | Kimi, GLM, MiniMax | Great balance of cost and capability. Handle most agent tasks well — command execution, file editing, debugging. Good daily drivers. |
| **Premium cloud** | Claude, GPT, Gemini | Excellent but overkill for typical terminal agent work. Better suited for direct coding conversations. |
> **Context length matters for local models.** The agent sends terminal history, file contents, and tool results as context. If your model's context window is too small (e.g. 2K–4K tokens), it may fail mid-task — especially when writing or editing files. For local models, use at least **8K context** (16K+ recommended). In Ollama, you can increase context with `OLLAMA_NUM_CTX=16384` or by setting `num_ctx` in a Modelfile. LM Studio has a context length slider in model settings. Cloud models handle this automatically.
> **Tip for complex coding:** Rather than using a premium model through Tron's agent, run a dedicated coding agent like [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview) or [Codex](https://github.com/openai/codex) directly inside Tron's terminal. Tron's session persistence means you can start a long coding session, close the browser, and come back to it later — the agent keeps running and all output is preserved.
## Keyboard Shortcuts
| Action | macOS | Windows/Linux |
|--------|-------|---------------|
| New tab | `Cmd+T` | `Ctrl+T` |
| Close tab | `Cmd+W` | `Ctrl+W` |
| Split vertical | `Cmd+D` | `Ctrl+D` |
| Split horizontal | `Cmd+Shift+D` | `Ctrl+Shift+D` |
| Settings | `Cmd+,` | `Ctrl+,` |
| Force agent | `Cmd+Enter` | `Ctrl+Enter` |
| Cycle mode | `Ctrl+Shift+M` | `Ctrl+Shift+M` |
All shortcuts are customizable in Settings.
## Installation FAQ
Windows — "Smart App Control blocked this app" (no "Run anyway" button)
Windows 11's Smart App Control may block unsigned apps entirely, with no option to bypass.
**Option A — Unblock the file:**
1. Right-click the downloaded `.exe` → **Properties**
2. At the bottom, check **"Unblock"** → click **Apply**
3. Double-click the `.exe` to run it
**Option B — Disable Smart App Control** (if Option A doesn't work):
1. Open **Settings** → **Privacy & Security** → **Windows Security**
2. Click **App & browser control** → **Smart App Control settings**
3. Set it to **Off**
> ⚠️ This is a one-way toggle — once turned off, it can't be re-enabled without resetting Windows. This is safe for most users; Windows Defender still protects your system independently.
Windows — "Windows protected your PC" (SmartScreen)
1. Click **"More info"**
2. Click **"Run anyway"**
This only appears on the first install. Windows remembers your choice for future launches.
macOS — "app is from an unidentified developer"
**Right-click** the app → **Open** → click **Open** in the dialog.
You only need to do this once — macOS remembers your choice.
macOS — "app is damaged and can't be opened"
This happens when macOS quarantine flags the downloaded file. Remove the flag:
```bash
xattr -cr /Applications/Tron.app
```
Then open the app normally.
Linux — "Permission denied" when running the AppImage
Make the file executable first:
```bash
chmod +x Tron-*.AppImage
./Tron-*.AppImage
```
Linux — "FUSE not found" / AppImage won't start
AppImage requires FUSE to mount. Install it:
```bash
# Ubuntu/Debian
sudo apt install libfuse2
# Fedora
sudo dnf install fuse
# Arch
sudo pacman -S fuse2
```
Alternatively, extract and run without FUSE:
```bash
./Tron-*.AppImage --appimage-extract
./squashfs-root/AppRun
```
## Development
```bash
npm run dev # Electron + Vite dev
npm run dev:web # Web mode dev
npm run build # Production build
npm run lint # ESLint
npm run test:e2e # Playwright E2E tests
```
## Tech Stack
Electron, React 19, TypeScript, Vite, xterm.js, Tailwind CSS, Framer Motion, TanStack Virtual/Query, ssh2, Playwright.
## Community
- [Discord](https://discord.gg/EeTCS7A6) — questions, feedback, feature requests
- [GitHub Issues](https://github.com/Shadowhusky/Tron/issues) — bug reports
## License
MIT