Skip to content
Yardmaster Guide

Control Yardmaster from scripts (CLI API)

Yardmaster answers commands from programs on this computer at 127.0.0.1:19519. A secret token unlocks them, so treat it like a password.

Advanced3 minutes

While it runs, Yardmaster listens for commands from other programs on this computer, at http://127.0.0.1:19519. Scripts, other AI tools and your own agents use it to list sessions, start one, send a message or change a setting. A secret token unlocks every command except a simple health check.

Find your token#

  1. Open Settings > CLI Control.

  2. On the CLI Control Token card, click Show to see it, or Copy to copy it.

Yardmaster also saves the token in a file, ~/.yardmaster/cli-token (in your home folder), so your scripts can read it from there instead of pasting it. It keeps a second copy at ~/.amc/cli-token for older scripts.

CLI Control TokenSettings, CLI ControlAuthentication token for creating sessions via the local CLI serverOpen in YardmasterOpens Yardmaster. Don't have it? Download

Change the token#

Click Regenerate Token on the same card and confirm. The old token stops working at once, so every script using it fails until you give it the new one. The card shows when the token was created, and the date turns amber once it is more than 90 days old: a good time to regenerate.

Choose what waits for your approval#

Under Approval requirements, each kind of action has its own switch: when it is on, a request from outside waits in your Inbox until you approve it. Most kinds start on, such as changing settings, running a recipe, sending email or texts, and installing plugins. Pausing, snoozing or archiving a session starts off.

Starting a new session is controlled by Require approval for AI session spawn, which starts off, so a script can start sessions without asking. Turn it on if you want to approve each one.

Require approval for AI session spawnSettings, CLI Control · Default: OffOff by default, trusted AI orchestration runs without friction. Turn ON if you want a human-in-the-loop checkpoint before any AI-initiated session spawns.Open in YardmasterOpens Yardmaster. Don't have it? Download

Recent CLI Activity on the same page lists what was done through the API, so you can check what a script or agent did.

Try it#

From a Mac or Linux terminal, this lists your sessions:

bash
curl -H "Authorization: Bearer $(cat ~/.yardmaster/cli-token)" http://127.0.0.1:19519/sessions

Did this help?