Files
coder/cli/testdata/coder_tokens_create_--help.golden
Vincent Vielle ccbb687ca0 feat(cli): extend duration to longer units (#15040)
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.
2024-10-16 17:02:56 +02:00

21 lines
475 B
Plaintext

coder v0.0.0-devel
USAGE:
coder tokens create [flags]
Create a token
OPTIONS:
--lifetime string, $CODER_TOKEN_LIFETIME
Specify a duration for the lifetime of the token.
-n, --name string, $CODER_TOKEN_NAME
Specify a human-readable name.
-u, --user string, $CODER_TOKEN_USER
Specify the user to create the token for (Only works if logged in user
is admin).
———
Run `coder --help` for a list of global options.