Skip to content
intent-hqPublic

About

Command-line interface for Intent workspaces, agents, notes, and remote daemons

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Intent CLI (@intent-hq/cli)

Command-line interface for working with local and remote Intent daemons (intentd) — workspaces, agents, specs, notes, tasks, scripts, and attention triage.

Requirements

  • Node.js >= 20 and pnpm >= 10
  • For --host local: a running local intentd daemon (connects directly to intentd.sock on Linux/macOS; falls back to intentd on PATH on Windows)
  • For remote hosts: a paired intentd with the WebSocket API enabled (connects over TLS-pinned WSS on all platforms)

Install (local development)

pnpm pack
pnpm add -g ./intent-hq-cli-*.tgz
intent --version

Or link directly from a local checkout:

pnpm link --global
intent --version

Quick start

# Guided workspace creation from any directory (worktree, in-place, or plain folder)
intent new

# Overview of the current workspace (or active workspaces when outside a worktree)
intent status

# List available specialists and resolved models
intent specialist list

# Cross-workspace triage: pending questions, blockers, agent errors, unread workspaces, active streams
intent inbox

# Start an agent and wait for completion (surfaces pending questions, blockers, proposals, and reports)
intent agent start "Summarize failing tests" --specialist developer --wait

# Follow up, inspect logs, or stop a running agent
intent agent send <AGENT_ID> "Include the root cause" --wait
intent agent logs <AGENT_ID> --tools
intent agent stop <AGENT_ID>

# Notes, tasks, scripts, and full-text search
intent spec
intent note add spec "Root cause confirmed." --heading "Findings"
printf '## Findings\n- Root cause confirmed.\n' | intent note add spec --stdin
intent note set spec --file new-spec.md --force
intent task list
intent task update <TASK_ID> --status complete
intent script list
intent script logs <SCRIPT_ID> --lines 100
intent search "sqlite migration"

Host and workspace resolution

  • Host selection order: --host NAME → INTENT_HOST → configured default (intent host use) → local. A selected host that fails stays selected (it never falls back silently to local).
  • Workspace resolution order: --workspace ID → INTENT_WORKSPACE → current working directory worktree match (local host only). Remote hosts always require --workspace or INTENT_WORKSPACE.

Remote intentd hosts

On the remote machine, run intentd pair to generate an intent://pair?... URI, then pair from your terminal:

# Interactive masked prompt (never pass tokens in CLI arguments)
intent host pair studio --use

# Or pipe via stdin
printf '%s\n' "$PAIR_URI" | intent host pair studio --stdin --use

# Manual pairing without a URI (reads token from masked prompt or --stdin)
printf '%s\n' "$TOKEN" | intent host pair studio --address 100.64.1.5 --port 5181 --fingerprint "$FP" --stdin

# Inspect, target, switch, or remove hosts
intent host list
intent --host studio workspace list --active
intent --host studio new
intent host use local
intent host remove studio

Remote connections verify the peer's TLS SHA-256 certificate fingerprint (timing-safe) before sending the HTTP Upgrade or Authorization: Bearer header. Credentials are stored in the OS keychain (security on macOS, secret-tool on Linux) with a 0600 credentials.json fallback, and are never written to hosts.json, CLI arguments, or command output.

Command reference

Run intent -h or intent <command> -h for full syntax. Global flags --json and --host NAME work on all commands.

