Open Source CLI Tool

Control-Terminal

Run local AI agents with a web terminal using tmux + ttyd. Control Claude, Codex, or any CLI agent from your mobile phone.

Session Persistence
Mobile Access
Cloudflare Tunnel

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.

AI Agenttmux sessionttyd web UIcloudflared tunnelYour Phone

Step-by-Step Walkthrough

From install to controlling an AI agent on your phone in under a minute.

1

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.

Terminal showing the install process: curl command, dependency checks, and installation complete message
2

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.

Terminal showing agent selection menu, Cloudflare tunnel activation, public URL, and ttyd launch logs
3

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.

Desktop browser showing Codex agent running through a Cloudflare tunnel URL, creating a Python file
4

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.

Mobile phone browser showing full Codex interaction: creating files, running Python scripts, and getting output
5

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.

Windows file explorer showing the test_1.py Python file created by the Codex agent in the projects folder

Quick Start

Two commands to get up and running.

Install
curl -fsSL https://raw.githubusercontent.com/kumar045/Control-PC-Terminal/main/install.sh | bash
Run
control-terminal

Agent 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.