Command-line interface (CLI)
The willet CLI exposes the same operations as the MCP tools, scriptable from any shell.
Install
The CLI is published to npm and needs Node.js 20 or newer.
npm install -g @willet/cliThe installed binary is willet. It talks to Willet Cloud by default: https://willet.bgenc.dev.
Log in (Willet Cloud)
For interactive use, log in through the browser. This opens a device-authorization page and stores a short-lived token under ~/.willet/.
willet loginOnce approved, confirm the active identity:
willet whoamiClear stored credentials with willet logout.
Use an API secret (scripts, CI, self-hosted)
For unattended use, skip the browser login and provide a secret in WILLET_API_TOKEN.
export WILLET_API_TOKEN=...
willet whoami- Scope is either user (every project you can access) or project (a single project).
- Access level is read (read-only) or read_write (full access).
- WILLET_API_TOKEN takes precedence over a stored login and is never written to disk.
Target a self-hosted server
Point the CLI at your own Willet server in any of three ways (highest precedence first):
--api-url <url>a global flag on any commandWILLET_API_URLan environment variableapiUrlan apiUrl field in~/.willet/config.json
Self-hosted servers don't support willet login; authenticate with WILLET_API_TOKEN set to a user secret from the server's config file.
Output & scripting
--jsonprints raw JSON instead of a human summary; pipe it to a tool like jq.-p <projectId>most ticket commands need a project UUID.- the tags flag is space-separated, not comma-separated:
--tags backend perf
willet --json ticket create "Set up CI" -p $PROJECT --type chore --tags ci infraCommand reference
Commands are grouped by resource. Each group has its own subcommands:
| Group | Subcommands |
|---|---|
willet ticket | list, search, get, create, update, delete, start, complete, cancel, reopen, comment, link, unlink, graph, tags |
willet project | list, create, delete, restore, set-key-prefix, stats, members |
willet org | list, create, update, delete, members |
willet github | list, link, unlink |
willet render | board, dependency-graph |
See the exact flags for any command with willet <group> --help.
Exit codes
Scripts can branch on the process exit code:
0 | Success |
1 | Generic or network error |
2 | Authentication failed (401) |
3 | Forbidden (403), e.g. a read-only secret used for a write |
4 | Not found (404) |
Next
Everything the CLI does, it does over the REST API. Use the API directly when you'd rather not shell out.
REST API reference →