Workbooks Documentation

wb CLI Reference

wb is the workbooks command-line interface. It is compiled as an Elixir escript that embeds the full runtime. The deploy and publish verbs skip the BEAM app boot (they use shell-outs + file config); all other verbs start the OQL kernel.

Syntax

wb <command> [args] [--flags]

All verbs are non-interactive. Machine-readable output: add --json where supported. Non-zero exit on failure.

Workbook commands

wb query <file.org>

Parse headlines from an org file. Returns JSON array of headline maps.

wb query my.org
wb query my.org | jq '.[].title'

wb tangle <file.org>

Emit the build plan (worlds, components, edges, imports, exports) as JSON.

wb tangle my.org
wb tangle my.org | jq '.components'

wb lint <file.org>

Static analysis of the workbook. Returns a JSON array of issues. Currently a stub; full analysis is planned.

wb lint my.org

wb bundle <src.org> <dest.bundle>

Pack the org source and its build plan into a bundle archive.

wb bundle my.org my.bundle

Variable store

The variable store is per-tenant key-value storage with secret support.

wb var set <key> <value> [--secret]

Set a variable. --secret marks the value as redacted in output.

wb var set api_url https://api.example.com
wb var set api_key sk-... --secret

wb var get <key>

Get a variable value. Secrets print as <secret: N bytes — ref it with {{secret:key}}> .

wb var get api_url

wb var list

List all variables and their kinds (plain / secret).

wb var list

wb var ref <template>

Interpolate variable references in a template string. References use {{key}} syntax; secrets use {{secret:key}}.

wb var ref "POST {{api_url}}/endpoint"

Agent

wb run <prompt>

Run an agent with the given prompt. The agent has access to shell, search, fetch, vfs, wb, and run tools. Prints the result when done.

wb run "list all workbooks tagged :toolkit: in this directory"

Options:

  • --model <id> — override the LLM model

  • --timeout <ms> — wall-clock timeout (default: 60 000)

  • --workdir <path> — working directory for shell calls

Toolkit management

wb toolkit list

List all discovered toolkits in the toolkit search path.

wb toolkit list

wb toolkit show <name>

Print the full manifest and skill text for a toolkit.

wb toolkit show my-tool

wb toolkit install <url>

Clone a toolkit from a git URL, build if needed, and add to the search path.

wb toolkit install https://github.com/example/my-toolkit

Telemetry

wb telemetry

Summarise recent agent runs from _steps.jsonl files.

wb telemetry

Publish

See publish.org Properties for config reference.

wb publish init                         scaffold publish.org
wb publish validate [config.org]        coherence-check
wb publish apply [file.org] [cfg.org]   render + deploy
wb publish site [dir]                   multi-page site from site.org
wb publish help

All publish verbs support --json for machine output.

Deploy

See deployment.org Properties for config reference.

wb deploy init                   scaffold deployment.org
wb deploy validate [file.org]    coherence-check
wb deploy apply [file.org]       deploy to cloud
wb deploy local [preset]         run local container
wb deploy doctor [file.org]      environment health check
wb deploy status [file.org]      deployment status
wb deploy verify [file.org]      post-deploy smoke test
wb deploy down [file.org]        stop local container
wb deploy logs [file.org]        tail container logs
wb deploy build [file.org]       build OCI image only
wb deploy publish [file.org]     push OCI image to registry
wb deploy help

Global flags

FlagDescription
--jsonMachine-readable JSON output (publish/deploy verbs)
--versionPrint version and exit
--helpPrint usage

Exit codes

CodeMeaning
0Success
1Error (message on stderr or in JSON message field)

Building the wb binary

cd runtime
mix escript.build
# → runtime/wb
./wb --version

Copy to PATH:

cp wb /usr/local/bin/wb