Skip to content

CLI Commands

Complete reference for all Starweft CLI commands and flags.

Global Flags

Global flags available for all subcommands.

FlagTypeDefaultDescription
-v, --verbosecount0Increase log output (-v: debug, -vv: trace)
-q, --quietcount0Decrease log output (-q: warn, -qq: error). Mutually exclusive with --verbose

init

Initializes the node's data directory and config.toml.

bash
starweft init --role <ROLE> [OPTIONS]
FlagTypeDefaultDescription
--roleprincipal | owner | worker | relay-Required. The node's role
--data-dirpath~/.starweftPath to the data directory
--display-namestring<role>-nodeDisplay name for the node
--listenmultiaddr[]auto-generatedListen addresses (multiple can be specified)
--no-identityboolfalseSuppress the identity create prompt
--forceboolfalseOverwrite existing config.toml
Example: Initialize a worker node
bash
starweft init --role worker --data-dir ~/.starweft-worker

run

Starts the node in the foreground and begins inbox polling and message processing.

bash
starweft run [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--roleprincipal | owner | worker | relayconfig valueOverride the role at startup
--foregroundboolfalseExplicitly run in the foreground
--log-levelstringconfig valueOverride the log level (debug, info, warn, error, trace)
Example: Start an owner node
bash
starweft run --data-dir ~/.starweft-owner

identity

Generates and displays Ed25519 key pairs.

identity create

Generates actor_key (and stop_authority_key for principal nodes) and registers the local identity in the store.

bash
starweft identity create [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--principalboolfalseGenerate stop_authority_key even for non-principal roles
--forceboolfalseOverwrite existing keys

identity show

Displays local identity information.

bash
starweft identity show [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--jsonboolfalseOutput in JSON format
Example: Check identity
bash
starweft identity show --json

peer

Manages peer node addresses and public keys.

peer add

Registers a peer's multiaddress and adds it to discovery seeds.

bash
starweft peer add <MULTIADDR> [OPTIONS]
FlagTypeDefaultDescription
<MULTIADDR>string-Required. The peer's multiaddress
--data-dirpath~/.starweftPath to the data directory
--labelstring-Label for the peer (for display purposes)
--actor-idstringauto-generatedThe peer's actor ID
--node-idstringauto-generatedThe peer's node ID
--public-keystring-The peer's public key (Base64)
--public-key-filepath-The peer's public key file. Mutually exclusive with --public-key
--stop-public-keystring-The peer's stop authority public key (Base64)
--stop-public-key-filepath-The peer's stop authority public key file
--capabilitystring[]-The peer's capabilities (multiple can be specified)
Example: Add an owner peer
bash
starweft peer add /unix/~/.starweft-owner/mailbox.sock \
  --label owner \
  --public-key "BASE64_PUBLIC_KEY"

peer list

Displays a list of registered peers.

bash
starweft peer list [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory

vision

Submits visions (goals) and previews planning results.

vision submit

Sends a vision to the owner and initiates task decomposition. Principal role only.

bash
starweft vision submit --title <TITLE> [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--titlestring-Required. Title of the vision
--textstring-Text body of the vision. Mutually exclusive with --file
--filepath-File to read the vision text from. Mutually exclusive with --text
--constraintkey=value[]-Constraints (multiple can be specified: budget_mode, human_intervention, allow_external_agents)
--ownerstringauto-resolvedActor ID of the target owner
--dry-runboolfalseRun planning preview only
--approveTOKEN-Submit using the approval token obtained from the preview
--missing-onlyboolfalseUsed with --dry-run. Display only missing information
--jsonboolfalseOutput in JSON format
Example: Preview a vision with dry-run, then submit
bash
# Step 1: Preview
starweft vision submit --title "New feature development" --text "..." --dry-run
 
# Step 2: Submit with the approve token
starweft vision submit --title "New feature development" --text "..." --approve <TOKEN>

vision plan

Displays the planning preview for a vision. Does not submit.

bash
starweft vision plan --title <TITLE> [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--titlestring-Required. Title of the vision
--textstring-Text body of the vision. Mutually exclusive with --file
--filepath-File to read the vision text from
--constraintkey=value[]-Constraints (multiple can be specified)
--ownerstring-Actor ID of the target owner
--missing-onlyboolfalseDisplay only missing information
--jsonboolfalseOutput in JSON format

status

Displays the node's health status and statistics.

bash
starweft status [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--jsonboolfalseOutput in JSON format
--probeliveness | readiness-Run only the specified probe. Mutually exclusive with --watch
--watchboolfalseWatch mode with periodic updates
--interval-secu642Update interval in watch mode (seconds)
Example: Run a readiness probe
bash
starweft status --probe readiness

snapshot

Displays a snapshot of a project or task.

bash
starweft snapshot [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--projectstring-Target project ID
--taskstring-Target task ID
--requestboolfalseRequest a snapshot from a remote node
--ownerstring-Actor ID of the owner to request from
--watchboolfalseWatch mode with periodic updates
--interval-secu642Update interval in watch mode (seconds)
--jsonboolfalseOutput in JSON format

logs

Displays runtime logs.

bash
starweft logs [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--componentstring-Filter by component
--grepstring-Filter by text pattern
--since-secu64-Display only logs from the last N seconds
--tailusize50Display the last N lines
--followboolfalseFollow new log output
Example: Follow OpenClaw component logs
bash
starweft logs --component openclaw --follow

events

Displays task events from the event store.

bash
starweft events [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--projectstring-Filter by project ID
--taskstring-Filter by task ID
--msg-typestring-Filter by message type
--tailusize20Display the last N entries
--followboolfalseFollow new events
--interval-secu642Polling interval when following (seconds)

stop

Issues a stop order for a project or task tree. Principal role only.

bash
starweft stop --reason-code <CODE> --reason <TEXT> --yes [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--projectstring-Project ID to stop. Mutually exclusive with --task-tree
--task-treestring-Root ID of the task tree to stop. Mutually exclusive with --project
--reason-codestring-Required. Stop reason code
--reasonstring-Required. Stop reason text
--yesboolfalseRequired. Confirm the stop operation
--jsonboolfalseOutput in JSON format
Example: Stop a project
bash
starweft stop --project proj_01ABCDEF --reason-code user_requested \
  --reason "Stopping because the goal has been achieved" --yes

wait

Polls until the specified condition is met.

bash
starweft wait [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--visionstring-Target vision ID
--projectstring-Target project ID
--taskstring-Target task ID
--stopstring-Target stop ID
--untilstring-Wait condition (see below)
--timeout-secu64120Timeout (seconds)
--interval-msu64500Polling interval (milliseconds)
--jsonboolfalseOutput in JSON format

The valid values for --until depend on the scope.

Valid values for --until
  • --vision: project_created, active, stopped
  • --project: available, active, approval_applied, stopping, stopped
  • --stop: ordered, stopping, stopped

project

Lists and approves projects.

project list

Displays a list of projects.

bash
starweft project list [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--statusstring-Filter by status
--approval-statestring-Filter by approval state
--ownerstring-Filter by owner actor ID
--principalstring-Filter by principal actor ID
--updated-sinceRFC3339-Show only projects updated since the specified date
--limitusize-Maximum number of entries to display
--jsonboolfalseOutput in JSON format

project approve

Approves a project for execution. Can be run with the owner or principal role.

bash
starweft project approve --project <ID> [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--projectstring-Required. Project ID to approve
--ownerstring-Owner's actor ID
--waitboolfalseWait until the approval is applied
--timeout-secu64120Wait timeout (seconds)
--interval-msu64500Polling interval (milliseconds)
--jsonboolfalseOutput in JSON format

task

Lists, displays tree views, and approves tasks.

task list

Displays a list of tasks.

bash
starweft task list [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--projectstring-Filter by project ID
--statusstring-Filter by status
--approval-statestring-Filter by approval state
--assigneestring-Filter by assignee actor ID
--updated-sinceRFC3339-Show only tasks updated since the specified date
--limitusize-Maximum number of entries to display
--jsonboolfalseOutput in JSON format

task tree

Displays the task hierarchy as a tree.

bash
starweft task tree --project <ID> [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--projectstring-Required. Project ID
--rootstring-Task ID to use as the tree root
--jsonboolfalseOutput in JSON format

task approve

Approves a task for execution. Can be run with the owner or principal role.

bash
starweft task approve --task <ID> [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--taskstring-Required. Task ID to approve
--ownerstring-Owner's actor ID
--waitboolfalseWait until the approval is applied
--timeout-secu64120Wait timeout (seconds)
--interval-msu64500Polling interval (milliseconds)
--jsonboolfalseOutput in JSON format

export

Exports project and task data in JSON or Markdown format.

export project

bash
starweft export project --project <ID> [OPTIONS]

export task

bash
starweft export task --task <ID> [OPTIONS]

export evaluation

bash
starweft export evaluation --project <ID> [OPTIONS]

export artifacts

bash
starweft export artifacts --project <ID> [OPTIONS]

The following flags are shared across all subcommands.

FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--project / --taskstring-Required. Target project ID or task ID
--formatjson | markdownjsonOutput format
--outputpath-Output file path (defaults to stdout if omitted)

publish

Publishes export data to external services.

publish context

Generates context data for publishing.

bash
starweft publish context [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--projectstring-Project ID. Mutually exclusive with --task
--taskstring-Task ID. Mutually exclusive with --project
--formatjson | markdownjsonOutput format
--outputpath-Output file path

publish dry-run

Runs a dry run of the publish and generates a preview.

bash
starweft publish dry-run [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--projectstring-Project ID. Mutually exclusive with --task
--taskstring-Task ID. Mutually exclusive with --project
--targetstringissueTarget type
--titlestringauto-generatedTitle for the publish
--outputpath-Output file path

publish github

Posts a comment to a GitHub Issue or Pull Request.

bash
starweft publish github --repo <OWNER/REPO> [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--projectstring-Project ID. Mutually exclusive with --task
--taskstring-Task ID. Mutually exclusive with --project
--repostring-Required. Repository in owner/repo format
--issueu64-Issue number. Mutually exclusive with --pr
--pru64-Pull Request number. Mutually exclusive with --issue
--titlestringauto-generatedTitle for the comment
--outputpath-Output file path for the result JSON

backup

Backs up and restores all node data.

backup create

Backs up the data directory as a signed bundle.

bash
starweft backup create --output <PATH> [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--outputpath-Required. Backup output directory
--forceboolfalseOverwrite existing output

backup restore

Restores data from a backup bundle.

bash
starweft backup restore --input <PATH> [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the restore destination data directory
--inputpath-Required. Path to the backup bundle
--forceboolfalseForce restore even if identities do not match

repair

Performs data repair operations.

repair rebuild-projections

Rebuilds projections (project and task snapshots) from the task event log.

bash
starweft repair rebuild-projections [--data-dir <PATH>]

repair resume-outbox

Re-queues outbox messages that are in a pending state.

bash
starweft repair resume-outbox [--data-dir <PATH>]

repair list-dead-letters

Lists undeliverable messages (dead letters).

bash
starweft repair list-dead-letters [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--limitusize20Maximum number of entries to display
--jsonboolfalseOutput in JSON format

repair reconcile-running-tasks

Transitions tasks that remain in the running state after a runtime shutdown to a stopped state.

bash
starweft repair reconcile-running-tasks [--data-dir <PATH>]

audit

Verifies the integrity of the event log.

audit verify-log

Verifies the integrity of signatures, hashes, and Lamport timestamps in the task event log.

bash
starweft audit verify-log [--data-dir <PATH>]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory

openclaw

Manages the OpenClaw binary configuration.

openclaw attach

Writes the OpenClaw binary path and settings to config.toml.

bash
starweft openclaw attach --bin <PATH> [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--binstring-Required. Path or command name of the OpenClaw binary
--working-dirpath-Working directory for OpenClaw
--timeout-secu64-Task execution timeout (seconds)
--enableboolfalseSet openclaw.enabled to true
Example: Attach and enable OpenClaw
bash
starweft openclaw attach --bin /usr/local/bin/openclaw --enable

config

Displays and validates the configuration file.

config show

Displays the current configuration (sensitive information is masked).

bash
starweft config show [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--jsonboolfalseOutput in JSON format (default is TOML)

config validate

Validates the configuration file for consistency and reports warnings and errors.

bash
starweft config validate [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--jsonboolfalseOutput in JSON format

registry serve

Starts an HTTP registry server for peer discovery.

bash
starweft registry serve [OPTIONS]
FlagTypeDefaultDescription
--bindstring127.0.0.1:7777Bind address
--ttl-secu64300TTL for peer entries (seconds)
--rate-limit-window-secu6460Rate limit window (seconds)
--announce-rate-limitu64300Rate limit for the announce endpoint
--peers-rate-limitu64900Rate limit for the peers endpoint
--shared-secretstring-Shared secret for HMAC authentication (can also use STARWEFT_REGISTRY_SHARED_SECRET environment variable)
--shared-secret-envstring-Name of the environment variable containing the shared secret
--max-body-bytesusize65536Maximum request body size (bytes)
--read-timeout-msu645000Read timeout (ms)
--write-timeout-msu645000Write timeout (ms)
--allow-insecure-no-authboolfalseAllow binding to non-loopback addresses without authentication (not recommended)

metrics

Outputs node metrics in Prometheus text format or JSON.

bash
starweft metrics [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--formatprometheus | jsonprometheusOutput format

dashboard

Displays a real-time TUI dashboard.

bash
starweft dashboard [OPTIONS]
FlagTypeDefaultDescription
--data-dirpath~/.starweftPath to the data directory
--interval-msu641000Refresh interval (milliseconds)

completions

Generates shell completion scripts.

bash
starweft completions <SHELL>
FlagTypeDefaultDescription
<SHELL>bash | zsh | fish | powershell | elvish-Required. Target shell
Example: Set up zsh completions
bash
starweft completions zsh > ~/.zfunc/_starweft