Skip to content

Latest commit

 

History

History
147 lines (97 loc) · 3.42 KB

File metadata and controls

147 lines (97 loc) · 3.42 KB
title description
Netlify CLI env command
Control environment variables for the current site

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
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

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