CLI
cluz env
Set, list and remove environment variables and secrets from the terminal.
| Command | What it does |
|---|---|
cluz env list | List variables. Secret values are hidden. |
cluz env set | Create or update one or more variables. |
cluz env rm | Remove variables. |
cluz env set PORT=8080 LOG_LEVEL=info
cluz env set DATABASE_URL --secret < db-url.txt
cluz env set STRIPE_KEY --secret
cluz env set NEXT_PUBLIC_SITE_URL=https://shop.example.com --build
cluz env set NPM_TOKEN --secret --build
cluz env list
cluz env rm LOG_LEVELPass KEY alone to read the value from stdin, which keeps secrets out of your shell history. --secret or -s stores it as a secret. --build makes it available at build too, and --build=false makes it the app's alone. A variable updated without --build keeps what it had.
-e staging or -e preview targets another environment, and production is the default. list answers to ls, and rm to remove and unset.
Changes reach the running app on the next deploy. Environment and secrets explains the rest.