mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
cadf1352b4
<!-- If you have used AI to produce some or all of this PR, please ensure you have read our [AI Contribution guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) before submitting. --> Add support for scoped API tokens in CLI This PR adds CLI support for creating and viewing API tokens with scopes and allow lists. It includes: - New `--scope` and `--allow` flags for the `tokens create` command - A new `tokens view` command to display detailed information about a token - Updated table columns in `tokens list` to show scopes and allow list entries - Updated help text and examples These changes enable users to create tokens with limited permissions through the CLI, similar to the existing functionality in the web UI.
35 lines
677 B
Plaintext
35 lines
677 B
Plaintext
coder v0.0.0-devel
|
|
|
|
USAGE:
|
|
coder tokens
|
|
|
|
Manage personal access tokens
|
|
|
|
Aliases: token
|
|
|
|
Tokens are used to authenticate automated clients to Coder.
|
|
- Create a token for automation:
|
|
|
|
$ coder tokens create
|
|
|
|
- List your tokens:
|
|
|
|
$ coder tokens ls
|
|
|
|
- Create a scoped token:
|
|
|
|
$ coder tokens create --scope workspace:read --allow workspace:<uuid>
|
|
|
|
- Remove a token by ID:
|
|
|
|
$ coder tokens rm WuoWs4ZsMX
|
|
|
|
SUBCOMMANDS:
|
|
create Create a token
|
|
list List tokens
|
|
remove Delete a token
|
|
view Display detailed information about a token
|
|
|
|
———
|
|
Run `coder --help` for a list of global options.
|