Skip to content

CLI reference

hmk is Hammock’s command line: it works from any terminal on a Mac or Linux machine running the Hammock Server (see The CLI for installing it). This page is hmk help, sorted. For a guided tour, see The CLI.

Groups, tabs and panes, and what’s in them.

Terminal window
hmk ls [--json] [--on COMPUTER]

List Groups, tabs and panes (–json: for scripts, with each agent’s state and whether you’ve seen it; –on: only that linked computer’s, or “this”).

Terminal window
hmk focus PANE|TAB

Show a pane (or a tab’s focused pane) in the Mac app.

Terminal window
hmk group new [NAME] [--on COMPUTER] [--folder DIR]

Create a Group (on a linked computer); –folder: its tabs open in DIR, and it’s named after DIR unless NAME is given.

Terminal window
hmk group rename GROUP NAME
Terminal window
hmk group icon GROUP [EMOJI]

Set (or with no emoji, clear) a Group’s emoji.

Terminal window
hmk group icon GROUP --image FILE

Set its picture (kept in Hammock; an emoji shows instead if set; a project’s .hammock/icon.png shows when none is) | –no-image.

Terminal window
hmk group folder GROUP [DIR]

Show (or set) where a Group’s new tabs open; it follows the folder you last worked in there.

Terminal window
hmk group move GROUP INDEX

Move a Group (yours or shared with you) in the sidebar.

Terminal window
hmk group rm GROUP
Terminal window
hmk tab new [GROUP] [--name N] [--cwd DIR] [--wait] [-- CMD...]

Open a tab (in GROUP, by default the one this runs in); –wait: until CMD ends, exiting with its status (a clean exit closes the tab, a failure stays open to be read); 125 if its terminal couldn’t start.

Terminal window
hmk tab rename TAB NAME
Terminal window
hmk tab name NAME

Name the tab this runs in (for agents; unnamed tabs are named automatically).

Terminal window
hmk tab merge TAB INTO [--down]

Put a tab’s panes beside (or below) another tab’s.

Terminal window
hmk tab break PANE

Move a pane out into a tab of its own.

Terminal window
hmk split PANE [--down|--left|--up] [--cwd DIR] [--wait] [-- CMD...]

Split a pane (to the right by default); –wait as for tab new.

Terminal window
hmk split PANE --float [--cwd DIR] [--wait] [-- CMD...]

Open a pane floating over PANE’s tab.

Terminal window
hmk rotate PANE

Turn the split PANE is in from side by side to stacked, or back.

Terminal window
hmk float PANE [--at X,Y,W,H]

Lift a pane out of its tab’s splits to float over them (–at: where, in fractions of the tab, e.g. 0.5,0.5,0.45,0.45).

Terminal window
hmk dock PANE [--beside PANE [--down|--left|--up]]

Put a floating pane back in the splits (where it came from, or beside another pane).

Terminal window
hmk minimise PANE | restore PANE

Put a floating pane on its tab’s shelf, or bring it back.

Terminal window
hmk floats TAB

Minimise every floating pane in a tab, or restore them.

Terminal window
hmk close PANE|TAB|GROUP
Terminal window
hmk reopen

Reopen the last tab or pane you closed (agents resume their sessions).

Terminal window
hmk rerun PANE

Run an ended pane’s program again, in the same pane: an agent resumes its session.

Terminal window
hmk attach PANE

Attach this terminal (Ctrl-] detaches).

Terminal window
hmk send PANE [TEXT] [--key NAME]... [--enter]

Type TEXT into a pane, then press keys (escape, ctrl-c, up, f2…) and Enter, each on its own.

Terminal window
hmk read PANE [--scrollback]

Print a pane’s screen as text (an editor pane’s: its text).

Terminal window
hmk theme [NAME]

List Hammock’s themes (* the one in use), or use one (any case; custom: your own terminal themes, window theme, agent colour, pane border, sidebar and toolbar colours; those set before, else the current theme’s).

Browser, simulator, log, editor and diff panes

Section titled “Browser, simulator, log, editor and diff panes”

Panes that aren’t terminals.

Terminal window
hmk browser URL [--group GROUP] [--split PANE [--down]]

Open a web page in a browser tab (or split).

Terminal window
hmk nav PANE URL|back|forward|reload|stop

Drive a browser pane.

Terminal window
hmk devtools PANE [--down]

Show a browser pane’s DevTools in a pane beside it.

Terminal window
hmk show FILE|URL [--pane PANE | --split PANE]

