Skip to content

Queen Shell CLI reference

paseka is the Queen Shell — a single binary for colony setup, one-shot bee runs, interactive sessions, NATS runtime, and housekeeping.

Build from the repo root:

go build -o paseka ./cmd/paseka

This produces the legacy console at / only. The redesigned console under /next/ is a separate Svelte bundle that is not committed; build it first to have it embedded:

pnpm --dir web install --frozen-lockfile
pnpm --dir web build
go build -o paseka ./cmd/paseka

Without that step the binary still compiles, and /next/ answers with a page explaining that the preview was not built. Release archives and the container image already build the frontend first, so go install is the only path that never carries the redesign.


Conventions

Resolving the colony

Most commands resolve the git repository and colony config from the current working directory. Use --path / -C to start resolution from another directory inside the repo:

paseka bee run scout --body "survey" --path /path/to/repo

Resolution requires:

  • A git repository with .paseka/colony.yaml (run paseka init first)
  • Machine-local config at ~/.config/paseka/<slug>/ (created by paseka init)

Global flags

Flag Default Description
--log-level info Runtime log level: error, warn, info, or debug
--no-color off Disable ANSI colors in logs
--profile Named config overlay for this process (colony .paseka/profiles/<name>.yaml and/or home profiles/<name>/). Fails closed if the name is missing. Cannot combine with --no-profile.
--no-profile off Ignore sticky profile: in home config.yaml for this process

Non-empty PASEKA_PROFILE selects a profile when the flags are omitted (flag wins over env; env wins over sticky home profile:). See Colony layout.

Identifiers

Flag / field Name in docs Description
--trace traceId Flight trail — groups runs, worktrees, and bus events for one feature chain
--body (bee run / chat) task body Free-text nectar passed into the prompt template ({{.Task}})
--task (task / proposal) taskId Structured subtask id in the task ledger (e.g. task-1)
agent id agentId Unique id per adapter invocation (auto-generated for bee run)

NATS dependency

Command NATS required?
paseka init, bee run --no-bus, bee chat, session, status, colony topology, nuc, console, purge (filesystem only), export, inspect usage No
paseka purge --bus Yes — requires nats.url and --trace
paseka bee run (default) Optional — publishes domain events when nats.url is configured
paseka run, doctor, replay, verify, signal, cue, proposal, energy, task create, task start, task retry, gate telegram Yes
paseka task list, paseka task show, export Optional — prefers JetStream KV, falls back to filesystem projection

Default NATS URL after paseka init: nats://127.0.0.1:4222 (see docker-compose.yml).

Non-empty PASEKA_NATS_URL overrides nats.url in home config.yaml (useful for containers and shared NATS hosts). Homelab / server container setup: Homelab deployment. A home profile may overlay nats.url; PASEKA_NATS_URL still wins.


Command tree

paseka
├── init
├── bee
│   ├── run <role>
│   └── chat <role> [prompt]
├── session
│   ├── list
│   ├── attach <sessionId>
│   ├── stop <sessionId>
│   └── run <role>          (hidden — Ghostty launcher)
├── run
├── task
│   ├── create
│   ├── list
│   ├── show
│   ├── start
│   └── retry
├── status
├── doctor
├── event
│   ├── emit
│   ├── validate
│   ├── pending
│   └── flush
├── inspect
│   └── usage
├── replay <traceId>
├── verify <traceId>
├── cue
│   ├── list
│   └── run <id> <text>
├── signal
├── proposal
│   ├── approve
│   ├── reject
│   └── discard
├── energy
│   ├── show
│   └── add
├── invite
│   ├── list
│   ├── record
│   ├── accept
│   └── reject
├── kill
├── colony
│   └── topology
├── nuc
│   ├── export
│   └── import <file|url|->
├── console
├── gate
│   └── telegram
├── export
├── purge
├── prune
└── version

paseka init

Bootstrap .paseka/ in the current git repository and machine-local home config under ~/.config/paseka/<slug>/.

Flag Short Default Description
--path -C cwd Directory inside the git repository
--adapter cursor Scaffold bees and home config for this adapter (cursor, pi, or opencode; unknown values use cursor)

Creates (if missing):

  • .paseka/colony.yaml, bees/, prompts/, scout and builder bee definitions (using the selected adapter)
  • ~/.config/paseka/<slug>/config.yaml (includes nats.url; non-empty PASEKA_NATS_URL overrides it)
  • ~/.config/paseka/<slug>/adapters/cursor.yaml (default adapter)
  • ~/.config/paseka/<slug>/adapters/pi.yaml (when --adapter pi)
  • ~/.config/paseka/<slug>/adapters/claude.yaml (optional Claude adapter config)
  • ~/.config/paseka/<slug>/adapters/opencode.yaml (OpenCode binary; always written)

Idempotent — existing files are skipped.

paseka init
paseka init --adapter pi
paseka init --adapter opencode
paseka init -C /path/to/repo

paseka bee

Run colony bees via adapters (Cursor Agent CLI by default; Pi CLI when adapter: pi; OpenCode CLI when adapter: opencode; shell/python when adapter: script).

paseka bee run <role>

Dispatch one bee — a single non-interactive adapter invocation (AFK run).

Arguments: role — bee name matching .paseka/bees/<role>.yaml (e.g. scout, builder).

Flag Short Required Description
--body -b * Task body rendered into the prompt template
--prompt * Inline prompt override (skips template file)
--trace Flight trail id; generated if omitted
--intent Task intent for the bee role (vocabulary from bee intents or <role>-intent-* partials; default from bee config or discovered vocabulary)
--path -C Colony resolution start directory
--no-bus Skip NATS publish (file-only run)
--raw Debug only: request plain text instead of the runtime-owned structured output, logging the runtime features it degrades (usage, session tracking, summary normalization)

* Provide --body or --prompt for LLM bees. Script bees (adapter: script) do not require a prompt; they run the bee's command: and receive runtime context via PASEKA_* env vars (see architecture overview § Script adapter).

