Skip to main content
Lists, sets, removes or replaces the environment variables of an application. For list, the application ID is optional and resolved from the argument, then the squarecloud.app config file, then an interactive picker. For set, remove and replace, pass the application ID with --app instead, since the positional arguments are used for variable names.
squarecloud app env list
# Lists the environment variables of the app from squarecloud.app or an interactive picker.
squarecloud app env list <appID> --json
# Lists a specific app's variables as JSON.
squarecloud app env set KEY=VALUE ANOTHER=VALUE --app <appID>
# Sets one or more variables without touching the rest.
squarecloud app env set --from-file .env --app <appID>
# Sets variables read from a .env style file.
squarecloud app env remove KEY ANOTHER --app <appID>
# Removes one or more variables. Aliases: "delete", "unset".
squarecloud app env replace KEY=VALUE --app <appID>
# Replaces the ENTIRE set of variables with the ones provided; existing ones not listed are removed.
The replace subcommand is destructive: it asks for y/N confirmation before wiping the existing variables. Pass -y/--yes to skip the prompt.
squarecloud app env replace --from-file .env --app <appID> -y
# Replaces all variables from a file without a confirmation prompt.
Use squarecloud app env --help for more information about this command.