CLI reference: sparkwing tokens

CLI reference: sparkwing tokens

Every sparkwing tokens command, flag, and argument, generated from the CLI's own command registry. All command groups are indexed in cli-reference.md.

sparkwing tokensSection anchor link

Manage team credentials

SubcommandsSection anchor link

  • create -- Mint a new API token
  • list -- List token prefixes + metadata
  • revoke -- Mark a token revoked
  • rotate -- Mint a replacement token with a grace window

FlagsSection anchor link

FlagDescription
-o, --output FORMATPretty on a terminal; JSON when piped; explicit format wins. Values: pretty, json, plain.
-C, --checkout PATHResolve the project from this local checkout path.
-h, --helpShow command help without executing.
--help-allInclude uncommon flags in command help.

sparkwing tokens createSection anchor link

Mint a new API token

Create a member credential through the team token route. Enroll runners with runners add. The controller derives authority and metering. JSON includes the new bearer and metadata; plain emits the bearer once. A token minted with a profile token is delegated from it: it gets at most the minting token's scopes, including team.admin, and never outlives it.

FlagsSection anchor link

FlagDescription
-o, --output FORMATPretty on a terminal; JSON when piped; explicit format wins. Values: pretty, json, plain.
-C, --checkout PATHResolve the project from this local checkout path.
-h, --helpShow command help without executing.
--help-allInclude uncommon flags in command help.
--type KINDKind of token to create, member by default; runners get credentials from runners add instead. Values: member.
--principal NAMENot used for member tokens, which always belong to the signed-in account that mints them; the value is ignored.
--scope SCOPECredential scope. Repeatable; comma-separated values are accepted.
--ttl DURATIONLifetime of the new token in whole seconds or a duration such as 7d; omitted or zero gives it the remaining lifetime of the token that mints it, which it can never outlive.
--allow-team-adminAsk for team.admin on a token minted from a signed-in account session, which then expires within 30 days; a token minted with a profile token gets team.admin whenever that token holds it, and ignores this flag.
--profile NAMEController connection profile from your config. Optional profiles use the saved default, then local; --profile= selects local.

sparkwing tokens listSection anchor link

List token prefixes + metadata

JSON emits one metadata record per token with exact scopes and no bearer. Plain emits prefixes. --token selects one prefix. Deployment credentials use operator tokens.

FlagsSection anchor link

FlagDescription
-o, --output FORMATPretty on a terminal; JSON when piped; explicit format wins. Values: pretty, json, plain.
-C, --checkout PATHResolve the project from this local checkout path.
-h, --helpShow command help without executing.
--help-allInclude uncommon flags in command help.
--token PREFIXToken identifier or prefix.
--type KINDList only tokens of this kind. Values: member, runner.
--include-revokedAlso list tokens that have been revoked.
--profile NAMEController connection profile from your config. Optional profiles use the saved default, then local; --profile= selects local.

sparkwing tokens revokeSection anchor link

Mark a token revoked

JSON retains the confirmed revocation; plain emits the prefix. A failed or unconfirmed revocation returns an error.

FlagsSection anchor link

FlagDescription
-o, --output FORMATPretty on a terminal; JSON when piped; explicit format wins. Values: pretty, json, plain.
-C, --checkout PATHResolve the project from this local checkout path.
-h, --helpShow command help without executing.
--help-allInclude uncommon flags in command help.
--token PREFIXToken identifier or prefix. (required)
--profile NAMEController connection profile from your config. Optional profiles use the saved default, then local; --profile= selects local.

sparkwing tokens rotateSection anchor link

Mint a replacement token with a grace window

JSON includes the new bearer, metadata and old revocation time; plain emits the new bearer. Grace defaults to 24h. Zero TTL preserves the old remaining lifetime. Durations use nonnegative whole seconds.

FlagsSection anchor link

FlagDescription
-o, --output FORMATPretty on a terminal; JSON when piped; explicit format wins. Values: pretty, json, plain.
-C, --checkout PATHResolve the project from this local checkout path.
-h, --helpShow command help without executing.
--help-allInclude uncommon flags in command help.
--token PREFIXToken identifier or prefix. (required)
--grace DURATIONHow long the old token keeps working after rotation, in whole seconds or a duration, 24h by default; zero revokes it at once.
--ttl DURATIONLifetime of the replacement token in whole seconds or a duration; omitted or zero keeps the old token's remaining lifetime.
--profile NAMEController connection profile from your config. Optional profiles use the saved default, then local; --profile= selects local.