Skip to content

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.

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.

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:

Terminal window
pane=$(hmk split "$HMK_PANE_ID" --down -- npm run dev)

For scripts, hmk ls, hmk status, hmk sessions and others take --json.

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.

Terminal window
hmk group new app --folder ~/Developer/app # a Group whose tabs open in that folder
hmk tab new app --name server -- npm run dev # a tab in it, running a command
hmk split pn_k3 --down -- npm test # a pane below another

Without a command, a tab or split runs your shell. --float floats a split over the tab.

--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.

Terminal window
hmk tab new --name review --wait -- tig
Terminal window
hmk send pn_k3 "npm test" --enter # type a command and press Enter
hmk send pn_k3 --key ctrl-c # press Ctrl-C
hmk read pn_k3 --scrollback # the pane's text
hmk attach pn_k3 # use it from this terminal; Ctrl-] detaches

hmk close closes a pane, tab or Group, and hmk reopen brings back the last one you closed.

Terminal window
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.

Terminal window
hmk sessions auth # earlier sessions mentioning "auth"
hmk resume ID --in codex # resume one, here in another agent

hmk 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.

A few lines of shell and jq go a long way. This lists the agents waiting for you:

Terminal window
hmk ls --json | jq -r '
.groups[].tabs[].panes[]
| select(.agent.state == "needs_input")
| "\(.id) \(.title)"'

Your panes run in the Hammock Server, hmkd, which keeps going when you quit the app.

Terminal window
hmk stop # stop the server; panes keep running
hmk stop --panes # stop it and end every pane
hmk restart

An 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