title | description |
---|---|
Netlify CLI env command |
Control environment variables for the current site |
(Beta) Control environment variables for the current site
Usage
netlify env
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
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 fileName
Get resolved value of specified environment variable (includes netlify.toml)
Usage
netlify env:get
Arguments
- 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:import
Arguments
- 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:list
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
Set value of environment variable
Usage
netlify env:set
Arguments
- 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:unset
Arguments
- 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