Baton is now Komla: free and open source. Go to komla.dev →

Baton CLI

Let your agent launch other agents, open browser previews, report its progress, and manage workspaces through the terminal.

baton is already available in Baton-managed terminals, including local and SSH sessions. Keep Baton running and run these commands from a terminal inside your workspace. No separate CLI installation or MCP setup is needed.

Start with a prompt

Ask your agent: “Use the Baton CLI to open a new workspace and investigate the failing build.” It can discover the available commands with baton --help.

Launch an agent

Start a separate task in a new workspace:

baton launch "Investigate the failing build"

Git projects get a separate worktree and branch. Directory-backed projects share their directory.

To open another agent tab in the current workspace, add --here:

baton launch "Review these changes" --here

The new tab uses the same working directory, so both agents see the same files. Launches use your default agent. To choose another, list your configured agents with baton agent presets --json and pass one with --preset, adding --mode for one of its launch modes. By default agents can start only modes that still ask before acting; the robot toggle on each mode in Settings → Agents changes that.

New workspaces branch from the project's base branch. Add --from-current-branch to branch from the current workspace instead, or --branch to name the branch. For a long prompt, pass --prompt-file with a path, or - to read it from standard input.

Open a browser preview

Start your development server first, then open its actual URL in Baton:

baton preview http://localhost:3000

Replace port 3000 with the port your server uses. This opens a preview; it does not start a server.

Update a workspace title

baton title "Build investigation" --description "Trace the failing build"

Use a title that describes the overall task so the workspace is easy to find in the sidebar.

Snooze a workspace

Move the current workspace to the sidebar's Snoozed shelf until later, such as while it waits on a slow job:

baton snooze 2h

Pass a duration (30m, 2h, 1d), a time (17:30, tomorrow if it has passed today), or a date and time ("2026-11-02 09:00"). Times are in the time zone of the computer running Baton, even in an SSH terminal. The workspace comes back marked Woke, or sooner if an agent in it needs input or fails. While an agent there already needs input or has failed, the workspace can't be snoozed. baton wake ends the snooze now, such as when the job finishes.

Show a status in the status bar

Put a short status, such as test results or a pull request, in Baton's status bar while the workspace is open:

baton status set tests "42 passed" --tone success
baton status set pr "PR #128" --link https://github.com/acme/app/pull/128

Setting the same id again replaces the item. Items can also carry an icon (--icon), a tooltip, or a Markdown popover (--popover). Remove one with baton status clear tests, or all of them with baton status clear.

Status bar items you configure with a command, through baton settings apply status-items, run their command on an interval while the workspace is open. baton status refresh <id> runs one of those commands now, such as from a hook when what it shows has changed; items set with baton status set have no command to run.

Get notified when a command finishes

Wrap a long-running command so its tab shows as working, and get a notification when it finishes or fails:

baton notify "Tests" -- npm test

To send a notification for the current workspace yourself, use baton notify "Deploy ready" --body "Staging is up".

Run a GUI app on an SSH host

On a Linux machine without a display, such as an SSH host, baton desktop run starts the app on a virtual desktop of its own and shows it on your computer:

baton desktop run -- firefox

The desktop opens in your VNC app, such as Screen Sharing on macOS, or in a tab of Baton's browser preview with --browser before the app: baton desktop run --browser -- firefox. It stops when the app exits. baton desktop start, status, and stop manage desktops for apps you start yourself.

Change Baton's settings

Agents can read and replace Quick Commands, Workspace Setup, automations, the theme, status bar items, hooks, keyboard shortcuts, terminal settings, and agent presets' extra arguments and effort pickers:

baton settings get shortcuts
baton settings apply shortcuts --file shortcuts.json

apply takes JSON on standard input or from --file, and waits for you to confirm the change in Baton. Quick Commands also need --scope global or --scope current-project.

Teach your agent the CLI

The Baton skill tells your agent what these commands do and how to use them. In Baton, open Settings → Integrations & MCP and turn on Baton skill on this computer, a Lima VM or an SSH host. Baton adds it to ~/.claude/skills and ~/.agents/skills, which Claude Code, Codex, OpenCode and other agents read, and to Antigravity CLI's skills, and keeps it up to date. For another agent, copy the install command under Baton CLI, run it in a terminal and choose your agent.

The skill loads Baton's other guides when a task needs them: baton skill customize for changing Baton itself, such as its theme, Quick Commands, shortcuts and status bar items, and baton skill project-setup for recommending workspace setup steps and Quick Commands for a project. baton skill self-integration prints the guide for connecting an agent CLI that Baton doesn't support out of the box. For a guided tour, choose the Baton CLI demo from Baton's Tips menu.

CLI and MCP

The CLI is the main way agents control Baton: it needs no setup and covers everything on this page. Baton's new features go to the CLI and the Baton skill. Its MCP server stays for agents that only work through MCP tools; it can launch agents, open previews, set workspace titles and show status bar items. Turn it on per agent in Settings. For a client that needs an MCP server command, baton mcp serves Baton's MCP tools over stdio.

More help

Run baton --help or baton launch --help for command options. If the command is unavailable, check that you are in a Baton-managed terminal. Baton also provides its absolute path in the BATON_CLI environment variable.

Commands automatically use the current workspace. If you need Baton-specific project or workspace metadata, or want to investigate an unexpected target, use baton context --json.

If an operation is disabled, check Settings → Integrations & MCP → MCP and CLI access.

Contact us if you need help getting connected.