What is the work CLI

work is the one Workbooks command line — author, build, run, deploy. It operates on a folder of .work source: it reads the tree, weaves it into a workbook — one shippable artifact — and stands up a Nexus to run it. The same work binary runs natively on your machine and inside the wasm agent sandbox, so an agent has the exact tools you do.

The lifecycle

Working on a workbook follows a simple arc, and each step is one command.

You author — write .work files, then work check to make sure every reference resolves and every block only does what it's allowed to. work structure lists the units in the tree so you can see what you've got, and work why, work near, and work wit answer questions about how blocks depend on each other.

You buildwork weave folds the whole folder into one self-contained HTML artifact. While you're iterating, work dev watches the folder and re-weaves on every change (and hot-swaps into a running Nexus), so the page updates as you type.

You deploywork deploy stands up a runtime, local or cloud, from declarative settings that live with the workbook: scaffold them, validate, apply.

That's the loop: author → build → deploy, all over the same folder.

Command reference

The CLI groups its verbs by what you're doing.

Author — read & verify a tree

VerbWhat it does
work check [dir]resolve references + audit capabilities
work structure [dir]list the units in the tree
work lint [dir]lint the tree for problems
work why :unitwhat a unit depends on (code graph)
work near :unitunits related to one in the graph
work wit :unitthe generated WIT world for a unit

Build — weave & run

VerbWhat it does
work new <template> [dest]scaffold a project you own and edit
work weave <dir> <out>weave the tree into one workbook
work graph <dir> <out>render the code graph as a workbook
work dev <dir>watch & re-weave as you edit

Deploy — stand up a runtime

VerbWhat it does
work deploy initscaffold the deploy config
work deploy validatecheck the deploy config
work deploy applydeploy the config, local or cloud
work deploy <dir> --nexus <name>mount a workbook into a running nexus
work secret set / get / delete <NAME>manage secrets (macOS Keychain)
work secret list / check / schemalist declared secrets, emit a schema

Platform — identity & contexts

VerbWhat it does
work ctx use / set <name>switch or save a target context
work nexus [<url>]list nexuses, or point at an engine
work loginauthenticate to the control plane
work whoamishow your identity
work versionshow the CLI version

Run work help to see the live surface.

For the deploy story end to end, see Deploy: local and cloud.