devver secret
Manage environment secrets for your project.
devver secret <subcommand>Secrets are stored encrypted on Devver and injected as environment variables at deploy time.
Subcommands
set <key> <value>
Sets a single secret.
devver secret set DATABASE_URL "postgres://..."| Argument | Type | Required | Description |
|---|---|---|---|
key | string | ✓ | Secret name |
value | string | ✓ | Secret value |
set --file <path>
Imports all secrets from a .env file at once.
devver secret set --file .env.production| Flag | Type | Required | Description |
|---|---|---|---|
--file, -f | string | ✓ | Path to a .env file |
--file cannot be combined with key / value arguments.
list
Lists the keys of all secrets defined for the current project (values are not displayed).
devver secret listdelete <key>
Removes a secret.
devver secret delete DATABASE_URL| Argument | Type | Required | Description |
|---|---|---|---|
key | string | ✓ | Secret name to delete |
Examples
# Set individual secrets
devver secret set NODE_ENV production
devver secret set JWT_SECRET "s3cr3t-k3y"
# Bulk import from a .env file
devver secret set --file .env.production
# List all secret keys
devver secret list
# Remove a secret
devver secret delete OLD_API_KEYBest practices
- Never commit secrets to your repository. Use
devver secret set --fileto import from a local.envthat is listed in.gitignore. - Rotate secrets by running
devver secret set <key> <new-value>— existing deployments are not affected until the next deploy.