mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(cli): add 'coder login token' command to print session token (#21627)
Adds a new subcommand to print the current session token for use in scripts and automation, similar to `gh auth token`. ## Usage ```bash CODER_SESSION_TOKEN=$(coder login token) ``` Fixes #21515
This commit is contained in:
Generated
+6
@@ -15,6 +15,12 @@ coder login [flags] [<url>]
|
||||
By default, the session token is stored in the operating system keyring on macOS and Windows and a plain text file on Linux. Use the --use-keyring flag or CODER_USE_KEYRING environment variable to change the storage mechanism.
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Name | Purpose |
|
||||
|----------------------------------------|---------------------------------|
|
||||
| [<code>token</code>](./login_token.md) | Print the current session token |
|
||||
|
||||
## Options
|
||||
|
||||
### --first-user-email
|
||||
|
||||
Generated
+16
@@ -0,0 +1,16 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# login token
|
||||
|
||||
Print the current session token
|
||||
|
||||
## Usage
|
||||
|
||||
```console
|
||||
coder login token
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
```console
|
||||
Print the session token for use in scripts and automation.
|
||||
```
|
||||
Reference in New Issue
Block a user