The evar command is used to manage environment variables in your live app. It has three subcommands:

Subcommand Summary
add Adds one or more key-value pairs as environment variables
load Adds environment variables from a file
rm Removes one or more environment variables
ls Lists environment variables added to your app


The add subcommand is used to add environment variables to your app. You can add a single key-value pair, or a space-delimited list of key-value pairs.

add Usage

# Pattern
nanobox evar add [<local | dry-run | {remote-alias}>] <key>=<value>
nanobox evar add [<local | dry-run | {remote-alias}>] <key1>=<value1> <key2>=<value2>

# Examples
nanobox evar add ENVIRONMENT=production
nanobox evar add staging ENVIRONMENT=staging
nanobox evar add local ENVIRONMENT=local MY_EVAR="This is mine"


The load subcommand is used to add environment variables to your app from a file. You can add a single file, or a space-delimited list of files/filepaths.

load Usage

# Pattern
nanobox evar load [<local | dry-run | {remote-alias}>] path/to/file

# Examples
nanobox evar load config/evars
nanobox evar load staging config/evars
nanobox evar load local config/evars1 config/evars2 .env

Note: For file paths with spaces in directory names, wrap the path in quotes or escape the space(s).

Environment Variable Files

Loaded files should consist of key value pairs. Values containing spaces or special characters should be wrapped in double quotes "". Below is an example file showing supported key-value formats.


another multiline
value surrounded
by whitespace

key="yes, even spaces and = are allowed as values"
export key=value
export key="you're welcome ;)"

Note: Variable exports and whitespace between key-value pairs don't matter. They'll get stripped out.


The rm subcommand is used to remove environment variables from app. You can remove a single environment variable, or a comma-delimited list of environment variables.

rm Usage

# Pattern
nanobox evar rm [<local | dry-run | {remote-alias}>] <key>
nanobox evar rm [<local | dry-run | {remote-alias}>] <key1> <key2>

# Examples
nanobox evar rm ENVIRONMENT
nanobox evar rm staging ENVIRONMENT
nanobox evar rm local ENVIRONMENT MY_EVAR


The ls subcommand outputs all environment variables registered in your app.

ls Usage

# Pattern
nanobox evar ls [<local | dry-run | {remote-alias}>]

# Example
nanobox evar ls
nanobox evar ls staging
nanobox evar ls local

Reach out to and we'll try to help.