Skip to main content
Updates the value and/or secret status of an existing environment variable in an Alpic environment.
Authentication is required. Run alpic login or set ALPIC_API_KEY before using this command.

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

FlagDescription
--environment-idThe ID of the environment (optional — read from local config if omitted)
--keyThe key of the environment variable to update
--valueThe new value (omit to keep the current value)
--secretMark as secret. Use --no-secret to make it visible
--non-interactiveDisable 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.