|
| 1 | +import Snippet from '~/components/snippet' |
| 2 | +import Caption from '~/components/text/caption' |
| 3 | +import { InlineCode } from '~/components/text/code' |
| 4 | +import Note from '~/components/text/note' |
| 5 | +import Link from '~/components/text/link' |
| 6 | + |
| 7 | +export const meta = { |
| 8 | + editUrl: 'pages/docs/now-cli/now-cli-mdx/commands/env.mdx', |
| 9 | + lastEdited: '2020-04-13T22:03:42.000Z' |
| 10 | +} |
| 11 | + |
| 12 | +## Env |
| 13 | + |
| 14 | +The `now env` command is used to manage Environment Variables under a Project, providing functionality to list, add, remove, and pull. |
| 15 | + |
| 16 | +### Basic Usage |
| 17 | + |
| 18 | +<Snippet dark text="now env ls" /> |
| 19 | +<Caption>Using the <InlineCode>now env</InlineCode> command to list all Environment Variables under a Project.</Caption> |
| 20 | + |
| 21 | +<Snippet dark text="now env add" /> |
| 22 | +<Caption>Using the <InlineCode>now env</InlineCode> command to add an Environment Variable to a Project.</Caption> |
| 23 | + |
| 24 | +<Snippet dark text="now env rm" /> |
| 25 | +<Caption>Using the <InlineCode>now env</InlineCode> command to remove an Environment Variable from a Project.</Caption> |
| 26 | + |
| 27 | +<Snippet dark text="now env pull" /> |
| 28 | +<Caption>Using the <InlineCode>now env</InlineCode> command to download Development Environment Variables from the cloud and write to the <InlineCode>.env</InlineCode> file.</Caption> |
| 29 | + |
| 30 | +### Extended Usage |
| 31 | + |
| 32 | +<Snippet dark text="now env ls [environment]" /> |
| 33 | +<Caption>Using the <InlineCode>now env</InlineCode> command to list Environment Variables for a specific Environment under a Project.</Caption> |
| 34 | + |
| 35 | +<Snippet dark text="now env add [name] [environment]" /> |
| 36 | +<Caption>Using the <InlineCode>now env</InlineCode> command to add an Environment Variable to a Project.</Caption> |
| 37 | + |
| 38 | +<Snippet dark text="now env add [name] [environment] < [file]" /> |
| 39 | +<Caption>Using the <InlineCode>now env</InlineCode> command to add an Environment Variable to a Project using a local file as the value.</Caption> |
| 40 | + |
| 41 | +<Snippet dark text="now env rm [name] [environment]" /> |
| 42 | +<Caption>Using the <InlineCode>now env</InlineCode> command to remove an Environment Variable from a Project.</Caption> |
| 43 | + |
| 44 | +<Snippet dark text="now env pull [file]" /> |
| 45 | +<Caption>Using the <InlineCode>now env</InlineCode> command to download Development Environment Variables from the cloud and write to a specific file.</Caption> |
| 46 | + |
| 47 | +### Global Options |
| 48 | + |
| 49 | +The following [global options](#options) can be passed when using the `now env` command: |
| 50 | + |
| 51 | +- `--debug` |
| 52 | +- `--global-config` |
| 53 | +- `--help` |
| 54 | +- `--local-config` |
| 55 | +- `--token` |
| 56 | + |
| 57 | +For more information on global options and their usage, refer to the [options section](#options). |
0 commit comments