mirror of
https://github.com/coder/coder.git
synced 2025-07-10 23:53:15 +00:00
This PR is a proposal to improve the situation described in #14750 For some precise commands - we would like to be able to use durations bigger than hours, minutes.. This PR extends the Duration proposed by Go with : - `d` - a day or 24hours. - `y` - a year or 365 days. I also removed the default value for lifetime and instead fetch the maxLifetime value from codersdk - so by default if no value set we use the value defined in the config.
41 lines
961 B
Markdown
Generated
41 lines
961 B
Markdown
Generated
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
|
|
|
# tokens create
|
|
|
|
Create a token
|
|
|
|
## Usage
|
|
|
|
```console
|
|
coder tokens create [flags]
|
|
```
|
|
|
|
## Options
|
|
|
|
### --lifetime
|
|
|
|
| | |
|
|
| ----------- | ---------------------------------- |
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_TOKEN_LIFETIME</code> |
|
|
|
|
Specify a duration for the lifetime of the token.
|
|
|
|
### -n, --name
|
|
|
|
| | |
|
|
| ----------- | ------------------------------ |
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_TOKEN_NAME</code> |
|
|
|
|
Specify a human-readable name.
|
|
|
|
### -u, --user
|
|
|
|
| | |
|
|
| ----------- | ------------------------------ |
|
|
| Type | <code>string</code> |
|
|
| Environment | <code>$CODER_TOKEN_USER</code> |
|
|
|
|
Specify the user to create the token for (Only works if logged in user is admin).
|