DEV Community

Kewton
Kewton

Posted on Edited on

CommandMate: Maximize AI Coding Throughput Away from Your Desk

AI coding agents can now run for tens of minutes—or hours—on a single task. Most developers, however, cannot sit continuously in front of a desktop monitor waiting to answer prompts, inspect files, and verify whether "I'm done" actually passed tests.

Even when you stay at your desk, running multiple CLI sessions quickly fractures your focus across terminal tabs, file explorers, image viewers, and separate editor windows. When you step away, sessions stall silently on confirmation prompts until you return.

CommandMate (MIT-licensed, running on your own machine, checked as of v0.55.0) solves both problems by turning the coding agent CLIs you already use into one self-contained workspace. You stay in control of the direction and approvals—at your desk or from your phone—while everything from prompt to file inspection finishes inside CommandMate.

Series: Building CommandMate

  1. What is CommandMate? (This post)
  2. Mobile Workflow with Tailscale & Cloudflare Tunnel
  3. Autonomous AI Coding Agent Team (Coming soon)
  4. Persistent Memory & Automated Retrospectives (Coming soon)

Want to try CommandMate in 1 minute? Run npx commandmate@latest locally or paste the setup prompt in Zero-Friction Setup into your coding agent, or visit Kewton/CommandMate.

Scope and Prerequisites

This post introduces the core philosophy, minimal setup, and everyday features of CommandMate for individual developers using CLI coding agents (such as Claude Code, Codex, or Command Code).

Prerequisites:

  • OS: macOS, Linux, or Windows (WSL2; native Windows is not supported because CommandMate builds on tmux)
  • Runtime: Node.js v22+, npm, git, and tmux
  • Your own CLI subscription or API access: Bring your existing accounts (BYOS); CommandMate does not resell tokens or wrap models behind another billing layer

What this post does not cover:

  • Remote tunnel configuration and mobile security checklists (covered in Part 2)
  • Multi-agent 5-role team orchestration and verification gates (covered in Part 3)
  • Cross-session typed memory and automated retrospectives (covered in Part 4)
  • Replacing your CI or test suite—running agents in parallel without checks only multiplies review effort

The Three Bottlenecks Away from Your Desk

When I first shifted from single-session prompting to running multiple coding agents, three practical bottlenecks showed up almost immediately:

  1. You cannot sit at the desk for hours. Work blocks are fragmented by day jobs, meetings, or family life. When an agent pauses on a question 10 minutes after you step away, the session sits idle until you return.
  2. Idle and waiting look identical from the outside. With several sessions running in parallel, you spend more time polling terminal tabs to check which agent is still thinking and which one is blocked on a y/n prompt than actually steering the work.
  3. Context switching breaks the flow, and summaries are not evidence. Copying file paths out of a terminal to open them in an editor, hunting down generated screenshots or videos in Finder, or trusting an agent's "all done" message without inspecting diffs adds friction at every turn.

During an 8-day family trip across five prefectures—without opening my laptop once—I tested what happens when those bottlenecks are removed. By filing noticed ideas and bugs into Issues and checking status from my phone for 1–2 minutes once or twice an hour, 109 Issues were filed and 95 were closed during the trip across three repositories (75 of them closed the same day, with a median turnaround of 3.7 hours).

That experience convinced me to optimize for decision throughput in small time windows rather than uninterrupted hours at a desk.

Core Design Philosophy: Self-Contained and Non-Invasive

CommandMate is built around four design choices.

1. Everything Finishes Inside CommandMate

A core goal of CommandMate is that you do not need to bounce between tmux panes, an IDE, and file viewers just to review an agent's turn.

  • Terminal / Chat Surface Toggle (Cmd/Ctrl + Shift + M): Switch any split seamlessly between the raw tmux terminal screen (for TUI pickers and pagers) and a structured Chat view where tool calls fold into expandable chips.
  • Direct File Navigation from Chat & File Tree: File paths referenced in agent Markdown responses link directly into the built-in File Tree and File Viewer inside the same window.
  • Built-in Image and Video Viewing: When an agent generates or edits images or screen recordings, CommandMate renders them inline in chat and in dedicated viewers without leaving the browser.
  • Desktop Parity on Your Phone: Everything you can do on desktop—switching sessions, viewing files, checking images or logs, answering prompts, and managing notes—is also available in the mobile web UI (explored in detail in Part 2).

CommandMate desktop UI showing the branch sidebar on the left, Chat surface with clickable file links and folded tool chips in the center, and the File Tree panel on the right

2. Don't Get in the Way of the Agents (BYOS)

Frontier coding CLIs evolve every week. Instead of re-implementing an agent loop from scratch and locking you into custom system prompts, CommandMate launches the official CLIs you already use inside tmux sessions—supporting 8 agent families (claude, codex, gemini, vibe-local for Ollama, opencode 1.x & V2, copilot, antigravity, and command-code, as of v0.55.0).

