Files
coder/docs/reference/cli/tokens_create.md
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.5 KiB
Markdown
Raw Normal View History

---
# Code generated by make gen. DO NOT EDIT.
title: tokens create
description: Create a token
---
2023-03-23 17:42:20 -05:00
<!-- DO NOT EDIT | GENERATED CONTENT -->
Create a token
## Usage
```console
coder tokens create [flags]
```
## Options
### --lifetime
| | |
|-------------|------------------------------------|
| Type | <code>string</code> |
2023-03-23 17:42:20 -05:00
| Environment | <code>$CODER_TOKEN_LIFETIME</code> |
Duration for the token lifetime. Supports standard Go duration units (ns, us, ms, s, m, h) plus d (days) and y (years). Examples: 8h, 30d, 1y, 1d12h30m.
2023-03-23 17:42:20 -05:00
### -n, --name
| | |
|-------------|--------------------------------|
2023-03-23 17:42:20 -05:00
| 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).
### --scope
| | |
|------|---------------------------|
| Type | <code>string-array</code> |
Repeatable scope to attach to the token (e.g. workspace:read).
### --allow
| | |
|------|-------------------------|
| Type | <code>allow-list</code> |
Repeatable allow-list entry (`<type>:<uuid>`, e.g. workspace:1234-...).