kindgi tokens
kindgi tokens
Section titled “kindgi tokens”Synopsis
kindgi tokens <command>API keys for you, a person or a service account: create (its secret shown once), list, get, revoke.
Commands
| Command | Description |
|---|---|
kindgi tokens create |
Create an API key, for you or (a tenant admin) for someone else. |
kindgi tokens list |
List API keys, newest first, revoked ones included; never secrets. |
kindgi tokens get |
One API key, by id. |
kindgi tokens revoke |
Revoke an API key: from its next request on, it is refused. |
See also
kindgi tokens create
Section titled “kindgi tokens create”Synopsis
kindgi tokens create [--for=user:<id>|sa:<id>] [--role=member|admin] [--project=<project-id>] [--expires=30d|<iso-date>] [--label=<text>] [--capability=<cap>]…Create an API key, for you or (a tenant admin) for someone else. Its secret is printed once, here: store it now, nothing shows it again. A member key takes no admin action on the workspace; a key limited to a project acts only there.
Options
| Option | Default | Description |
|---|---|---|
--capability <value> |
none | A capability it carries (repeatable); you must hold it. Repeatable. |
--expires <value> |
none | When it stops working: 30d, 12h, 90m from now, or an ISO date. |
--for <value> |
none: the key is for you | Whom it acts for: user:<id> or sa:<service-account-id> (default: you). |
--label <value> |
none | What the key is for, e.g. ci. |
--project <value> |
none | Limit the key to this project. |
--role <value> |
member |
member (the default) or admin (needs a tenant admin, for one). |
Every command also takes the global flags.
Examples
From People, API keys and service accounts:
npx --yes @kindgi/cli@0.8 tokens create --for=sa:<service-account-id> --role=admin --capability=signing-keys:write --capability=secrets:write --label=admin --expires=90dnpx --yes @kindgi/cli@0.8 tokens create --label=laptop --expires=30dSee also
kindgi tokens list
Section titled “kindgi tokens list”Synopsis
kindgi tokens list [--for=user:<id>|sa:<id>] [--limit=<n>] [--cursor=<c>] [--table]List API keys, newest first, revoked ones included; never secrets. A tenant admin sees every key (--for narrows to one principal); anyone else, their own, and a key or session with limits only those within them.
Options
| Option | Default | Description |
|---|---|---|
--cursor <value> |
none | Resume after this cursor, from the previous page's nextCursor. |
--for <value> |
none | Only this principal's keys (tenant admins). |
--limit <value> |
25 (at most 100) |
The most keys to return. |
Every command also takes the global flags.
Examples
From People, API keys and service accounts:
npx --yes @kindgi/cli@0.8 tokens list --tableSee also
kindgi tokens get
Section titled “kindgi tokens get”Synopsis
kindgi tokens get <token-id>One API key, by id. No secret.
Options
Every command also takes the global flags.
Examples
Show one API key, without its secret.
kindgi tokens get <token-id>See also
kindgi tokens revoke
Section titled “kindgi tokens revoke”Synopsis
kindgi tokens revoke <token-id>Revoke an API key: from its next request on, it is refused. Every key minted with it, and with those in turn, is revoked with it.
Options
Every command also takes the global flags.
Examples
Revoke an API key.
kindgi tokens revoke <token-id>From Serve many tenants:
npx --yes @kindgi/cli@0.8 tokens revoke <key id>See also