CLI reference / hub app <name>
hub app <name> env
List the environment variable names of the app.
Values are stored encrypted and never printed. Setting or removing a variable restarts the app with it, or rebuilds it for a variable set with --build.
Usage
hub app <name> env [options] [command]Arguments
| Argument | Description |
|---|---|
<name> | The app, or app/instance for an instance other than prod, such as my-app/staging. |
Examples
# List the names
hub app my-app env
# Set a variable
hub app my-app env set GREETING=hi
# Be asked for the value, so it stays out of shell history
hub app my-app env set API_KEY
# Set every variable in a dotenv file
hub app my-app env set --file .env
# Remove a variable
hub app my-app env unset GREETINGhub app <name> env set
Set environment variables (a bare NAME prompts for the value).
Usage
hub app <name> env set [options] [pairs...]Arguments
| Argument | Description |
|---|---|
[pairs...] | NAME=value, or a bare NAME to be prompted for it. Optional. |
Options
| Option | Description |
|---|---|
--build | Make these available at build time too. |
--file <path> | Read more NAME=value pairs from a dotenv file; pairs above win over it. |
hub app <name> env unset
Remove environment variables.
Usage
hub app <name> env unset [options] <names...>Arguments
| Argument | Description |
|---|---|
<names...> | Environment variable names. |