Navigation

CLI Reference

The hammurabi CLI provides command-line access to HamBros features including agent onboarding, quest management, worker dispatch, memory operations, and cron scheduling.

Installation

The CLI is included in the HamBros monorepo as @hambros/cli:

# From the HamBros root
pnpm --filter app run build:deps

The CLI binary is available at packages/cli/bin/hammurabi.mjs.

Commands


hammurabi onboard

Interactive setup wizard that configures AI agents to send telemetry to your HamBros instance.

hammurabi onboard

The wizard prompts for:

  • Hammurabi endpoint — URL of your HamBros instance (default: https://hammurabi.gehirn.ai)
  • API key — authentication key
  • Agent selection — which agents to configure (multi-select)

Supported agents:

  • Claude Code (auto-configured)
  • Codex (auto-configured)
  • Cursor (auto-configured)
  • Terminal CRI (manual setup)
  • Anti-Gravity (manual setup)

Configuration is saved to ~/.hammurabi.json.


hammurabi quests

Manage the commander quest board.

Requires HAMMURABI_COMMANDER_ID environment variable for list operations.

quests list

HAMMURABI_COMMANDER_ID=<uuid> hammurabi quests list

List pending and active quests.

quests create

hammurabi quests create \
  --instruction "Fix the login page redirect bug" \
  --cwd /path/to/project \
  --mode default \
  --agent claude
FlagRequiredDescription
--instructionYesTask description
--cwdYesWorking directory
--modeYesPermission mode
--agentYesAgent type (claude, codex)
--skillsNoComma-separated skill list
--sourceNoOrigin identifier
--issueNoGitHub issue URL
--noteNoInitial note

quests delete <id>

Delete a quest by ID.

quests claim <id>

Mark a quest as active.

quests note <id> "<text>"

Add a progress note to a quest.

quests done <id> --note "<text>"

Mark a quest as completed with a completion note.

quests fail <id> --note "<text>"

Mark a quest as failed with a failure note.

quests artifact add <id>

hammurabi quests artifact add <quest-id> \
  --type github_pr \
  --label "Fix PR" \
  --href https://github.com/org/repo/pull/43

Artifact types: github_issue, github_pr, url, file

quests artifact remove <id> <href>

Remove an artifact from a quest.


hammurabi workers

Manage factory worker sessions.

workers list

List active factory workers.

workers dispatch

hammurabi workers dispatch \
  --session main-session \
  --issue https://github.com/org/repo/issues/42 \
  --branch fix-issue-42 \
  --task "Fix the login redirect bug" \
  --agent claude
FlagRequiredDescription
--sessionYesParent session name
--issueYes*GitHub issue URL
--branchYes*Feature branch name
--taskNoTask description
--machineNoTarget machine ID
--agentNoAgent type (default: claude)

*At least one of --issue or --branch is required.

workers kill <name>

Kill a worker session by name.

workers status <name>

Get worker session status.

workers send <name> "<text>"

Send a message to a running worker.


hammurabi memory

Manage commander memory.

memory find

hammurabi memory find --commander <id> "authentication redirect"
FlagRequiredDescription
--commanderYesCommander ID
--topNoNumber of results to return

memory save

hammurabi memory save --commander <id> "Auth redirects require URL encoding"

Multiple facts can be saved:

hammurabi memory save --commander <id> \
  "Auth redirects require URL encoding" \
  --fact "Login page uses /callback as redirect path"

memory compact

hammurabi memory compact --commander <id>

Consolidates memory, extracts facts, and prunes stale entries.


hammurabi cron

Manage scheduled tasks.

cron list

hammurabi cron list --commander <id>

cron add

hammurabi cron add \
  --commander <id> \
  --schedule "0 9 * * *" \
  --instruction "Review open PRs" \
  --agent claude \
  --name daily-review
FlagRequiredDescription
--commanderYesCommander ID
--scheduleYesCron expression
--instructionYesAgent prompt
--nameNoTask name
--agentNoAgent type
--session-typeNostream or pty
--permission-modeNoTool approval behavior
--work-dirNoWorking directory
--machineNoTarget machine
--disabledNoCreate in disabled state

cron update <id>

hammurabi cron update <cron-id> \
  --schedule "0 */6 * * *" \
  --enabled false

cron delete

hammurabi cron delete --commander <id> <cron-id>

cron trigger

HAMMURABI_COMMANDER_ID=<uuid> hammurabi cron trigger \
  --instruction "Run the daily report now"

hammurabi commander

Initialize and configure commander instances.

commander init

hammurabi commander init

Interactive setup that creates a local COMMANDER.md configuration.

commander init --remote

hammurabi commander init \
  --remote https://your-server.com \
  --token sync-token-123 \
  --commander <id> \
  --poll-interval 30

Initialize with remote sync to a HamBros server.