Pular para o conteúdo principal
informação
Esta página ainda não foi traduzida. Você está lendo a versão em English.

envshed token

Manage authentication tokens (personal and service).

Personal Token Subcommands​

envshed token set​

Save an API token, read from stdin or from a masked prompt at a terminal.

terminal
envshed token set --token-stdin < token.txt

Passing the token as an argument, envshed token set <token>, still works but is deprecated and prints a warning: other processes can read it from the command line, and it stays in your shell history.

The token goes to the OS keychain, or to ~/.envshed/config.json where there is no keychain (details).

envshed token show​

Display the current token (masked for security).

terminal
$ envshed token show
envshed_abc...xyz9

envshed token clear​

Remove the saved token from the keychain and from the config file.

terminal
envshed token clear

Service Token Subcommands​

envshed token create-service​

Create a service token for an organization.

terminal
envshed token create-service -o <org-slug> -n <name> [options]
OptionDescriptionDefault
-o, --org <slug>Organization slug (required)—
-n, --name <name>Token name (required)—
-d, --description <text>Token description—
-s, --scope <scope>Scope: org, project, or environmentorg
--project-id <id>Project ID (required for project/environment scope)—
--environment-id <id>Environment ID (required for environment scope)—
-p, --permission <perm>Permission: read or read_writeread
--expires-in <days>Expiration in daysNo expiration

Example:

terminal
envshed token create-service \
-o my-org \
-n "GitHub Actions" \
-s project \
--project-id abc123 \
-p read \
--expires-in 90

envshed token list-service​

List service tokens for an organization.

terminal
envshed token list-service -o <org-slug>
OptionDescription
-o, --org <slug>Organization slug (required)

envshed token revoke-service​

Revoke a service token.

terminal
envshed token revoke-service -o <org-slug> --id <token-id>
OptionDescription
-o, --org <slug>Organization slug (required)
--id <id>Service token ID (required)

envshed token update-service​

Update a service token's name, description, or active status.

terminal
envshed token update-service <id> [options]
OptionDescription
<id>Service token ID (required)
-o, --org <slug>Organization slug (required)
-n, --name <name>New token name
-d, --description <text>Token description
--activeActivate the token
--no-activeDeactivate the token
--output <format>Output format: json

Examples:

terminal
# Rename a token
envshed token update-service abc123 -o my-org --name "GitHub Actions"

# Deactivate a token (revoke access without deleting)
envshed token update-service abc123 -o my-org --no-active

# Reactivate a token
envshed token update-service abc123 -o my-org --active

Notes​

Personal tokens are stored in the OS keychain, or in ~/.envshed/config.json where there is no keychain (details). envshed login saves its token the same way. envshed token set --token-stdin is an alternative where browser-based login isn't possible. On CI, set ENVSHED_TOKEN instead.

Service tokens are managed server-side and are scoped to an organization. See Service Tokens for details.