Open a file (HTML, Markdown, an image, a PDF) or a page in a browser pane beside this one; again from this pane, it reloads in that one (or one in this tab already on that page); –pane: in that browser pane; –split: beside that pane.

Terminal window
hmk sim [DEVICE] [--group G] [--split PANE]

Open a simulator, or an Android emulator (avd:NAME), in a tab (or split).

Terminal window
hmk sim list | shot PANE [FILE] [--pixels] [--clipboard] | tap PANE X Y | type PANE TEXT | button PANE NAME | shutdown PANE
Terminal window
hmk sim remote PANE BUTTON [--repeat N] [--hold MS] | remote PANE swipe DIRECTION

An Apple TV’s remote.

Terminal window
hmk log file PATH | macos | sim [DEVICE] | logcat | -- CMD...

[–group G | –split PANE] open a log pane (macos, sim: [–process P] [–predicate P] [–level info|debug]; logcat: [–serial S]).

Terminal window
hmk log read PANE [TEXT] [--level L,...] [--process P] [--tag T] [--limit N] [--follow] [--json]

A log pane’s entries, filtered (TEXT: words, or /regex/).

Terminal window
hmk log clear PANE

Forget a log pane’s entries.

Terminal window
hmk edit FILE[:LINE[:COL][-LINE[:COL]]] [--to LINE[:COL]] [--down | --tab | --split PANE | --group G] [--large]
[--view source|preview|split]

Open a file in an editor pane beside this one (–tab: in a new tab; outside a pane, always), with those lines selected; one in the tab already on that file is reused; –large: over 5 MB; –view: Markdown rendered (preview), or beside its source (split).

Terminal window
hmk edit --read PANE [--numbers] [--lines FROM-TO] [--json]

An editor pane’s text, unsaved edits included (–json: with its file, whether it’s saved, and the selection).

Terminal window
hmk edit --select PANE LINE[:COL][-LINE[:COL]]

Select lines in an editor pane (LINE alone: all of it) and scroll to them.

Terminal window
hmk edit --set-view PANE source|preview|split

Show an editor pane’s file as its source, rendered (Markdown), or both.

Terminal window
hmk diff [REV | FROM..TO | FROM...TO] [--uncommitted | --branch [--base B] [--with-uncommitted]]
[--repo DIR] [--split | --unified] [--ignore-whitespace] [--beside PANE [--down] | --group G]
[--name NAME] [--wait]

Open a git diff to review in a new tab after this pane’s (–beside: split beside a pane). With no REV: this branch against its base, uncommitted changes too, or on the default branch what’s uncommitted; REV: one commit; –wait: until closed.

Terminal window
hmk review [list [--all] | show [REVIEW|PANE] [--all-threads]] [--json]

The comment threads on diffs: yours (sent to you, or on diffs you opened), open ones.

Terminal window
hmk review reply THREAD TEXT | address THREAD [NOTE] | comment [REVIEW|PANE] FILE:LINE[-LINE] TEXT

Answer a thread, mark it addressed (the user resolves it), or start one on a diff’s new side.

Terminal window
hmk review wait [REVIEW|PANE] [--timeout S]

Until the user sends comments or resolves threads.

Starting, finding and resuming agents, and what they may do.

Terminal window
hmk agent [AGENT] [--dir DIR] [--group GROUP] [--on COMPUTER] [--worktree NAME] [PROMPT]

Start an agent in a new tab (in DIR, by default here), in GROUP or the folder’s Group (or a new one); –on a linked computer (there, DIR is absolute or ~/…, its home; by default ~); no AGENT: the computer’s default-agent; –worktree: in a new git worktree of DIR’s repository called NAME (one there is reused), made the repository’s own way (.hammock/config, a worktree recipe, the agent’s own –worktree, else git worktree add on branch NAME).

Terminal window
hmk switch PANE AGENT

Continue a pane’s agent session in another agent.

Terminal window
hmk sleep [PANE]

Put a pane’s idle agent to sleep, by default this pane’s: its process ends, freeing its memory, until it’s woken (the apps’ Wake button, typing in it, or hmk wake); agent-sleep in the config file does it by itself.

Terminal window
hmk wake [PANE]

Wake a sleeping agent now.

Terminal window
hmk session-link [PANE]

Print the web link to a pane’s agent session (Claude Code’s Remote Control), by default this pane’s.

