Control-Terminal
Run local AI agents with a web terminal using tmux + ttyd. Control Claude, Codex, or any CLI agent from your mobile phone.
How It Works
Three proven tools combined into one smooth workflow for AI-agent sessions.
tmux
Session Persistence
Your agent keeps running on your machine even if your phone disconnects, screen locks, or the network changes. Reconnect anytime.
ttyd
Browser Access
Turns your terminal into a web UI you can open from any device. Interact with the exact tmux session, not a separate shell.
cloudflared
Remote Access
Gives you a shareable public URL instantly without manual router or NAT setup. Access your agent from anywhere.
Step-by-Step Walkthrough
From install to controlling an AI agent on your phone in under a minute.
Install Control-Terminal
Run the one-line install command. It downloads the script, installs dependencies (tmux, ttyd), and adds control-terminal to your PATH. You are ready to go in seconds.

Choose Your Agent and Launch
Run control-terminal, pick an agent (Codex, Claude, or custom), and optionally enable the Cloudflare tunnel for remote access. The tool starts a tmux session, launches ttyd, and prints your local and public URLs.

Access from Desktop Browser
Open the generated Cloudflare tunnel URL in any desktop browser. You get a full interactive terminal session with your AI agent running live. Give it tasks, approve commands, and watch it work.

Control from Your Phone
Open the same URL on your mobile phone. The terminal is fully interactive: type prompts, approve actions, and manage your agent from anywhere. If your connection drops, reconnect without losing progress.

Real Results on Your Machine
Everything the agent does happens on your local machine. Files are created, code is executed, and changes persist. Here the agent created a Python file that is visible in the local file explorer.

Quick Start
Two commands to get up and running.
curl -fsSL https://raw.githubusercontent.com/kumar045/Control-PC-Terminal/main/install.sh | bashcontrol-terminalAgent Selection
After running the command, you will be prompted to choose an agent:
Choose which agent to run:
1) codex
2) claude
3) other
After selecting, Control-Terminal starts the agent in a tmux session, exposes it via ttyd at http://localhost:7681, and optionally creates a Cloudflare tunnel for remote access.