Behavior:

  • Renders prompt from .paseka/prompts/ (see prompt templates)
  • Writes run artifacts to .paseka/runs/<traceId>/<agentId>/
  • Builder bees with worktree: true run in .paseka/worktrees/<traceId>/
  • Publishes domain events (SIGNAL, INSIGHT, MUTATION, VERIFICATION) to NATS when configured
  • Prints status, trace, agent id, workspace, run dir, output, and diff summary
paseka bee run scout --body "Plan auth for the API"
paseka bee run builder --body "Implement login" --trace trace-abc123 --intent feature
paseka bee run scout --prompt "Quick spike: {{.Task}}" --body "rate limiting"
paseka bee run builder --body "hotfix" --no-bus

paseka bee chat <role> [prompt]

Start an interactive human-in-the-loop session in a long-lived agent process.

Arguments:

  • role — bee name
  • prompt (optional) — initial prompt text; equivalent to --prompt
Flag Short Required Description
--body -b * Task body for the prompt template
--prompt * Inline prompt override
--trace Flight trail id; generated if omitted
--intent Task intent for the bee role (vocabulary from bee intents or <role>-intent-* partials)
--path -C Colony resolution start directory
--terminal default or ghostty (overrides ~/.config/paseka/<slug>/terminal.yaml)

* Provide a positional prompt, --body, or --prompt.

See interactive sessions for session architecture and Ghostty attach.

paseka bee chat scout "Discuss the auth design"
paseka bee chat builder --body "Walk through the login flow"
paseka bee chat scout "review PR" --terminal ghostty

paseka session

Manage interactive agent sessions registered in ~/.config/paseka/<slug>/state.json.

paseka session list

List active sessions for the colony.

Flag Short Description
--path -C Colony resolution start directory

paseka session attach <sessionId>

Attach to a session running in the current paseka process (in-process PTY relay). No flags.

paseka session stop <sessionId>

Stop a session by id. Tries the in-process manager first, then signals a remote PID from state.json.

Flag Short Description
--path -C Colony resolution start directory (for remote stop)

paseka session resume <sessionId>

Continue a finished Cursor or OpenCode HITL session: new Paseka sessionId / run directory, same provider providerSessionId, no create-chat / pre-create. Cursor resumes with --resume; OpenCode with --session. Attaches in the current terminal. Ineligible sources (Pi/Claude/script, missing id, command: bee, still active, another live session on the same chat) exit non-zero.

Flag Short Description
--path -C Colony resolution start directory
--body -b Optional continue line (positional prompt only; not a new task template)

paseka session run <role> (hidden)

Internal entry point used when bee chat --terminal ghostty launches a new terminal window. Same flags as bee chat (--path, --body, --trace, --prompt).


paseka run

Start the long-running Hive Runtime — a NATS reactor that subscribes to colony events, updates the task ledger, and dispatches ready tasks to bees.

Flag Short Description
--path -C Colony resolution start directory

Requires: NATS with JetStream (nats.url in home config, or PASEKA_NATS_URL).

Runs until interrupted (Ctrl+C). On SIGNAL / task.ready events, dispatches the configured bee and publishes resulting domain events. See task ledger.

# Terminal 1
docker compose up -d
paseka run

# Terminal 2 — inject a ready task
paseka signal --type SIGNAL --trace trace-1 \
  --payload '{"kind":"task.ready","taskId":"task-1","title":"Add endpoint","bee":"builder"}'

paseka task

Inspect and enqueue tasks for a trace. Task execution still requires the long-running paseka run reactor.

paseka task create

Create a new task by publishing task.plan. Generates traceId and taskId when omitted.

Flag Short Required Description
--title * Task title
--body * Inline task body
--stdin * Read task body from stdin
--file * Read task body from file
--trace Flight trail id (generated when omitted)
--task Task id (generated when omitted)
--bee Bee role (default: defaults.default_bee from colony.yaml, fallback builder)
--intent Task intent for the bee role (vocabulary from bee intents or <role>-intent-* partials)
--depends-on Task dependencies (repeatable or comma-separated)
--review Review policy: none, required, final
--autorun Publish task.ready immediately after task.plan
--path -C Colony resolution start directory

* Provide --title and/or one body source (--body, --stdin, or --file).

paseka task create --title "Add health check" --body "Implement /healthz endpoint" --bee builder --intent feature
cat task.md | paseka task create --title "Implement auth" --stdin --autorun
paseka task create --file task.md --bee builder --autorun

On success prints trace, task, suggested paseka task start / paseka task show commands, and whether task.ready was published.

paseka task list

List tasks for one flight trail.

Flag Short Required Description
--trace yes Flight trail id
--path -C Colony resolution start directory

