environment Command

The nitro environment commands manage environments. An environment is a workspace-level grouping that holds a list of variables that can be reused across documents in the Nitro UI.

All environment commands require authentication. Run nitro login first or pass --api-key (see Global Options).

nitro environment create#

Create a new environment in a workspace.

nitro environment create --name "<name>"

Options#

OptionEnvDescription
-n, --name <name>Display name of the environment (for example dev, staging, production). Required.
--workspace-id <workspace-id>NITRO_WORKSPACE_IDID of the workspace to create the environment in. Falls back to the workspace from the current session.

When run interactively without --name, the CLI prompts for it.

Examples#

Create an environment in the current workspace:

nitro environment create --name "<name>"

Create an environment in a specific workspace:

nitro environment create \
  --name "<name>" \
  --workspace-id "<workspace-id>"

nitro environment list#

List all environments in a workspace. Results are paginated, use the returned cursor to fetch the next page.

nitro environment list

Options#

OptionEnvDescription
--workspace-id <workspace-id>NITRO_WORKSPACE_IDID of the workspace. Falls back to the workspace from the current session.
--cursor <cursor>NITRO_CURSORPagination cursor to resume from. Useful for non-interactive paging.

nitro environment show#

Show the details of an environment by its ID.

nitro environment show "<environment-id>"

Arguments#

ArgumentDescription
<id>ID of the environment to show. Required.
Edit this page on GitHub
Last updated on by Tobias Tengler