Netlify CLI


env

(Beta) Control environment variables for the current site

Usage

netlify env

Flags

  • debug (boolean) - Print debugging information
  • httpProxy (string) - Proxy server address to route requests through.
  • httpProxyCertificateFilename (string) - Certificate file to use when connecting using a proxy server
Subcommanddescription
env:getGet resolved value of specified environment variable (includes netlify.toml)
env:importImport and set environment variables from .env file
env:listLists resolved environment variables for site (includes netlify.toml)
env:setSet value of environment variable
env:unsetUnset 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

env:get

Get resolved value of specified environment variable (includes netlify.toml)

Usage

netlify env:get

Arguments

  • name - Environment variable name

Flags

  • debug (boolean) - Print debugging information
  • httpProxy (string) - Proxy server address to route requests through.
  • httpProxyCertificateFilename (string) - Certificate file to use when connecting using a proxy server

env:import

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 ones
  • debug (boolean) - Print debugging information
  • httpProxy (string) - Proxy server address to route requests through.
  • httpProxyCertificateFilename (string) - Certificate file to use when connecting using a proxy server

env:list

Lists resolved environment variables for site (includes netlify.toml)

Usage

netlify env:list

Flags

  • debug (boolean) - Print debugging information
  • httpProxy (string) - Proxy server address to route requests through.
  • httpProxyCertificateFilename (string) - Certificate file to use when connecting using a proxy server

env:set

Set value of environment variable

Usage

netlify env:set

Arguments

  • name - Environment variable name
  • value - Value to set to

Flags

  • debug (boolean) - Print debugging information
  • httpProxy (string) - Proxy server address to route requests through.
  • httpProxyCertificateFilename (string) - Certificate file to use when connecting using a proxy server

env:unset

Unset an environment variable which removes it from the UI

Usage

netlify env:unset

Arguments

  • name - Environment variable name

Flags

  • debug (boolean) - Print debugging information
  • httpProxy (string) - Proxy server address to route requests through.
  • httpProxyCertificateFilename (string) - Certificate file to use when connecting using a proxy server