The CLI
hmk is Hammock’s command line. It sees and controls the same Groups, tabs and panes as the Mac app, so you can script your workspace, check on agents from a shell, or attach to a pane from another terminal. This page is a tour; every command and option is in the CLI reference, or hmk help.
Where it is
Section titled “Where it is”On a Mac, setup puts hmk on your PATH; if you skipped that, use Install under Settings ▸ General ▸ Command-line tool. On Linux it comes with the Hammock Server: see Installing on Linux.
IDs and names
Section titled “IDs and names”Groups, tabs and panes have IDs starting gr_, tb_ and pn_. Any unique prefix will do (pn_k3 for pn_k3x9q2ma), and Groups and tabs can be named by their titles. Inside a pane, HMK_PANE_ID holds that pane’s ID. Commands that make something print its ID:
pane=$(hmk split "$HMK_PANE_ID" --down -- npm run dev)For scripts, hmk ls, hmk status, hmk sessions and others take --json.
Look at what’s running
Section titled “Look at what’s running”hmk ls lists every Group, tab and pane, with each agent’s state. hmk status says whether the Hammock Server is running, and exits with status 3 if it isn’t. hmk focus PANE shows a pane in the Mac app.
Open things
Section titled “Open things”hmk group new app --folder ~/Developer/app # a Group whose tabs open in that folderhmk tab new app --name server -- npm run dev # a tab in it, running a commandhmk split pn_k3 --down -- npm test # a pane below anotherWithout a command, a tab or split runs your shell. --float floats a split over the tab.
Waiting for a command
Section titled “Waiting for a command”--wait makes hmk tab new or hmk split wait for the command to end and exit with its status, so a script can hand someone a program (a reviewer, an editor) and carry on when they’re done. On success the pane closes; on failure it stays open. Status 125 means the pane couldn’t start, so the command never ran.
hmk tab new --name review --wait -- tigTalk to panes
Section titled “Talk to panes”hmk send pn_k3 "npm test" --enter # type a command and press Enterhmk send pn_k3 --key ctrl-c # press Ctrl-Chmk read pn_k3 --scrollback # the pane's texthmk attach pn_k3 # use it from this terminal; Ctrl-] detacheshmk close closes a pane, tab or Group, and hmk reopen brings back the last one you closed.
Agents
Section titled “Agents”hmk agent claude --dir ~/Developer/app "Fix the failing test in auth"starts an agent in a new tab in that folder’s Group, with a first message. Use its short name: claude, codex, gemini and the others Hammock knows. --on starts it on a linked computer.
hmk sessions auth # earlier sessions mentioning "auth"hmk resume ID --in codex # resume one, here in another agenthmk sleep PANE ends an idle agent’s process to free its memory, and hmk wake PANE (or typing in its pane) starts it again; agent-sleep in the config reference does it automatically. hmk grant answers a permission request, once you allow it in the Mac app or on your phone.
Hooks, automations and MCP have their own pages: Agent setup, Automations and MCP.
Browser, simulator, log, editor and diff panes
Section titled “Browser, simulator, log, editor and diff panes”hmk browser, hmk show, hmk sim, hmk log, hmk edit and hmk diff open the other kinds of pane.
Scripting
Section titled “Scripting”A few lines of shell and jq go a long way. This lists the agents waiting for you:
hmk ls --json | jq -r ' .groups[].tabs[].panes[] | select(.agent.state == "needs_input") | "\(.id) \(.title)"'The Hammock Server
Section titled “The Hammock Server”Your panes run in the Hammock Server, hmkd, which keeps going when you quit the app.
hmk stop # stop the server; panes keep runninghmk stop --panes # stop it and end every panehmk restartAn open Hammock app starts it again by itself. On Linux, hmk service install runs it as a systemd user service.
These docs describe Hammock 2026.11.0. What's new