mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
<!-- 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.
43 lines
999 B
Markdown
Generated
43 lines
999 B
Markdown
Generated
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
|
# tokens list
|
|
|
|
List tokens
|
|
|
|
Aliases:
|
|
|
|
* ls
|
|
|
|
## Usage
|
|
|
|
```console
|
|
coder tokens list [flags]
|
|
```
|
|
|
|
## Options
|
|
|
|
### -a, --all
|
|
|
|
| | |
|
|
|------|-------------------|
|
|
| Type | <code>bool</code> |
|
|
|
|
Specifies whether all users' tokens will be listed or not (must have Owner role to see all tokens).
|
|
|
|
### -c, --column
|
|
|
|
| | |
|
|
|---------|---------------------------------------------------------------------------------------|
|
|
| Type | <code>[id\|name\|scopes\|allow list\|last used\|expires at\|created at\|owner]</code> |
|
|
| Default | <code>id,name,scopes,allow list,last used,expires at,created at</code> |
|
|
|
|
Columns to display in table output.
|
|
|
|
### -o, --output
|
|
|
|
| | |
|
|
|---------|--------------------------|
|
|
| Type | <code>table\|json</code> |
|
|
| Default | <code>table</code> |
|
|
|
|
Output format.
|