> ## Documentation Index
> Fetch the complete documentation index at: https://widgetic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Command reference

> Every command of the widgetic CLI: the REST API and the MCP tools, generated from the contracts it is built from.

The `widgetic` command line has one binary and two namespaces. Every command is generated from the contracts the gateway publishes, so this reference lists exactly what the CLI can do.

* `widgetic api <group> <command>`: 159 operations of the public REST API, in 14 groups.
* `widgetic mcp <command>`: 48 tools of the MCP server (tool contract 1.22.0), the AI build tools.
* `widgetic auth`, `widgetic doctor`, `widgetic update`, `widgetic schema`, `widgetic completion`: log in, check the install and the servers, look for a newer version of the CLI and install it, print the schema of one command, and complete commands with the Tab key.
* `widgetic api call <operationId>` and `widgetic mcp call <tool>` run a command by the name the contract gives it.

## Every command takes

| Flag | What it does |
| - | - |
| `--json` | Print the result as one line of JSON. An error is `{"error":{"code","message","status","requestId"}}` on standard error. Nothing is ever asked. |
| `--dry-run` | Print what would be sent (the API key is left out) and send nothing. |
| `--yes` | Go ahead without asking, for a command that deletes or changes something. Needed where there is no terminal. |
| `--profile <name>` | The saved API key to use (default: `WIDGETIC_PROFILE`, else `default`). |
| `--timeout <seconds>` | Give up on a call after this many seconds (default: 60). |

## Exit codes

| Code | Meaning |
| - | - |
| 0 | It worked. |
| 1 | Anything else: a bug, or a server error that was not expected. |
| 2 | The command line or a JSON document is wrong. Nothing was sent. |
| 3 | Authentication or plan: no key, or a 401, 402 or 403. |
| 4 | Not found (404 or 410). |
| 5 | The server refused the request (400, 409, 422, another 4xx, or a tool that answered with an error). |
| 6 | Rate limited or unavailable (429, 502, 503, 504), a timeout, or no network. A `Retry-After` is honoured. |
| 7 | This CLI is too old (426): `widgetic update`, or `npm install -g @widgetic/cli@latest`. |

## REST groups

| Group | Commands | |
| - | - | - |
| `brand-kit` | 8 | [widgetic api brand-kit](https://widgetic.com/docs/cli/commands/api-brand-kit.md) |
| `canvases` | 5 | [widgetic api canvases](https://widgetic.com/docs/cli/commands/api-canvases.md) |
| `compositions` | 39 | [widgetic api compositions](https://widgetic.com/docs/cli/commands/api-compositions.md) |
| `credits` | 2 | [widgetic api credits](https://widgetic.com/docs/cli/commands/api-credits.md) |
| `entitlements` | 2 | [widgetic api entitlements](https://widgetic.com/docs/cli/commands/api-entitlements.md) |
| `invoices` | 1 | [widgetic api invoices](https://widgetic.com/docs/cli/commands/api-invoices.md) |
| `managed-users` | 18 | [widgetic api managed-users](https://widgetic.com/docs/cli/commands/api-managed-users.md) |
| `operations` | 1 | [widgetic api operations](https://widgetic.com/docs/cli/commands/api-operations.md) |
| `partners` | 41 | [widgetic api partners](https://widgetic.com/docs/cli/commands/api-partners.md) |
| `tokens` | 1 | [widgetic api tokens](https://widgetic.com/docs/cli/commands/api-tokens.md) |
| `uploads` | 5 | [widgetic api uploads](https://widgetic.com/docs/cli/commands/api-uploads.md) |
| `users` | 13 | [widgetic api users](https://widgetic.com/docs/cli/commands/api-users.md) |
| `widgets` | 4 | [widgetic api widgets](https://widgetic.com/docs/cli/commands/api-widgets.md) |
| `workflows` | 19 | [widgetic api workflows](https://widgetic.com/docs/cli/commands/api-workflows.md) |

10 operations (`public-embed`) are left out of `--help` and of this reference: browsers call them, with no key. `widgetic api call <operationId>` runs one.

## MCP tools

[widgetic mcp](https://widgetic.com/docs/cli/commands/mcp.md): 48 commands.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.