Updates the value and/or secret status of an existing environment variable in an Alpic environment.
Usage
alpic environment-variable update
Prompts to select the variable and enter the new value interactively.
Extended Usage
Update a variable’s value:
alpic environment-variable update --key DATABASE_URL --value postgres://prod/db
Update a variable in a specific environment:
alpic environment-variable update --key PORT --value 8080 --environment-id <environmentId>
Change a variable’s secret status:
alpic environment-variable update --key PORT --no-secret
Options
| Flag | Description |
|---|
--environment-id | The ID of the environment (optional — read from local config if omitted) |
--key | The key of the environment variable to update |
--value | The new value (omit to keep the current value) |
--secret | Mark as secret. Use --no-secret to make it visible |
--non-interactive | Disable interactive prompts. Requires --key and one of --value or --secret/--no-secret |
When running from a directory linked to an Alpic project (via alpic deploy), --environment-id is optional — the
CLI reads it from the local .alpic config file.