Note: For Google Antigravity (agy), consumer-plan Terms of Service restrict driving it via third-party software or other agents. CommandMate enforces an explicit declaration (CM_ANTIGRAVITY_USAGE=api-key or enterprise) before allowing agent-driven routing or schedules on agy.

3. Clean Isolation via Git Worktree

Each task or branch gets its own Git worktree and dedicated tmux sessions. Two agents working on separate Issues never overwrite each other's working tree, and each worktree maintains its own session state, notes, and history.

4. Three Progressive Levels—Stop Where You Need

CommandMate scales with how much coordination you actually want:

Level What CommandMate does Your role
1 — Parallel Runs several agent CLIs side by side from one place with waiting alerts Operator: answer each agent
2 — Delegate Hands over Issues as task contracts and decides completion via repo checks Tech lead: define scope and accept passing PRs
3 — Manage Coordinates a 5-role team through a PM agent with Milestone tracking Owner: set direction and approve decisions

Most solo developers only need Level 1 or Level 2. Nothing forces you to climb to Level 3 unless your throughput demands it.

Zero-Friction Setup: Let Your Agent Install It

If you just want to try CommandMate interactively in a few seconds without a global install, run:

npx commandmate@latest
Enter fullscreen mode Exit fullscreen mode

For daily use, the fastest setup is to let your existing coding agent (Claude Code, Codex, or Command Code) walk through the official setup guide with you, asking your confirmation before installing anything or changing network access:

Read https://kewton.github.io/CommandMate/setup.md and help me set up CommandMate on this machine. Explain each step before you run it, and ask me before you install anything or open access from the internet.
Enter fullscreen mode Exit fullscreen mode

If you prefer installing manually:

npm install -g commandmate
commandmate init --defaults
commandmate start --daemon
commandmate status
Enter fullscreen mode Exit fullscreen mode

Then open http://127.0.0.1:3000 in your browser (use 127.0.0.1 rather than localhost, since CommandMate binds IPv4 loopback by default).

Everyday Core Features

Once a repository is registered under Repositories -> Add Repository, your daily loop stays lightweight from both the web UI and CLI.

Managing Sessions and Answering Prompts

Each worktree in the sidebar displays a live status dot and a Ready for work badge when an agent finishes a turn or blocks on a confirmation prompt—separately from sessions still generating output.

From the CLI (or scripts), the Level 1 primitives map directly to the UI:

# List worktrees and session status
commandmate ls

# Send an instruction to a specific instance in a worktree
commandmate send <worktree-id> "Investigate issue #42 and propose a fix" --instance claude

# Inspect current output or answer a waiting prompt
commandmate capture <worktree-id> --instance claude
commandmate respond <worktree-id> "yes" --instance claude
Enter fullscreen mode Exit fullscreen mode

Scheduled Execution via CMATE.md

For recurring checks, overnight runs, or morning triage while you are away from your desk, CommandMate includes built-in scheduled execution controlled by a CMATE.md file placed at the root of a worktree.

CommandMate polls CMATE.md every 60 seconds and executes matching cron entries directly, recording outputs in Execution Logs:

## Schedules

| Name | Cron | Message | CLI Tool | Enabled | Permission |
| --- | --- | --- | --- | --- | --- |
| morning-triage | 0 8 * * 1-5 | Summarize open PR failures and blocked worktrees | claude | true | plan |
Enter fullscreen mode Exit fullscreen mode

This lets basic automation live as a plain Markdown table inside the repository rather than external cron scripts.

What CommandMate Does Not Replace—and Next Steps

CommandMate is a local workspace and coordination layer, not magic:

  • It does not keep running as a cloud service: If your machine reboots or sleeps, tmux processes stop; what survives is the repository, DB state, and logs.
  • It does not write your tests: Parallel agents without automated lint, typecheck, and test suites only push review overhead onto you.
  • It does not silently approve destructive actions: You decide when to enable opt-in guardrails like time-boxed Auto-Yes.

Try This Today (3 Steps)

  1. Run npx commandmate@latest (or install globally via npm install -g commandmate).
  2. Register one repository that already has tests, and open its Chat surface + File Tree.
  3. Run a second session (such as Codex alongside Claude Code) on a separate worktree and check how switching between them feels without touching raw tmux.

In Part 2, we will walk through exposing this local workspace safely to your phone using commandmate remote (Tailscale vs. Cloudflare Tunnel), using mobile File Tree / Notes without losing desktop speed, and setting boundaries for Auto-Yes.


Meta note: The outline and factual verification of this article against the CommandMate v0.55.0 codebase were prepared with AI agent assistance, then reviewed and edited by hand.

Top comments (0)