Terminal window
hmk sessions [QUERY] [--limit N] [--json] [--folder DIR] [--group GROUP] [--everywhere] [--on COMPUTER]

Find agents’ sessions on this Mac, or a linked computer (an agent: its project’s; –everywhere asks you); –group: only those in the folders open in GROUP.

Terminal window
hmk sessions read ID [QUERY] [--limit N]

A session’s messages matching QUERY (with those around them), or its latest (every word, by its start, in titles, folders and conversations).

Terminal window
hmk resume ID [--in AGENT] [--group GROUP] [--on COMPUTER]

Resume a session in a new tab in its folder’s Group (or in the other agent, converted); –on: a linked computer’s.

Terminal window
hmk grant allow|always|deny ID

Answer an agent’s permission request.

Terminal window
hmk audit [N]

Show the last N audited agent and remote actions.

Terminal window
hmk automation [ls]

List automations: an agent’s prompt, or a command, run on a schedule or when something happens, each run a new tab in its Group.

Terminal window
hmk automation add [NAME] (--at HH:MM [--days weekdays|weekends|mon,tue…] | --cron EXPR | --once WHEN)
[--claude|--codex|--AGENT|--command] [--dir DIR] [--group G] [OPTIONS] -- PROMPT|COMMAND

Add one (an agent’s add or edit asks you first; hmk automation help lists the options).

Terminal window
hmk automation add … --trigger T [--events-only] [--cooldown S] -- PROMPT|COMMAND

Run it when something happens: a GitHub event, an agent finishing, a command failing, a log line, files changing, a calendar event, Slack, its webhook (hmk automation help lists them).

Terminal window
hmk automation edit|show|run|pause|resume|skip|rm NAME

Change, see (its runs), run now, pause, skip the next run, delete.

Terminal window
hmk automation webhook NAME [--new]

Print its webhook’s URL (–new: a new secret).

Terminal window
hmk trigger NAME [--data TEXT|-|@FILE]

Run an automation now as an event, data (- for stdin) what happened: its cooldown applies, and the run gets the data.

Terminal window
hmk hook HARNESS [EVENT]

Forward an agent hook event (stdin or JSON arg).

Terminal window
hmk hooks print

Show hook config for Claude Code and Codex (install covers the rest).

Terminal window
hmk hooks install [--dry-run [--json]] [--harness claude,codex,…]

Add Hammock hooks to your agents’ config.

Terminal window
hmk hooks install --uninstall

Remove them again.

Terminal window
hmk mcp

Run the MCP server on stdio.

Your phone, your other computers, and other people.

Terminal window
hmk remote on|off

Allow paired devices (and linked computers) on the networks chosen; off, nothing connects here (links go out only from here).

Terminal window
hmk remote restart

Listen again, with the same settings, while it’s on (when phones or computers can’t reach this one).

Terminal window
hmk remote networks [--json]

The networks remote access may listen on (* chosen), and extra addresses.

Terminal window
hmk remote enable|disable NETWORK

Listen on a network, or stop: tailscale, or a subnet (192.168.1.0/24).

Terminal window
hmk remote address add|remove HOST[:PORT]

An extra address to give out (a DNS name, a VPN endpoint, a forwarded port).

Terminal window
hmk pair [--print|--json]

Show a pairing code for a new device in the Mac app (off a Mac, or with –print: print it here as a QR code, outside agents and shared Groups; –json: the link and a QR PNG).

Terminal window
hmk devices [revoke ID] [--json]

List or revoke paired devices.

Terminal window
hmk link

List your computers on your tailnet (same Tailscale user) and Hammock on your chosen local networks (Bonjour).

Terminal window
hmk link COMPUTER|ADDRESS|LINK

Link another computer of yours: each shows the other’s Groups (check the code on both; it links with the rest too).

Terminal window
hmk link COMPUTER --out-only|--both-ways

With remote access off here: keep it off (only this one sees the other’s Groups), or turn it on (both ways).

Terminal window
hmk link --accept | --invite

Answer a link asked from another computer (for one without the app) | print a link to this computer.

Terminal window
hmk link --again COMPUTER

Link again one that doesn’t link with this one, waits for its code, or whose certificate changed.

Terminal window
hmk link pending [--json]

Computers asking to link here, with their codes.

Terminal window
hmk link confirm|refuse ID|CODE

Answer one: confirm only if the code matches the other’s (typing the code shown there confirms the one it matches).

Terminal window
hmk computers [--json]

List your linked computers.