Reads JetStream KV when NATS is configured; otherwise falls back to .paseka/runs/<traceId>/tasks/*/task.md.

paseka task list --trace trace-1

paseka task show

Show one task, its markdown description, and linked agent runs.

Flag Short Required Description
--trace yes Flight trail id
--task yes Task id
--path -C Colony resolution start directory
paseka task show --trace trace-1 --task task-1

paseka task start

Publish task.ready for eligible planned tasks. Requires NATS.

Flag Short Required Description
--trace yes Flight trail id
--task Task id; when omitted, starts all eligible planned tasks
--path -C Colony resolution start directory
# Terminal 1
paseka run

# Terminal 2 — enqueue one task or all eligible tasks
paseka task start --trace trace-1 --task task-1
paseka task start --trace trace-1

paseka task retry

Re-publish task.ready for a failed or stuck running task using the same bee, intent, and body from the task ledger. Requires NATS.

Flag Short Required Description
--trace yes Flight trail id
--task yes Task id
--path -C Colony resolution start directory
# Terminal 1
paseka run

# Terminal 2 — retry after a failed adapter run
paseka task retry --trace trace-1 --task task-1

paseka status

Read-only colony snapshot: hive runtime, live bees (AFK + interactive), task counts, honey for recent Flight Trails, attention items, and a short recent-trace list. Observe-only — does not start the runtime, dispatch work, or mutate colony state.

Trails declared by a standing Forage Cue are marked · standing in the honey, low-honey, and recent-trace lines; JSON adds standing: true on those rows. The marker follows .paseka/cues/*.yaml, so removing the cue makes the trail read as an ordinary trail.

Flag Short Description
--path -C Colony resolution start directory
--json Emit schemaVersion 1 JSON on stdout (machine contract for interface bees)
--check Exit non-zero when the hive substrate cannot choreograph (runtime not alive, or NATS configured but unreachable). Pending reviews, invites, failed tasks, and empty honey do not fail --check.

Default exit code is 0 whenever the snapshot was produced (including when the reactor is stopped). Snapshot is printed before --check evaluates so probes can log JSON/text on failure.

JSON blocks: runtime, nats (light connectivity), agents, activeWorktrees, taskCounts, energy (recent-traces window), attention, recentTraces.

Minimal schema shape:

{
  "schemaVersion": 1,
  "generatedAt": "RFC3339",
  "slug": "string",
  "colonyRoot": "string",
  "profile": "",
  "runtime": {"status": "running|stopped|stale|stopping", "alive": false},
  "nats": {"configured": false, "connected": false},
  "agents": {"count": 0, "afk": 0, "sessions": 0, "items": []},
  "activeWorktrees": 0,
  "taskCounts": {"running": 0, "waiting_review": 0, "failed": 0},
  "energy": {"available": false, "traces": []},
  "attention": {
    "waitingReview": [],
    "pendingInvites": [],
    "failedTasks": [],
    "lowEnergyTraces": []
  },
  "recentTraces": []
}

Additive fields may appear without changing schemaVersion; consumers should ignore unknown fields.

Follow-up commands (index, not new verbs):

Snapshot signal Command
Runtime not alive Beekeeper starts paseka run (status never starts it)
Live session paseka session list / attach / stop / resume
Live afk paseka task show, paseka kill
waitingReview paseka task show, paseka proposal approve\|reject
pendingInvites paseka invite list / accept / reject
failedTasks paseka task retry
lowEnergyTraces paseka energy add --trace
recentTraces paseka task list --trace, paseka energy show --trace, paseka replay
nats.connected == false paseka doctor
paseka status
paseka status --json
paseka status --check          # health probe for systemd/cron

paseka doctor

Check NATS connectivity, JetStream resources, and colony bee wiring for the colony.

Flag Short Description
--path -C Colony resolution start directory

Reports: connection, JetStream, event stream, task-ledger KV bucket, object store bucket; config profile (effective name or none, layers loaded, remapped roles, skipped script / command: bees, available names); code proposal wiring (worktree ↔ kind mismatches as errors, bare code.proposal alias as warnings, missing subscribers / verification publishes as advisories); standing trails (warnings when a standing SIGNAL kind has only worktree: true subscribers, a standing tick bee publishes isolated code.proposal, or an isolated proposal already sits on a standing trail); pull-request delivery (unknown defaults.delivery is an error; pull_request without origin or home forge.command is a warning).

Exits with an error if any check fails.

paseka doctor

paseka replay <traceId>

List domain events for a flight trail replayed from JetStream.

Arguments: traceId — flight trail to replay.

Flag Short Description
--path -C Colony resolution start directory

Prints event type, payload.kind, and agent id per event. Does not re-execute bees.

paseka replay trace-abc123

paseka verify <traceId>

Compare a trail's local event record against what reached the bus.

Arguments: traceId — flight trail to verify.

Flag Short Description
--path -C Colony resolution start directory
--json Emit the comparison as JSON

Each trail keeps its own record of every domain event the colony published for it (.paseka/runs/<traceId>/trail-events.ndjson), written before the broker attempt. That record is what the colony decided to do; the stream is what was broadcast. This command is where the two are compared, reporting events that are only local, only on the bus, or in both, matched on the identity every event carries. It exits non-zero when the two records disagree.

paseka verify trace-abc123

It waits until the stream has actually been drained rather than until it goes quiet. If that read does not finish inside its budget the verdict is inconclusive, not a divergence: an event still in flight would otherwise be reported as one the broker never took. An inconclusive run exits non-zero too.

With no broker reachable it reports that verification was not possible and exits non-zero — an unreachable broker is not evidence of divergence, so it never claims one. Reading a trail needs no broker; only this comparison does.


paseka cue

Run colony Forage Cue shortcuts from .paseka/cues/<id>.yaml. Publishes signal or task ingress immediately (no confirm). Full authoring, Console, Telegram, honey, and external timer/webhook rules: Forage Cues. Cron and GitHub hooks invoke this command on the hive host; Paseka does not listen for HTTP or run a scheduler.

Requires NATS (same as paseka signal / task create).

paseka cue list

Flag Short Description
--path -C Colony resolution start directory

Lists cues sorted by id (id, optional standing trail, optional description).

paseka cue run

Flag Short Required Description
<id> yes Cue id (filename without .yaml)
<text> yes Operator text (Text / Title / Body in templates)
--trace Flight trail id (new trail when omitted; standing cues use standing.trace and reject a mismatch)
--set Template override key=val (repeatable; unused keys ignored)
--path -C Colony resolution start directory
paseka cue list
paseka cue run feature "OAuth callback returns 500 on refresh"
paseka cue run hotfix "Fix nil deref in token refresh"
paseka cue run feature "Follow-up" --trace trace-abc123
paseka cue run daily-triage "tick $(date -I)"

Standing cues seed honey on the first tick and replace remaining with standing.stipend on later ticks (SIGNAL / energy.stipend). The first seed also sets INSIGHT/trace.title from the cue description (or cue id) when the trail has no title yet. A killed standing trail refuses the run. A busy standing trail (open ledger task or live AFK on that id) refuses the run without burning stipend.


paseka signal

Publish a domain event directly to the NATS bus (manual choreography / testing).

Flag Short Required Default Description
--type yes SIGNAL, INSIGHT, MUTATION, or VERIFICATION
--payload yes JSON object (include kind for task lifecycle events)
--trace auto Flight trail id
--agent cli Agent id on the event envelope
--path -C Colony resolution start directory
# Plan tasks (scout output shape)
paseka signal --type INSIGHT --trace trace-1 \
  --payload '{"kind":"task.plan","tasks":[{"taskId":"task-1","title":"Add endpoint","bee":"builder"}]}'

# Mark task ready for the reactor
paseka signal --type SIGNAL --trace trace-1 \
  --payload '{"kind":"task.ready","taskId":"task-1","bee":"builder"}'

Event contracts: task ledger, .paseka/prompts/_partials/emit-howto.md and type-scoped emit partials.


paseka event

Validate and publish bus events with machine-readable feedback. This is the intended agent publish path.

By default, emit publishes to JetStream immediately. With --defer, the event is validated and appended to a per-run pending queue (.paseka/runs/<traceId>/<agentId>/pending.ndjson); runtime flushes FIFO on successful AFK or interactive session completion. Failed or cancelled runs leave pending on disk for inspect / manual flush. --defer requires an existing run directory for the event's traceId and agentId — missing run dir fails closed. End-of-session flush resolves home NATS settings from disk even when the session handle only stored the colony root (so a configured bus is not silently skipped).

Trail comb artifacts (014) use runtime scan flush on success and do not depend on this buffer. See 015 for the general deferred-emit contract.

Live-only kinds (CLI rejects --defer): system.kill, energy.add, energy.consume, energy.stipend, session.invite, beekeeper.ready, task.status.

paseka event emit

Flag Short Required Default Description
--stdin yes Read one JSON event object from stdin
--defer false Queue for flush on successful run/session completion instead of publishing now
--agent agent Default agent id when omitted from JSON
--path -C Colony resolution start directory
paseka event emit --stdin <<'EOF'
{"traceId":"trace-1","agentId":"agent-1","type":"VERIFICATION","payload":{"kind":"verification.success","summary":"All requirements met"}}
EOF

End-of-run handoff (deferred until successful exit):

paseka event emit --defer --stdin <<'EOF'
{"traceId":"trace-1","agentId":"agent-1","type":"INSIGHT","payload":{"kind":"task.plan","tasks":[{"taskId":"task-1","title":"Add endpoint","bee":"builder"}]}}
EOF

Live success response:

{"ok":true,"traceId":"trace-1","type":"VERIFICATION","kind":"verification.success","subject":"paseka.events.VERIFICATION.verification.success","eventLogPath":"/path/to/.paseka/runs/trace-1/agent-1/events.ndjson"}

Deferred success response:

{"ok":true,"deferred":true,"traceId":"trace-1","type":"INSIGHT","kind":"task.plan","pendingPath":"/path/to/.paseka/runs/trace-1/agent-1/pending.ndjson"}

Validation failure:

{"ok":false,"error":"schema_validation_failed","details":[{"path":"payload.summary","message":"required"}]}

Defer denied (live-only kind):

{"ok":false,"error":"defer_denied","details":[{"path":"payload.kind","message":"kind \"session.invite\" cannot be deferred; use live emit"}]}

paseka event validate

Same stdin input as emit, but validates only and does not publish.

paseka event validate --stdin <<'EOF'
{"traceId":"trace-1","type":"INSIGHT","payload":{"kind":"task.plan","tasks":[{"taskId":"task-1","title":"Add endpoint"}]}}
EOF

paseka event pending

Show deferred event count and kinds for a run (does not read raw pending.ndjson by hand).

Flag Short Required Description
--trace yes Flight trail id
--agent yes Agent run id
--path -C Colony resolution start directory
paseka event pending --trace trace-1 --agent agent-1

paseka event flush

Publish pending events FIFO, or discard without publishing. Uses the same flush path as runtime on successful completion. Mid-flush publish errors stop at the first failure; already-published events stay on the bus and remaining items stay queued for retry.

Flag Short Required Description
--trace yes Flight trail id
--agent yes Agent run id
--discard Clear pending queue without publishing
--path -C Colony resolution start directory
paseka event flush --trace trace-1 --agent agent-1
paseka event flush --trace trace-1 --agent agent-1 --discard

paseka inspect

Filesystem projections for flight trails and runs (no NATS).

paseka inspect usage

Show LLM token usage from result.json projections — trace aggregate by default, or one run with --agent. Mirrors Queen Console trace/run usage fields (inputTokens, outputTokens, cache read/write). Only Cursor AFK runs report usage today; others print usage: (none). With --agent, if the run stored a native providerSessionId, it is printed as providerSessionId: (Cursor stream-json session_id, Cursor HITL create-chat UUID, OpenCode HITL ses_*, or Pi session id).

Flag Short Required Description
--trace yes Flight trail id
--agent Agent id (single run; omit for trace aggregate)
--path -C Colony resolution start directory
paseka inspect usage --trace trace-1
paseka inspect usage --trace trace-1 --agent agent-abc

paseka energy

Manage per-trace honey reserve (energyToken). paseka energy show prints budget: (seed) and remaining:. After a post-seed top-up it also prints added: and remaining / allocated (energyBudget + energyAdded). Unseeded traces print remaining without a / 0 denominator. Low-energy in Queen Console is remaining vs seed — see Task ledger § Honey reserve.

paseka energy show

Flag Short Required Description
--trace yes Flight trail id
--path -C Colony resolution start directory

paseka energy add

Inject honey into a trace (SIGNAL / energy.add). When paseka run is active, the command publishes only and the reactor projects the ledger update (avoids double-counting). When the reactor is stopped, the CLI applies the event locally after publish so energy show reflects the top-up immediately.

Blocked tasks with exhausted reserve are unblocked when the reactor is running.

Flag Short Required Description
--trace yes Flight trail id
--amount yes Positive number of tokens to add
--path -C Colony resolution start directory
paseka energy show --trace trace-1
paseka energy add --trace trace-1 --amount 5

paseka kill

Hard-kill a trace (SIGNAL / system.kill). Cancels non-terminal tasks, stops new AFK dispatch, and cancels in-flight adapter processes for that traceId. Does not stop interactive sessions — use paseka session stop for those.

When paseka run is active, the command publishes and waits for the ledger projection. When the reactor is stopped, the CLI applies the event locally after publish.

Flag Short Required Description
--trace yes Flight trail id
--reason Optional summary recorded on cancelled tasks
--path -C Colony resolution start directory
paseka kill --trace trace-1
paseka kill --trace trace-1 --reason "dispute avalanche"

paseka colony

Colony configuration projections (filesystem only — no NATS).

paseka colony topology

Print the colony EDA topology as a Mermaid flowchart derived from .paseka/bees/*.yaml and .paseka/colony.yaml auto_invites. Emits the same Mermaid string as Queen Console GET /api/colony/topology for the same colony root. Useful for docs, PRs, and offline inspection when paseka run is stopped.

Flag Short Description
--path -C Colony resolution start directory
--out Write Mermaid to file instead of stdout
paseka colony topology
paseka colony topology --out docs/colony-topology.mmd
paseka colony topology -C /path/to/repo

See specs/007-colony-eda-topology.md for graph semantics (subscribe/publish/invite edges, implicit task.ready, intent annotations).


paseka nuc

Export and import portable Nuc packs (bee YAML + prompts) between Colonies. Full format and conflict policy: nuc.

paseka nuc export

Flag Short Default Description
--output -o stdout Write nuc file; prints path when set
--bees all roles Comma-separated bee roles to export
--name colony slug metadata.name in the nuc file
--description Optional metadata.description
--path -C cwd Colony resolution start directory
paseka nuc export -o minimal.nuc.yaml
paseka nuc export --bees scout,builder -o scout-builder.nuc.yaml

paseka nuc import <file|url|->

Flag Default Description
--force off Overwrite existing bee and prompt files
--dry-run off Show import plan without writing
--verbose / -v off List created, skipped, and overwritten paths
--path / -C cwd Colony resolution start directory

Default conflict policy is skip (same as paseka init for existing files). Use --force to replace whole files. No field-level merge — use git to review imports.

paseka nuc import ./minimal.nuc.yaml
paseka nuc import https://example.com/nucs/dev.nuc.yaml --dry-run -v
paseka nuc import ./dev.nuc.yaml --force

paseka gate

Human Gateway surfaces outside Queen Console. MVP: Telegram only.

paseka gate telegram

Long-poll Telegram Bot API for one colony: push notifications, /status /energy /task /invites /help, optional commands.custom emit: signal slash commands, invite and proposal buttons. Separate process from paseka run. Requires machine-local ~/.config/paseka/<slug>/telegram.yaml and NATS.

Flag Short Default Description
--path -C cwd Directory inside the git repository
paseka gate telegram
paseka gate telegram -C /path/to/repo

Setup, allowlist, and command reference: Telegram gateway. Design: specs/010-telegram-human-gateway.md.


paseka invite

Manage Human Gateway requests for interactive beekeeper sessions.

paseka invite list

Lists pending invites by default. Use --trace and --status to filter. Known statuses are pending, accepted, completed, incomplete, cancelled, and deferred.

paseka invite record

Seeds a pending invite in machine-local state without publishing to NATS. Pass --trace, --bee, and --body, or provide a session.invite payload with --stdin. Optional fields include --intent, --invite-id, and --artifact-ref.

paseka invite accept <inviteId>

Publishes beekeeper.ready, consumes one honey, and starts an interactive session on the invite's Flight Trail. The session starts detached unless --attach is set. If honey is exhausted, add it with paseka energy add --trace <traceId> --amount 1 and retry.

paseka invite reject <inviteId>

Cancels a pending invite. Add --defer to preserve it as deferred instead.

paseka invite list --trace trace-1
paseka invite record --trace trace-1 --bee drone --intent grilling --body "Review the feature"
paseka invite accept <inviteId> --attach
paseka invite reject <inviteId> --defer

Automatic invite creation is configured with auto_invites in .paseka/colony.yaml; lifecycle and routing are described in Bee routing.


paseka console

Start the local Queen Console web UI (embedded SPA + JSON API). See the Queen Console operator guide for its tabs, runtime dependencies, reviews, Git operations, and troubleshooting.

Flag Short Required Default Description
--addr 127.0.0.1:8787 Listen address (keep on localhost unless you understand the exposure risk)
--path -C Colony resolution start directory
paseka console
paseka console --addr 127.0.0.1:8787

Open the printed URL in a browser. Queen Console does not enforce authentication yet.


paseka proposal

Human-in-the-loop actions for code proposals (MUTATION with kind: code.proposal.isolated, code.proposal.root, or legacy alias code.proposal).

paseka proposal approve

Approve a review-gated task. Isolated final gates either merge locally or publish a pull request, depending on colony defaults.delivery (see pull-request delivery). Root approve is always an ack.

Task context local_merge (default) pull_request
Isolated final gate (review: final / _review) Merge worktree + task.completed Push head + forge upsert; gate stays waiting_review until the host reports merged
Root soft gate (proposalWorkspace: root, review: required) No merge (R1 ack) Same — never a PR
Isolated review: required mid-task No merge unless final No publish unless final

For isolated final gates, preview the accumulated worktree diff in Queen Console Reviews first (paseka console). Root approve advances the ledger only — beekeeper commits .paseka/ / docs/ changes on colony root manually.

Flag Short Required Default Description
--trace yes Flight trail id
--task yes Review task id (e.g. task-1, _review, or a review: final task)
--summary approved by human VERIFICATION/task.completed completion note (not INSIGHT/trace.summary)
--merge-message Merge commit subject for isolated final gate under local_merge (optional HITL body). Error when defaults.delivery is pull_request
--pr-title Pull request title overlay (pull_request delivery)
--pr-body Pull request body overlay (pull_request delivery)
--draft off Open the pull request as a draft
--run-hooks off Run git hooks on the worktree-branch push (default skips --no-verify + HUSKY=0)
--path -C Colony resolution start directory

paseka proposal reject

Reject a review-gated task — publishes human INSIGHT / human.feedback. Tasks with review: required return to ready for another AFK pass when paseka run is active. On a final merge gate, unstructured --feedback is abandon-style (no rework). --comments-file writes the comb packet and, on review: final, also plans a rework task for the last isolated-proposal Bee.

Flag Short Required Default Description
--trace yes Flight trail id
--task yes Task id
--feedback Please revise the proposal. Short summary for the bee (also used as overall summary with --comments-file)
--comments-file Path to a Markdown file copied into .paseka/runs/<traceId>/artifacts/review-comments.md before publishing feedback and artifact.written. On review: final, also plans rework (same as Console Request changes)
--path -C Colony resolution start directory
# Isolated final gate, local_merge — may print merge commit SHA
paseka proposal approve --trace trace-1 --task _review --summary "LGTM, merged"
# Isolated final gate, pull_request
paseka proposal approve --trace trace-1 --task _review --pr-title "Live bees" --pr-body "## Why\n…"
# Root soft ack — no merge commit line
paseka proposal approve --trace trace-1 --task task-cfg-1 --summary "Config changes acknowledged"
paseka proposal reject --trace trace-1 --task task-1 --feedback "Use the existing auth middleware"
# Attach a pre-written review packet (line comments authored offline or exported elsewhere)
paseka proposal reject --trace trace-1 --task task-1 --comments-file ./my-review.md --feedback "See line notes in comb"

paseka proposal discard

Close a review-gated task without merging and without asking for rework — the deliberate "not doing this" outcome, analogous to closing a pull request. The task leaves the review queue in a terminal cancelled state: no worktree merge, no pull-request publish, no human.feedback, and no rework task. The worktree is left in place, so a discarded result can still be revived.

Flag Short Required Default Description
--trace yes Flight trail id
--task yes Task id
--reason discarded by human Why the result is being discarded (recorded as the task summary)
--path -C Colony resolution start directory
paseka proposal discard --trace trace-1 --task _review --reason "Superseded by the rewrite"

paseka export

Write a self-contained report for one flight trail to the current working directory. The file includes trace overview, tasks, runs (oldest first), and the full event timeline (oldest first). Use --format html (default) for a styled HTML page, or --format md for Markdown suitable for agent chats. Use --include to add optional analysis slices (usage, durations, committed config snapshots, agent logs) without changing the renderer.

Pass the flight trail id as a positional argument, matching paseka replay <traceId>. --trace is kept as an alternative; passing both is fine when they match, and passing two different ids is an error.

paseka export <traceId> [--format html|md] [--include ...] [-C <dir>]
paseka export --trace <traceId> [--format html|md] [--include ...] [-C <dir>]
Flag Short Required Description
--trace no Flight trail id (alternative to the positional argument)
--format Export renderer: html (default) or md
--include Optional payload slices: usage, durations, bees, colony, cues, artifacts, agent-logs, patches (repeatable or comma-separated)
--path -C Colony resolution start directory

Output file: paseka-export-<slug>-<traceId>.html or .md (extension matches --format) in the current working directory.

HTML styling matches Queen Console (dark theme, JetBrains Mono from CDN with system fallbacks). Run and event summaries are rendered as Markdown inside the page; raw events are expandable JSON.

Markdown keeps run and event summaries as-is (no HTML conversion) and puts each raw event in a fenced json code block.

--include slices (independent of --format):

Token Adds to export
usage Trace usage aggregate (when present) and per-run token lines from result.json
durations Wall-clock duration per finished run (FinishedAt - StartedAt)
bees Committed .paseka/bees/<role>.yaml for bees on this trail (no *.local.yaml)
colony Raw .paseka/colony.yaml (or a short note when missing)
cues All committed .paseka/cues/*.yaml in the colony
artifacts Trail comb files under .paseka/runs/<traceId>/artifacts/ (inline bodies; skips hidden/temp files; omits binary/oversize with a note)
agent-logs Per-run Agent log (tool-call summary) resolved through the adapter by providerSessionId. Cursor reads ~/.cursor/projects/.../agent-transcripts/<uuid>/<uuid>.jsonl in place. Missing id, unsupported adapter, missing transcript (store not found), parse errors, Pi stub (not implemented), or resolve errors omit the section with a reason; export still succeeds.
patches Proposal patches under .paseka/runs/<traceId>/proposals/ — one record per proposal attempt, with run identity, bee, AFK/HITL mode, proposal kind, workspace, base SHA, summary, size, capture time, and publication state. Bodies are inlined within per-patch and aggregate budgets; oversized, unsuitable-for-text, or unreadable entries keep their metadata and ref and say why. Filesystem-only: no broker is required, and a trail without a proposals directory reads as an empty slice.

Default export omits all config snapshots. Home config and machine-local overlays are never included.

A proposal patch is the diff the collector returned when a run finished, not a strict per-run delta, not a workspace backup, and not proof of the code a Guard approved. Earlier edits inside a changed file can be included, untracked files and changes committed during the run can be omitted, and applying a patch to its baseSha is not guaranteed to reconstruct the workspace. An export with omitted bodies is a history report, not a complete portable archive — a local ref does not make an omitted body available offline.

Data is read from .paseka/runs/ (same as Queen Console). Task and energy fields prefer JetStream KV when NATS is configured; otherwise filesystem projections are used.

paseka export trace-abc123
paseka export trace-abc123 --format md
paseka export trace-abc123 --include usage,durations
paseka export trace-abc123 --include bees --include colony --format md
paseka export trace-abc123 --include artifacts --format md
paseka export trace-abc123 --include agent-logs --format md
paseka export trace-abc123 --include patches --format md
paseka export trace-abc123 -C /path/to/repo
paseka export --trace trace-abc123

paseka purge

Remove ephemeral colony artifacts. Without --yes, shows a plan and asks for confirmation.

Flag Short Description
--runs Remove .paseka/runs/ trace directories
--worktrees Remove .paseka/worktrees/ and associated git worktrees
--cache Remove .paseka/cache/
--state Reset ~/.config/paseka/<slug>/state.json worktree registry
--bus Remove JetStream task-ledger KV, stream events, and object-store artifacts for --trace (requires NATS)
--trace Flight trail id (required with --bus)
--reseed-energy After --bus purge, seed honey to colony defaults.energy_budget (requires --bus and --trace)
--all Purge runs, worktrees, cache, and state (does not include --bus)
--yes -y Skip confirmation prompt
--path -C Colony resolution start directory

At least one target flag (--runs, --worktrees, --cache, --state, --all, or --bus) is required.

--bus behavior: Deletes the task-ledger KV entry for the trace (tasks, energy reserve), domain events for that traceId from the JetStream event stream, and trace-scoped object-store artifacts (<traceId>-*.diff). Requires a configured nats.url and --trace. Not included in --all — pass --bus explicitly when resetting bus state.

Stop the reactor first: Stop paseka run before purge --bus so the reactor is not reading or writing task-ledger KV while keys and stream messages are deleted. Running bus purge against an active reactor can cause races and stale in-memory state.

--reseed-energy: Operator hygiene for retrying work on a fixed trace — after a successful --bus purge, seeds the trace honey reserve (budget and remaining) to the colony defaults.energy_budget (same source as reactor first seed). Works with the reactor stopped; verify with paseka energy show --trace <id>. Not an eval harness command.

Standing checkpoints: purge --runs removes .paseka/runs/<traceId>/, including the trail comb. On a Standing Trail that directory is procedure memory (checkpoint.json and journals). Do not purge the standing traceId unless you intend to wipe skip lists; keep durable facts in git.

Proposal patches ride on run retention. The proposal store lives at .paseka/runs/<traceId>/proposals/, so purge --runs and prune --runs remove it with the trail — there is no separate cleanup command and no individual-patch TTL. purge --bus deliberately leaves the bytes and their last-known publication state on disk, because removing bus state must not destroy the code record. An active Standing Trail can therefore accumulate proposal records until it is explicitly cleaned.

paseka purge --runs --yes
paseka purge --all

# Reset bus state and reseed honey for a fixed trace (retry after failed run)
paseka purge --bus --trace my-trace --reseed-energy --yes

# Eval case reset (filesystem + bus for one fixed trace)
paseka purge --runs --worktrees --state --bus --trace eval-01-add-function --yes

paseka version

Print the build stamp of the running binary: which release it is, which commit it was built from, whether that commit was a clean tree, and which Go toolchain compiled it. Answers outside a colony, so it works when the checkout is the thing that is broken.

paseka version
paseka version --json
paseka 0.6.0+67730c4
  commit:  67730c4da70fbd912a575fe614e5e248c402fdf0
  built:   2026-10-01T05:43:51Z (commit date)
  channel: release
  go:      go1.25.1
Flag Short Description
--json Emit the stamp as JSON on stdout (machine contract)

What the fields mean:

  • version — the release tag without its v, or dev for any build no tag names. A build from main, a goreleaser --snapshot, and a go install …@main all report dev; the commit behind it is what identifies them.
  • commit — full sha, printed unabbreviated because an abbreviated one does not paste into git show.
  • built — the commit date, not the moment of the build, so two builds of one commit compare equal.
  • channel — release only for a build off a version tag; anything else reads development build (not a tagged release).
  • .dirty in the version line — the tree carried uncommitted work, so the commit is a starting point rather than a claim about what shipped.

paseka --version prints the same one line as cobra's built-in flag.

Where the stamp comes from: a release build gets it from -ldflags -X (architecture overview § Build stamp); every other build reads it from the VCS data the Go toolchain embeds on its own, so go build in a worktree still names its commit with no flags at all. A binary built outside a module — a Docker context without .git — reports a bare dev, which is the honest answer for a build that cannot know.

Queen Console serves the same stamp at GET /api/version and shows it in the side menu's foot, where the version itself links to this build's commit on GitHub. paseka console also prints it in its startup banner, under the listening URL:

Queen Console 🐝 listening at http://127.0.0.1:8787
  Build: dev+67730c4.dirty (development build)
  Redesign preview: http://127.0.0.1:8787/next/

The channel is spelled out because that is the question a banner answers: dev+67730c4.dirty reads as a name until the words beside it say it is not a release.


paseka prune

Remove worktrees and run data older than a retention period (default 14 days). Without --yes, shows a plan and asks for confirmation.

Flag Short Description
--older-than Retention period: 14d, 2w, or any Go duration such as 336h (default 14d)
--runs Prune .paseka/runs/ trace directories last used before the cutoff
--worktrees Prune .paseka/worktrees/ and associated git worktrees last used before the cutoff
--bus Also remove JetStream task-ledger KV, stream events, and artifacts for correlatable traces (requires NATS)
--all Prune runs and worktrees (does not include --bus)
--yes -y Skip confirmation prompt
--path -C Colony resolution start directory

When neither --runs nor --worktrees is given (and --bus is not the only target), both are pruned. --bus is never implied by --all — pass it explicitly.

Age is last activity, not creation time: a trace is eligible when its newest filesystem activity predates the cutoff. A worktree is protected when a run for the same trace was active recently or when it has uncommitted changes. When --bus is set, the newest task-ledger updatedAt overrides stale file mtimes, so a trace whose files have been idle but whose tasks were touched recently is kept.

--bus correlation: prune lists task-ledger KV traces and removes the ones that are stale, including ledger-only traces with no filesystem directory left. A ledger entry with no task timestamps cannot be correlated and is skipped. Requires a configured nats.url.

Standing checkpoints: prune --runs removes .paseka/runs/<traceId>/, including the trail comb. Do not prune a standing traceId unless you intend to wipe skip lists; keep durable facts in git.

Proposal patches ride on run retention. prune --runs removes the trail's proposal store with the rest of .paseka/runs/<traceId>/; there is no per-patch age target, and an active Standing Trail retains its full proposal history until the whole trail is pruned.

# Remove runs and worktrees idle for more than 14 days
paseka prune

# Reclaim run logs but keep worktrees for 30 days
paseka prune --runs --older-than 30d

# Age-aware filesystem and bus cleanup in a scheduled job
paseka prune --all --bus --older-than 2w --yes

Troubleshooting

Symptom Check Action
paseka run cannot connect paseka doctor; inspect PASEKA_NATS_URL Start local NATS with docker compose up -d or fix machine-local nats.url
Runtime appears stale or stopped paseka status --check Start or restart paseka run
Task stays planned paseka task show; inspect dependencies and honey Complete dependencies, add honey, then task start
Task failed or is stuck running paseka task show, run logs Fix the cause, then paseka task retry
Review is waiting paseka status, paseka task show Use Queen Console or proposal approve\|reject
Publish PR fails paseka doctor; origin; home forge.command See pull-request delivery troubleshooting
Invite cannot start paseka invite list, energy show Ensure NATS is reachable and at least one honey remains
Deferred events do not appear paseka event pending Start NATS and run paseka event flush
Console has filesystem data but no live updates paseka status --check Start the reactor and verify NATS
Homelab shows the wrong colony compare colony_root and mounted path Fix the container bind mount and machine-local config

Use status for a read-only operational snapshot and doctor for active NATS, JetStream, and colony-wiring diagnostics. Stop paseka run before destructive paseka purge --bus maintenance so the reactor cannot project events while state is being reset.


Typical workflows

First-time setup

paseka init                    # Cursor adapter (default)
paseka init --adapter pi       # Pi adapter
paseka init --adapter opencode # OpenCode adapter
agent login                    # or export CURSOR_API_KEY (cursor init)
docker compose up -d           # local NATS + JetStream
paseka doctor

One-shot scout → builder (no reactor)

TRACE=$(paseka bee run scout --body "Plan user settings page" | awk '/trace:/ {print $2}')
paseka bee run builder --trace "$TRACE" --body "Implement settings form"

Choreographed run with reactor

paseka run &                   # background reactor
paseka task create --title "Add health check" --body "Implement /healthz" --bee builder --autorun
paseka task list --trace <printed-trace>
paseka replay <printed-trace>

Manual plan + start

paseka run &                   # background reactor
paseka signal --type INSIGHT --trace trace-1 \
  --payload '{"kind":"task.plan","tasks":[{"taskId":"task-1","title":"Add health check","bee":"builder"}]}'
paseka task start --trace trace-1
paseka task list --trace trace-1
paseka replay trace-1

Interactive design session

paseka bee chat scout "Let's design the notification system"
paseka session list
paseka session resume <sessionId>   # finished Cursor/OpenCode HITL
paseka session stop <sessionId>

Feature ideation (soft path)

Manual Phase 0 flow for raw ideas → spec → task ledger. See specs/005-feature-ideation-flow.md.

Ideation SIGNAL kinds (feature.requested, feature.classified, spec.ready) are colony choreography contracts — field shapes are defined in the ideation spec and bee emit partials, not enforced by internal/protocol. Platform HITL kinds (session.invite, beekeeper.ready) are documented in specs/006-human-gateway-invites.md.

TRACE=trace-$(date +%s)
paseka signal --type SIGNAL --trace "$TRACE" \
  --payload '{"kind":"feature.requested","title":"…","body":"…"}'
paseka bee run scout --intent intake --trace "$TRACE" \
  --body "Intake the feature.requested on this trail"
# With paseka run up and default auto_invites: invite list shows pending grilling invite
paseka invite accept <inviteId>
# Or manual path before accept:
# paseka bee chat drone --intent grilling --trace "$TRACE" "Grill: …"
# After grilling writes docs/specs/… and emits spec.ready:
paseka bee chat drone --intent breakdown --trace "$TRACE" "Break down docs/specs/…"

Session invites (Human Gateway)

paseka invite list [--trace <id>] [--status pending|accepted|completed|incomplete]
paseka invite record --trace "$TRACE" --bee drone --intent grilling --body "Grill: …"
paseka invite accept <inviteId>          # detached session; costs 1 honey; attach with session attach
paseka invite accept <inviteId> --attach # attach terminal immediately
paseka invite reject <inviteId>
paseka invite reject <inviteId> --defer  # mark deferred

Accept consumes 1 honey from the trace reserve. If exhausted, invite stays pending — run paseka energy add --trace "$TRACE" --amount 1 (or more) and retry. Ad-hoc bee chat does not consume honey.

Invite statuses: pending, accepted, completed, incomplete, cancelled, deferred. Accepted invites become completed when a bus event matches the invite's persisted done_when contract (optional file-at-ref check); incomplete when the session ends without a valid artifact.

Seed offline with invite record, or configure auto_invites in .paseka/colony.yaml so paseka run auto-publishes when a matching bus event arrives. With empty auto_invites, no auto-invite runs. Accept publishes beekeeper.ready and starts an interactive session on the same traceId.

See specs/006-human-gateway-invites.md and bee routing §7–8.


Doc Topic
Brief Product vision, EDA, NATS role
architecture overview Colony layout, adapters, runs IPC
prompt templates Prompt template resolution
task ledger Task lifecycle events on the bus
Pull-request delivery defaults.delivery, forge script, proposal approve PR flags
interactive sessions bee chat, sessions, Ghostty
Telegram gateway Setup and run paseka gate telegram
specs/005-feature-ideation-flow.md Feature ideation soft path (intake → grill → breakdown)
specs/006-human-gateway-invites.md Session invites, auto_invites, done_when
specs/010-telegram-human-gateway.md Telegram Human Gateway design