Skip to main content
The CLI groups commands by resource. Run chatblocks --help to see the top-level surface, or chatblocks <group> --help to dig into one.
Most read commands accept --json to dump raw JSON instead of the human table. Streaming commands print progress events with a · prefix and a final summary line.

Auth

chatblocks login

Log in by pasting an API key. Validates by calling workspace.get before writing config.
Writes ~/.chatblocks/config.json with mode 0600. See Install.

chatblocks logout

Removes ~/.chatblocks/config.json.

chatblocks whoami

Prints the workspace name, plan, key prefix, and base URL.

Blocks

chatblocks blocks list

List blocks in the current workspace.
Flags:
  • --published — show only published blocks.
  • --json — raw JSON output instead of a table.
Sample table:

chatblocks blocks get <id>

Print one block as JSON.

chatblocks blocks new <prompt>

Stream a new block from a prompt. Uses the AI block generator (blocks.create) — Builder plan only.
Progress streams to stdout:
The generated block is saved as a draft (isPublished: false). To ship it, run blocks.build then blocks.publish via your coding agent or the in-app editor.

Canvases

chatblocks canvases list

List canvases in the workspace.

chatblocks canvases get <id>

Print one canvas as JSON.

Data sources

chatblocks data-sources list

List data sources in the workspace.
Sample table:
Data sources are a Builder beta. Create / edit is not in the CLI today — use the web wizards at /settings/data-sources/new/<type> or the MCP tools (dataSources.add, dataSources.editRefreshPolicy, dataSources.delete). Free workspaces can still list and delete existing sources.

Schedule

All schedule commands are Builder-only. Free workspaces will see PRO_REQUIRED errors from the underlying MCP tools.

chatblocks schedule list

chatblocks schedule history <id>

Show recent run history for a scheduled run.
Flags:
  • --limit <n> — number of rows to fetch (default 50, max 200).
  • --json — raw JSON.

chatblocks schedule preview <prompt>

Stream a one-off preview of a scheduled prompt. No row is saved; the runner mints an ephemeral key, runs the loop, and deletes the key when done. See Preview and run-now.
Required flags:
  • --byok <id> — BYOK key id (find via byokKeys.list over MCP or /settings/api-keys).
  • --model <id> — must be in the model whitelist (claude-opus-4-7, claude-sonnet-4-6, claude-haiku-4-5, gpt-5.5, gpt-5.4-mini, gpt-5).
Optional:
  • --block <id> — focus the run on a specific block (the agent has a clearer target for blocks.setWidgetData).
Progress events stream to stdout; the final line is success/failure summary.

chatblocks schedule run <id>

Trigger a one-off run of an existing saved schedule. Wraps schedule.runNow.
The actual run happens on Trigger.dev’s worker; a scheduledRunHistory row appears within ~10–30 seconds.

Global

CHATBLOCKS_BASE_URL env var

Overrides the stored baseUrl per invocation. Useful for pointing at a Convex dev deploy without re-running login.

What’s next

Install

Get the CLI on your machine and log in.

MCP tool reference

The full tool surface — every CLI command wraps one of these.