Skip to main content

Agent Control CLI

Liney ships a small liney command-line interface that talks to the running app over a local socket. It turns Liney from a place where you watch agents into a place where agents can drive each other: an AI coding agent in one pane can discover its siblings, read their output, and hand them work — without you tab-flipping between windows.

This is the surface that makes a Liney workspace self-driving.

Installing the liney command

The Liney app binary is itself the CLI. Expose it on your PATH:

sudo ln -sf /Applications/Liney.app/Contents/MacOS/Liney /usr/local/bin/liney

After that, liney ... works from any shell, and especially from inside a Liney pane (where Liney injects the context the commands need).

The commands

CommandWhat it doesNeeds a token?
liney session listEvery pane across all workspaces: cwd, branch, listening ports, statusNo
liney agentsOnly panes that host a detected or self-reported agentNo
liney read --pane <id>The rendered terminal text of a paneNo
liney status <state>Report your own agent state (running/waiting/done/error)No
liney notifySend a notification to the dynamic islandNo
liney send-keys <id> <text>Type text / keys into a paneYes
liney open <repo>Open a repository or switch worktreeYes
liney splitSplit a paneYes

The read-only and self-report commands need no token — the control socket is already owner-only. The commands that change the workspace (send-keys, open, split) require a trust token, and Liney injects it into every pane as LINEY_CONTROL_TOKEN once you enable Settings → URL Scheme, so an agent running in a pane needs no manual setup.

Reporting status (the attention signal)

When an agent in a pane needs you — or finishes — it can say so:

liney status waiting --title "Approve running the migration?"
liney status done
liney status error --title "build failed"

A waiting, done, or error report surfaces on the Dynamic Island so you can see which agent is blocked at a glance, instead of checking each pane. The state also shows up in liney session list and liney agents.

Reading and coordinating siblings

From one agent's pane, find the others and read what they are doing:

# Which panes host an agent, and what state are they in?
liney agents --json

# Read a sibling pane's last 80 lines; wait until its TUI stops painting
liney read --pane <uuid> --last 80 --wait-stable --json | jq -r '.text'

# Hand it a command
liney send-keys <uuid> 'npm test\n'

liney agents combines two signals: passive detection from each pane's process tree (so an agent that never reports status still appears, marked reported: false) and the authoritative liney status self-reports (reported: true). liney read pulls text straight from the terminal buffer; add --scrollback to include history, or --wait-stable to avoid catching a half-rendered frame.

Teaching an agent to use it

The repository ships a liney-cli skill (skills/liney-cli/SKILL.md) that packages the inspect → read → send loop, so a coding agent like Claude Code knows when and how to drive Liney. Install it into your agent and it will reach for liney on its own when you ask things like "check what the agent in my other split is doing" or "tell the build pane to rerun the tests."

See also