A scoped token is a bearer credential that acts as you, limited to up to 10 folders of one workspace and to a role. Give one to a bot or service that should only see one folder, such as one user's users/USER_ID folder in a shared workspace. Everything the token does stays inside its folders: reading, writing, listing, history of its files, search and memory recall and answers. It works on main only, and cannot manage the workspace, its members, the organization or billing.
Minting needs admin on every folder. Missing folders are created. A scoped token with the admin role can mint narrower tokens inside its own folders, never wider ones, and a token never outlives the token that minted it. Revoking a token revokes every token minted from it, and requests with them fail at once.
wiele token create --workspace extent --path users/u_123 --role write --label "bot for u_123"
wiele token list --workspace extent
wiele token revoke --workspace extent tok_0123456789abcdef0123456789abcdef
The bearer value starting wst_ is printed once. Wiele stores only its hash. Pass it as Authorization: Bearer wst_... to the HTTP API or MCP endpoint.
wiele token
.
wiele token <subcommand> [flags]
wiele token create
Mint a bearer token limited to folders of a workspace. Missing folders are created. Needs admin on every folder; the token value is printed once.
wiele token create [flags]
| Flag | Description |
|---|---|
--workspace string |
Workspace ID, slug or name. Not needed inside a checkout or when the path is written as WORKSPACE:/path. |
--org string |
Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use. |
--path string |
Required. A folder the token may use, such as users/u1; / for the whole workspace. |
--role read|write|admin |
What the token may do inside its folders. Default: read. |
--label string |
Required. What the token is for. |
--expires-at string |
RFC 3339 instant after which the token stops working. |
--idempotency-key string |
UUIDv7 that makes the request safe to retry. Each run generates one; pass the same key to replay a request after a timeout. |
wiele token list
List the workspace's unrevoked tokens you manage.
wiele token list [flags]
| Flag | Description |
|---|---|
--workspace string |
Workspace ID, slug or name. Not needed inside a checkout or when the path is written as WORKSPACE:/path. |
--org string |
Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use. |
--after string |
Continue after this token id, from nextCursor. |
wiele token revoke
Revoke a token and every token minted from it. It stops working at once.
wiele token revoke [flags] <token-id>
| Argument | Description |
|---|---|
<token-id> |
Token ID from wiele token list, tok_... |
| Flag | Description |
|---|---|
--workspace string |
Workspace ID, slug or name. Not needed inside a checkout or when the path is written as WORKSPACE:/path. |
--org string |
Organization ID or slug. Default: the checkout's organization when the workspace comes from the checkout, otherwise the one picked with wiele org use. |