Command Description Key options
intent new [DIR] Guided interactive workspace creation --provider, --specialist, --model, --effort, --title, --base, --branch, --pr, --prompt | --prompt-file | --stdin, --plain-folder, --skip-isolation, --wait, --timeout
intent status Current workspace overview (falls back to active workspaces outside a worktree) --workspace
intent inbox Cross-workspace attention triage and active streams --limit
intent search QUERY Full-text search across notes and transcripts (global by default; boosts cwd workspace) --workspace, --type all|notes|messages, --limit
intent spec Read the workspace spec note (up to 64 KiB per page) --workspace, --offset
intent host list List local and paired remote hosts
intent host pair NAME Pair a remote daemon over pinned WSS --stdin, --address, --port, --fingerprint, --use
intent host use NAME Set the default host (local or a paired host)
intent host remove NAME Remove a paired host and delete its credential
intent specialist list List available specialists and resolved models --provider
intent workspace list Find and organize workspaces --query, --state, --repo, --active, --group-by repo|state, --sort title|repo|state|newest|oldest, --limit, --cursor
intent workspace show [ID] Show workspace details
intent workspace create Create a workspace (launches interactive wizard in a TTY when --repo-path is omitted; checks for already-checked-out branches) --repo-path, --pr NUM|URL, plus all intent new options
intent workspace archive [ID] Archive a workspace and stop active work
intent agent list List agents in a workspace --workspace, --limit, --cursor
intent agent start [MESSAGE] Create an agent and send its first prompt (up to 512 KiB) --workspace, --prompt-file | --stdin, --specialist, --model, --provider, --effort, --name, --request-id, --wait, --timeout
intent agent send ID [MESSAGE] Queue or send a follow-up message --workspace, --prompt-file | --stdin, --wait, --timeout
intent agent result ID Read latest response or wait for completion (surfaces pending questions, blockers, proposals, and completion reports) --workspace, --wait, --timeout, --after-message-id
intent agent logs ID Read bounded conversation transcript --workspace, --limit, --tools
intent agent stop ID Stop an active agent --workspace
intent note list List workspace notes --workspace, --limit, --cursor
intent note show ID Read a workspace note (up to 64 KiB per page) --workspace, --offset
intent note add ID [TEXT] Append or prepend Markdown to a note (never replaces) --workspace, --file | --stdin, --heading, --position end|start
intent note set ID [TEXT] Replace the full content of a note --workspace, --file | --stdin, --force, --expected-version
intent task list List workspace task notes and stats --workspace, --status, --limit, --cursor
intent task update ID Update a task note status (not_started, waiting, discussion_needed, blocked, in_progress, review_required, complete, cancelled) --status, --workspace
intent script list List workspace scripts and runtime status --workspace, --limit, --cursor
intent script logs ID Read recent log output of a script --workspace, --lines

Environment variables and paths

Variable Purpose
INTENT_HOST Default host alias when --host is omitted
INTENT_WORKSPACE Default workspace ID when --workspace is omitted
INTENTD_SOCKET Explicit path to the local intentd.sock socket
INTENTD_DATA_DIR Override local daemon data dir (socket defaults to <data-dir>/intentd.sock)
INTENT_CONFIG_DIR Override CLI config directory (also uses 0600 file storage instead of OS keychain)
INTENT_CLI_NO_KEYCHAIN=1 Store remote bearer tokens in 0600 credentials.json instead of the OS keychain
NO_COLOR Disable ANSI colors in interactive prompts

Default paths:

  • Local daemon socket (intentd.sock):
    • Linux: $XDG_DATA_HOME/intentd/intentd.sock (default ~/.local/share/intentd/intentd.sock)
    • macOS: ~/Library/Application Support/intentd/intentd.sock
  • Host profiles (hosts.json) and fallback credentials (credentials.json, mode 0600):
    • Linux: $XDG_CONFIG_HOME/intent/ (default ~/.config/intent/)
    • macOS: ~/Library/Application Support/intent-cli/
    • Windows: %APPDATA%\intent-cli\

JSON output & exit codes

Pass --json to any command for a single versioned JSON object ({"schemaVersion":1,"host":...,"data":...} or {"schemaVersion":1,"host":...,"error":...}):

Exit code Meaning
0 Success
1 Operation failure (or turn failure / wait timeout)
2 Usage or argument error
3 Authentication, certificate mismatch, or permission denied
4 Transport unavailable
130 Cancelled interactively (Ctrl-C / Esc)

Testing

pnpm test

Runs test-e2e.mjs against in-process mock UDS and self-signed EC P-256 TLS/WSS daemons (25 end-to-end scenarios).

About

Command-line interface for Intent workspaces, agents, notes, and remote daemons

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages