Build with the CLI
Build a kit from the terminal.
The open-source wk CLI takes a kit from a JSON file to a running worker: read the guide, validate, publish private, install and run. Public publishing is temporarily paused. Every write validates first and asks before it acts, and every command speaks JSON for scripts and agents.
Step 1
Install wk and sign in.
At sign-in an account admin approves the code your terminal shows and picks what the CLI may do. Grant the scopes below; the key lands in your OS keychain.
| Scope | What building a kit uses it for |
|---|---|
publishKits | Validate, publish, edit, replace, unlist and delete your kits, and set the publisher name. |
installKits | Preview the install form and install the private kit as a new worker. |
manageAppsAndWorkers | Optional: fill worker slots or change the installed worker's apps afterwards. |
manageDeployments | Deploy the new worker so it runs at all. Install with deploy set, or deploy after. |
runWorkers | Start the test run. |
readRuns | Read what the run returned. Without it the receipt comes back with its content withheld. |
readWorkers | Which apps are connected, your kits with their moderation state, and the scan reports. |
- npm
npm install -g @workerkit/cli - Homebrew
brew install workerkit/tap/wk - Sign in: an account admin approves in the browser and picks the scopes
wk auth login wk auth key-info
wk auth key-info prints the scopes the key really carries. In CI, a WK_MANAGER_KEY environment variable carries the key without touching a profile.
Step 2
Read the guide and the vocabulary.
No sign-in needed for the guide, the tool explorer or the vocabulary. The apps list says which apps your workers can reach right now.
- The guide and one app, no sign-in needed
wk kit guide --section index wk kit guide --section schema wk kit tools --app tasks wk kit vocabulary --app tasks - What the worker will actually reach
wk apps list
An app the platform does not offer is reached through its MCP server: wk mcp-servers create registers it as your own, wk mcp-servers set-tools enables what the job needs, and the kit binds it by the id wk mcp-servers list shows.
Step 3
Write kit.json and validate it.
Every gate at once: errors that would block, warnings that would not, and the install-form fields your text declares.
- Every gate at once; exits 1 while the kit cannot publish
wk kit validate --file kit.json
A complete kit.json is on the build hub. Pipe the JSON on stdin instead of --file when another program writes it.
Step 4
Publish it private, install it, run it.
Publish validates first and asks before it acts; install previews the form first. The new worker runs only once it is deployed.
- Publish it private: validates, asks, then publishes
wk kit publish --file kit.json --private - Install it, deploy the new worker, run it
wk kit install <slug> --preview wk kit install <slug> wk deploy <tokenId> wk run <tokenId> --follow
A publish is not idempotent: every success creates another listing, so after a timeout check wk kit mine before you run it again. Install prints the new worker's key once; keep it. Answer an install form with --inputs '{...}', and a decision kit's questions with --decision-answers '{...}'.
Publishing a worker you already tuned is the same command, with sourceWorkerId in the file instead of content (the body); there is nothing to dry-run, so it goes straight to the confirmation.
Step 5
Keep improving it privately.
Use --private for replacement. Public publishing, promotion and relisting are temporarily paused.
- Update the private kit, then read it back
wk kit replace <slug> --file kit.json --private wk kit mine
Private creation, replacement, installation and test runs remain available.
In scripts
Unattended, and machine-readable.
--json is a stable machine contract and --yes skips the confirmations, so a script or an agent can run the whole sequence. wk kit validate exits 1 while the kit cannot publish, and every body-carrying command exits 2 when it is given no JSON.
Edit, unlist and delete are on the build hub, and every other command is on the CLI page. The same steps run from your AI assistant and over the API.