Workbench developer docs中文

CLI reference

wb --help lists the commands and links to these docs. Every command that talks to Workbench uses the token wb login stored in the macOS keychain.

CommandWhat it does
wb loginSigns you in through your browser and stores your personal token in the keychain.
wb logoutRevokes the stored token in Workbench and deletes it from the keychain.
wb whoamiYour name, company, role, and when the token expires.
wb connectionsYour company's connections the CLI can call: name, kind and the hosts each one reaches. Never a key.
wb call <connection> <path>Calls <path> on the connection's vendor and prints the vendor's JSON.
wb tokenPrints your token, for a script, your own app or an MCP client.

wb login

wb login

Opens Workbench's sign-in page in your browser and prints a code. Check that the page shows the same code, then press Authorise. The token lasts 90 days; run wb login again to get a new one.

wb call

wb call <connection> <path> [--data <json|@file>] [--method <METHOD>]
wb call render 'v1/services?limit=20'
wb call serper search --data '{"q": "MMBT3904 datasheet"}'
wb call gitlab api/v4/projects/123 --method PUT --data @project.json

A call that asks for a stream ("stream": true in --data, or ?stream=true) prints the events as they arrive. If Workbench cut the stream, wb call ends with its reason and exit code 1.

wb token

export WB_TOKEN=$(wb token)

Prints the stored token. See Using the token in your own app.

Exit status

0 when the call succeeded; otherwise non-zero, with Workbench's reason on stderr (see Limits and errors).