mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
Adds `coder secret import <file>` to bulk-import dotenv, JSON, or YAML secrets through the existing batch API. The command infers the format from the extension or accepts `--input-format`, supports non-interactive stdin, validates files locally before upload, and warns when imported keys cannot be injected as environment variables. Reviewed and updated by Coder Agents on behalf of @dylanhuff-at-coder.
47 lines
1.0 KiB
Plaintext
47 lines
1.0 KiB
Plaintext
coder v0.0.0-devel
|
|
|
|
USAGE:
|
|
coder secret
|
|
|
|
Manage secrets
|
|
|
|
Aliases: secrets
|
|
|
|
- Create a secret:
|
|
|
|
$ printf %s "$MYCLI_API_KEY" | coder secret create api-key --description
|
|
"API key for workspace tools" --env API_KEY --file "~/.api-key"
|
|
|
|
- Update a secret:
|
|
|
|
$ echo -n "$NEW_SECRET_VALUE" | coder secret update api-key --description
|
|
"Rotated API key" --env API_KEY --file "~/.api-key"
|
|
|
|
- Import secrets from a file:
|
|
|
|
$ coder secret import ./secrets.env
|
|
|
|
- List your secrets:
|
|
|
|
$ coder secret list
|
|
|
|
- Show a specific secret:
|
|
|
|
$ coder secret list api-key
|
|
|
|
- Delete a secret:
|
|
|
|
$ coder secret delete api-key
|
|
|
|
SUBCOMMANDS:
|
|
create Create a secret
|
|
delete Delete a secret
|
|
disable Disable a secret without removing it
|
|
enable Enable a secret so it is injected into workspaces
|
|
import Import secrets from a file
|
|
list List secrets, or show one by name
|
|
update Update a secret
|
|
|
|
———
|
|
Run `coder --help` for a list of global options.
|