Files
coder/enterprise/cli/testdata/coder_--help.golden
T
Zach 139dab7cfe feat(cli): optionally store session token in OS keyring (#20256)
This change implements optional secure storage of the CLI token using the operating system
 keyring for Windows, with groundwork laid for macOS in a future change. Previously, the
 Coder CLI stored authentication tokens in plaintext configuration files, which posed a
 security risk because users' tokens are stored unencrypted and can be easily accessed by
 other processes or users with file system access.

The keyring is opt-in to preserve compatibility with applications (like the JetBrains
Toolbox plugin, VS code plugin, etc). Users can opt into keyring use with a new
`--use-keyring` flag.

The secure storage is platform dependent. Windows Credential Manager API is used on Windows.
The session token continues to be stored in plain text on macOS and Linux. macOS is omitted
for now while we figure out the best path forward for compatibility with apps like Coder Desktop.

https://www.notion.so/coderhq/CLI-Session-Token-in-OS-Keyring-293d579be592808b8b7fd235304e50d5

https://github.com/coder/coder/issues/19403
2025-10-30 17:41:08 -06:00

81 lines
2.9 KiB
Plaintext

coder v0.0.0-devel
USAGE:
coder [global-flags] <subcommand>
Coder v0.0.0-devel — A tool for provisioning self-hosted development
environments with Terraform.
- Start a Coder server:
$ coder server
- Get started by creating a template from an example:
$ coder templates init
SUBCOMMANDS:
aibridge Manage AIBridge.
external-workspaces Create or manage external workspaces
features List Enterprise features
groups Manage groups
licenses Add, delete, and list licenses
prebuilds Manage Coder prebuilds
provisioner View and manage provisioner daemons and jobs
server Start a Coder server
GLOBAL OPTIONS:
Global options are applied to all commands. They can be set using environment
variables or flags.
--debug-options bool
Print all options, how they're set, then exit.
--disable-direct-connections bool, $CODER_DISABLE_DIRECT_CONNECTIONS
Disable direct (P2P) connections to workspaces.
--disable-network-telemetry bool, $CODER_DISABLE_NETWORK_TELEMETRY
Disable network telemetry. Network telemetry is collected when
connecting to workspaces using the CLI, and is forwarded to the
server. If telemetry is also enabled on the server, it may be sent to
Coder. Network telemetry is used to measure network quality and detect
regressions.
--force-tty bool, $CODER_FORCE_TTY
Force the use of a TTY.
--global-config string, $CODER_CONFIG_DIR (default: ~/.config/coderv2)
Path to the global `coder` config directory.
--header string-array, $CODER_HEADER
Additional HTTP headers added to all requests. Provide as key=value.
Can be specified multiple times.
--header-command string, $CODER_HEADER_COMMAND
An external command that outputs additional HTTP headers added to all
requests. The command must output each header as `key=value` on its
own line.
--no-feature-warning bool, $CODER_NO_FEATURE_WARNING
Suppress warnings about unlicensed features.
--no-version-warning bool, $CODER_NO_VERSION_WARNING
Suppress warning when client and server versions do not match.
--token string, $CODER_SESSION_TOKEN
Specify an authentication token. For security reasons setting
CODER_SESSION_TOKEN is preferred.
--url url, $CODER_URL
URL to a deployment.
--use-keyring bool, $CODER_USE_KEYRING
Store and retrieve session tokens using the operating system keyring.
Currently only supported on Windows. By default, tokens are stored in
plain text files.
-v, --verbose bool, $CODER_VERBOSE
Enable verbose output.
———
Report bugs and request features at https://github.com/coder/coder/issues/new