Terminal window
hmk computers unlink COMPUTER|this

Unlink a computer from all of them (this: this one).

Terminal window
hmk computers remove COMPUTER

Forget one that doesn’t link with this one, here only.

Terminal window
hmk computers tint COMPUTER #RRGGBB|none set a computer's badge colour (none: neutral)
Terminal window
hmk computers icon COMPUTER ICON

Set its badge’s icon: an SF Symbol’s name (macmini), an emoji, or default (its kind’s symbol).

Terminal window
hmk share GROUP [--new|--off]

Print a Group’s invite link (–new replaces it, –off stops it).

Terminal window
hmk share

List who’s in your shared Groups, and who’s asking to join.

Terminal window
hmk approve ID drive|view|decline

Answer a join request.

Terminal window
hmk unshare [GROUP]

Stop sharing a Group (or every Group: everyone is disconnected).

Terminal window
hmk join LINK

Join a Group someone shared (waits for them to let you in).

Terminal window
hmk leave GROUP

Leave a Group shared with you.

The Hammock Key, and SSH in Hammock’s panes.

Terminal window
hmk key [show|pub]

This Mac’s Hammock Key: an SSH key in its Secure Enclave that signs only when you approve (Touch ID here, or your phone).

Terminal window
hmk key create|delete

Make or delete it (Touch ID).

Terminal window
hmk key allow|disallow DEVICE

Let a paired phone approve it (Touch ID), or stop it.

Terminal window
hmk key copy-id [USER@]HOST

Add it to a server’s authorized_keys (ssh-copy-id).

Terminal window
hmk ssh setup [--apply] [--apply-jj]

How ssh, git and jj signing in Hammock’s panes reach Hammock’s agent (–apply: add Hammock’s block to ~/.ssh/config; –apply-jj: add Hammock’s file to jj’s config, so jj can sign with the Hammock Key).

Running Hammock itself.

Terminal window
hmk tui

Full-screen UI with mouse support (Ctrl-B prefix, Ctrl-B ? for keys).

Terminal window
hmk stop [--panes] | start | restart

Stop or start the Hammock Server (panes keep running unless –panes, which ends them too; an open Hammock app starts it again).

Terminal window
hmk status [--json]

Whether the Hammock Server is running, and its Groups, remote access and linked computers (exits 3 when it isn’t running).

Terminal window
hmk service install|uninstall|status

Linux: run the Hammock Server as a systemd user service, from boot.

Terminal window
hmk docs [--print]

Open Hammock’s documentation in your browser (–print, or where nothing can open it: print its address).

Terminal window
hmk acknowledgements [NAME | --all]

The third-party software in Hammock and its licences (NAME: one’s licence text; –all: every one’s).

Other commands.

Terminal window
hmk window open pane|tab|group [REF]

Show a pane, tab or Group in a window of its own in the Mac app (the same one, not a copy; closing it closes nothing); with no REF, the one this runs in.

Terminal window
hmk files [FOLDER] [--reveal PATH] [--right | --tab | --split PANE | --group G]

Open a files pane (a folder’s tree; no FOLDER: the Group’s, followed as it changes) on this pane’s left (–right: its right; –tab: a new tab); with one in the tab already, –reveal shows PATH in it.

Terminal window
hmk worktree remove [DIR] [--force]

Remove a git worktree (by default this folder’s) the repository’s own way, and close the tabs in it (–force: with uncommitted changes).

Terminal window
hmk limits

Agents that stopped at their usage limit, and when each carries on (agent-resume-after-limit in the config file).

Terminal window
hmk limits cancel [PANE]

Don’t have a pane’s agent carry on when its limit resets, by default this pane’s.

Terminal window
hmk slack [status|connect|disconnect]

Slack for automations’ Slack triggers: connect reads your Slack app’s two tokens from stdin (hmk slack help says how to make it).

Terminal window
hmk import herdr [--dry-run [--json]] [--only WORKSPACE,...]

Bring herdr’s workspaces into Hammock: each a Group, with its tabs, splits, folders and names, its agents’ conversations resumed (–dry-run: what it would make; –only: some, by id).

Terminal window
hmk report STATE [MESSAGE] [--progress N] [--id ID] [--title T] [--app NAME] [--kind KIND]

Tell the terminal what this script is doing (OSC 7501): idle, working, done, blocked (on you: –kind permission|question|auth), error, or clear; Hammock shows it on the pane and in Needs You.

These docs describe Hammock 2026.11.0. What's new