| title | Netlify CLI env command |
|---|---|
| description | Control environment variables for the current site |
(Beta) Control environment variables for the current site
Usage
netlify envFlags
debug(boolean) - Print debugging informationhttpProxy(string) - Proxy server address to route requests through.httpProxyCertificateFilename(string) - Certificate file to use when connecting using a proxy server
| Subcommand | description |
|---|---|
env:get |
Get resolved value of specified environment variable (includes netlify.toml) |
env:import |
Import and set environment variables from .env file |
env:list |
Lists resolved environment variables for site (includes netlify.toml) |
env:set |
Set value of environment variable |
env:unset |
Unset an environment variable which removes it from the UI |
Examples
netlify env:list
netlify env:get VAR_NAME
netlify env:set VAR_NAME value
netlify env:unset VAR_NAME
netlify env:import fileNameGet resolved value of specified environment variable (includes netlify.toml)
Usage
netlify env:getArguments
- name - Environment variable name
Flags
debug(boolean) - Print debugging informationhttpProxy(string) - Proxy server address to route requests through.httpProxyCertificateFilename(string) - Certificate file to use when connecting using a proxy server
Import and set environment variables from .env file
Usage
netlify env:importArguments
- fileName - .env file to import
Flags
replaceExisting(boolean) - Replace all existing variables instead of merging them with the current onesdebug(boolean) - Print debugging informationhttpProxy(string) - Proxy server address to route requests through.httpProxyCertificateFilename(string) - Certificate file to use when connecting using a proxy server
Lists resolved environment variables for site (includes netlify.toml)
Usage
netlify env:listFlags
debug(boolean) - Print debugging informationhttpProxy(string) - Proxy server address to route requests through.httpProxyCertificateFilename(string) - Certificate file to use when connecting using a proxy server
Set value of environment variable
Usage
netlify env:setArguments
- name - Environment variable name
- value - Value to set to
Flags
debug(boolean) - Print debugging informationhttpProxy(string) - Proxy server address to route requests through.httpProxyCertificateFilename(string) - Certificate file to use when connecting using a proxy server
Unset an environment variable which removes it from the UI
Usage
netlify env:unsetArguments
- name - Environment variable name
Flags
debug(boolean) - Print debugging informationhttpProxy(string) - Proxy server address to route requests through.httpProxyCertificateFilename(string) - Certificate file to use when connecting using a proxy server