CLI

Pull your Hamster Briefs, Tasks, and skills into the same repo your AI coding agents work in — and run Delivery commands without leaving the terminal.

Overview

The Hamster CLI is a single Go binary that turns your Hamster workspace into local markdown your AI coding agents can read directly. Shared account context lands under ~/.hamster/. A one-shot sync for a Brief UUID, slug, or full Studio URL reuses the nearest existing .hamster/ projection, or creates one at the repository root when none exists.

Each project-context sync also generates .claude/skills/hamster-project-context/SKILL.md under the selected base for Claude Code. This context skill does not install the Hamster plugin or create Ask and Ship. Separately, hamster skills sync maintains shared workspace skills under .agents/skills/ and can link them into agent-specific skill directories.

The CLI is a sync engine, not an editor. Editing Briefs, Tasks, and skills happens in Hamster (or, for skills, optionally in your repo with bidirectional sync). Supported CLI write commands let agents update task status and create subtasks from the terminal. The CLI's job is to make that content available to your coding tools. Use it to pull live content before Delivery, update Task status in bulk, create Briefs from your build pipeline, or ask your coding agent for the next unblocked Task and Initiative health against the same live workspace your team sees in Hamster.

The CLI and MCP Server overlap, but neither replaces the other. Normal OAuth exposes 39 full-scope tools: 35 have CLI counterparts and four are MCP-only. Hosted delivery receives eight resource-scoped tools. The separately installed plugin uses the normal OAuth surface for Ask and Ship, and Ship voluntarily calls five tools. The CLI owns local-only workflows such as sync, terminal chat, and the TUI.

What's in this section

  • Install Hamster — Install the plugin in the tool you already use, or hand setup to an AI coding agent
  • CLI Authentication — Install the CLI and connect it to your account
  • CLI Brief Creation — Create Briefs from the terminal, or sync an existing Brief with a targeted hamster sync or the Deliver menu's Hamster plugin prompt
  • CLI Sync — Refresh shared ~/.hamster/ context or create a repository projection for explicitly scoped work
  • Agent Plugin Commands — Use host-native Ask and Ship commands from Claude Code, Cursor, or Codex

Common Commands

Command What it does
hamster auth login Browser sign-in; stores your session in your OS keychain
hamster init Initialize shared ~/.hamster/ context once for all repositories and worktrees
hamster sync [identifier] Refresh shared account context, or pass a Brief UUID, slug, or full Studio URL to reuse the nearest projection or create one at the repository root
hamster sync --watch Keep shared account context current; Brief-scoped sync does not support watch mode
hamster team list, hamster team switch, hamster team members List teams, select the active team, or inspect its members
hamster brief create --title "Title" Create a Brief from the terminal
hamster brief plan <id-or-slug> --generate Start Plan generation for a Brief
hamster brief deliver <id-or-slug> Start Delivery for a Brief
hamster task status <id> <status> Move a Task to a new status
hamster brief update <id-or-slug> --owner <user-uuid> Update brief ownership to a specific user
hamster goal list --status archived List archived goals; without this filter, the command lists non-archived goals
hamster initiative list List active, non-archived initiatives
hamster initiative archive <id> Archive an initiative so it no longer appears in initiative list
hamster search <query> Search Briefs, Notes, Initiatives, Goals, Documents, and Tasks by name
hamster skills sync Bidirectional skill sync — pull updates and push local edits
hamster skills agents Pick which AI agents (Claude Code, Continue, Windsurf, …) get symlinks to .agents/skills/
hamster chat "<request>" Connect local working context with workspace priorities, Blueprints, and related work

Run hamster --help for the full command tree. Most commands pair with an MCP Server tool, so you can use them in scripts and automation the same way an agent would call MCP.

Chat from the Terminal

Use hamster chat to ask questions and take supported workspace actions without leaving the shell. Use --continue when the next request depends on the previous answer.

Responses render Markdown, and workspace references open as clickable links.

hamster chat "List the Briefs assigned to me and show which are approved."
hamster chat --continue "Generate a Plan for each Brief that is missing one. Do not overwrite existing Plans."

When asked to generate missing Plans, Hamster creates each missing Plan and leaves existing Plans unchanged.

Use the installed plugin's agent-native Ask command (/hamster:ask-hamster in Claude Code) for coding-agent requests. It prefers the hosted Hamster MCP server's ask_hamster tool, and falls back to hamster chat when those tools are unavailable and the CLI is installed and signed in, continuing the same terminal conversation for genuine follow-ups.

Skills Sync

The CLI keeps your shared agent skills in sync between your repo and your workspace. hamster skills sync runs in both directions by default:

  • Pull — Fetches new, updated, or removed skills from Hamster. A TUI selector lets you pick which to apply.
  • Push — Detects skills you (or an AI agent) have edited locally and offers to send them back. Conflicts surface a [K]eep local / [U]se remote / [S]kip prompt before anything is overwritten.
  • Asset-aware — Per-file SHA-256 fingerprints catch changes to bundled references and assets, not just the SKILL.md body.

If your IDE or agent expects skills under its own path (.claude/skills, .continue/skills, .windsurf/skills, etc.) instead of the universal .agents/skills/, run hamster skills agents to pick which directories should symlink to the canonical location. Hamster maintains symlinks safely — it never deletes the canonical data even if an agent directory was previously a symlink.

hamster skills sync --pull-only and --push-only flags are available when you want to scope the sync to one direction.

Agent Plugin Commands

Ask and Ship come from the installed Hamster plugin, not from hamster sync. The plugin ships them as the ask-hamster and ship skills; Claude Code namespaces them as /hamster:ask-hamster and /hamster:ship, and other agent surfaces use their own command UX for the same skills. Ask prefers the hosted Hamster MCP the plugin configures, and falls back to hamster chat when those tools are unavailable and the CLI is signed in — same ask path, different transport — so Hamster can connect local working context to your workspace priorities, Blueprints, and related work. Ship uses synced local .hamster/ context and accepts a Brief slug, UUID, full Studio URL, or no argument for an interactive picker. See Agent Plugin Commands.

Where the CLI Runs

The same binary works in two contexts:

  1. Your local machine — Interactive auth, browser login, OS keychain storage.
  2. CI pipelines — Set HAMSTER_ACCOUNT_ID and authenticate with an access token environment variable to skip every prompt.

Auth credentials live in your OS keychain by default (macOS Keychain, Windows Credential Manager, or the Linux Secret Service). On WSL or headless setups without a keychain, the CLI stores them in ~/.hamster/auth.json, protected by user-only directory and file permissions.

Tips

  • Pass a Brief slug, UUID, or even a full tryhamster.com/... URL straight into hamster sync — the CLI parses all three, syncs only that Brief, and reuses the nearest existing projection.
  • .hamster/ and .claude/skills/hamster-project-context/ are git-ignored by default — each carries its own .gitignore, because they are generated and account-specific. Delete that .gitignore if your team wants the synced markdown tracked in git.
  • Run hamster sync --watch in a side terminal during a session — your AI agent always sees the latest Brief and Task state without you needing to remember to re-sync.
  • Use hamster team switch when you move between client workspaces. The CLI cleans the previous team's directory before re-syncing the new one.
  • The CLI checks GitHub Releases for updates on a TTL — when a new version is available, you will see an inline notice on the next command.

Related