termux-tools
Turn your phone into a persistent dev server
Shell / JS / TS / Python · MIT Licensed · ARM64
# Core Features
TMX Orchestrator
TypeScript daemon managing tmux session lifecycle. Dependency-ordered parallel boot, health checks, auto-restart, and a real-time web dashboard.
tmx boot — start daemon + all sessions tmx status — sessions, memory, battery tmx go torch — send 'go' to Claude session tmx open ~/proj — add session dynamically CFC Browser Bridge
WebSocket bridge connecting Chrome extension to Claude Code CLI. Browser automation — screenshots, navigation, form fill — as MCP tools.
claude-chrome-android — start bridge server --mcp — MCP relay for Claude Code --setup — register MCP + extension Crash Resilience
All processes detach from Termux (PPid: 1) — sessions survive app kills. IPC socket self-heals after tmpfs cleanup. Watchdog auto-restarts daemon after OOM.
watchdog.sh — boot script in ~/.termux/boot/ /api/fix-socket — instant IPC socket recovery tmx health — run health checks now # Quick Start
Up and running in under 5 minutes. Requires Termux:Boot and Termux:API from F-Droid.
1. Install & Configure
# Install required packages
pkg install tmux termux-api bun
# Install Termux:Boot and Termux:API from F-Droid
# (required for boot persistence and notifications)
# Clone and build the orchestrator
git clone https://github.com/tribixbite/termux-tools ~/git/termux-tools
cd ~/git/termux-tools/orchestrator
bun install && bun run build
# Symlink the CLI
mkdir -p ~/.local/bin
ln -sf $(pwd)/dist/tmx.js ~/.local/bin/tmx
# Install watchdog as boot script
cp watchdog.sh ~/.termux/boot/startup.sh
chmod +x ~/.termux/boot/startup.sh2. Configure Your Projects
# ~/.config/tmx/tmx.toml
[orchestrator]
dashboard_port = 18970
[boot]
auto_start = 6 # auto-start top 6 recent sessions
visible = 10 # show 10 on dashboard with play button
[[session]]
name = "cleverkeys"
type = "claude"
path = "$HOME/git/swype/cleverkeys"
[[session]]
name = "my-project"
type = "claude"
path = "$HOME/git/my-project"
auto_go = true # send 'go' after startup3. Boot
Run tmx boot to start the daemon, or reboot your device
and Termux:Boot will run the watchdog automatically. Dashboard at http://localhost:18970.
# Command Reference
Dashboard at http://localhost:18970 — REST API on the same port
# How It Works
┌──────────────────────────────────────────────────────┐
│ Device Boot │
│ │ │
│ ▼ │
│ Termux:Boot ──▶ watchdog.sh (bash loop) │
│ │ │
│ ▼ │
│ TMX Daemon (TypeScript, bun runtime) │
│ ├── termux-wake-lock (persists forever) │
│ ├── ADB wireless + phantom process fix │
│ ├── Read tmx.toml + registry.json │
│ ├── Resolve boot recency (top N from history) │
│ │ │
│ ▼ │
│ Dependency sort ──▶ parallel start per depth │
│ ├── claude: poll readiness ──▶ send "go" │
│ ├── daemon: run custom command │
│ └── service: headless background │
│ │
│ Continuous monitoring: │
│ ├── health checks + auto-restart │
│ ├── memory pressure (/proc/meminfo) │
│ ├── battery monitoring + radio management │
│ └── dashboard SSE on :18970 │
│ │
│ Crash resilience: (all processes PPid: 1) │
│ ├── sessions survive Termux app kill │
│ ├── IPC socket self-heals after tmpfs cleanup │
│ └── watchdog restarts daemon after OOM kill │
└──────────────────────────────────────────────────────┘ XDG-Compliant Paths
Config in ~/.config/tmx/
State + logs in ~/.local/share/tmx/
Multi-Instance Sessions
Multiple Claude sessions per project.
Named sessions auto-resume on boot.
# Repo Structure
# Requirements
● required ○ optional (for bridge/extension features)