squarecloud app env manages the environment variables of an application. How your application reads them is covered in Environment variables.
list takes the app ID as its argument. set, remove and replace use their arguments for variables, so they take the ID with --app. Both are optional: see how the CLI finds your app.
squarecloud app env list
Usage
KEY=value, sorted by name.
squarecloud app env set
Usage
Sets one or more variables and leaves the others as they are.
Output
squarecloud app env remove
Usage
delete, unset
squarecloud app env replace
Usage
Replaces the entire set of variables with the ones you pass: variables you don’t list are removed. It asks for
y/N confirmation first, and needs at least one variable. To remove every variable, use remove --all.
Values with spaces and special characters
Your application loads its variables through a shell. So that it receives each value exactly as you typed it, the CLI quotes values that contain spaces or characters such as$, &, ; or #. env list then shows the stored value with those quotes.
The --from-file format
- One
KEY=VALUEper line. Blank lines, lines starting with#and lines without=are skipped. - An
exportprefix is allowed, and a UTF-8 BOM at the start of the file is ignored. - A value in matching quotes is taken as it is between them.
- In an unquoted value, anything from
#on is a comment:A=foo #barsetsfoo. Quote values that contain#. - Escape sequences and values that span several lines are not supported.

