gurl env

Manage environment variables for use in requests.

Usage

gurl env [subcommand] [flags]

Description

The env command group manages environments and variables. Environments allow you to define different variable sets for development, staging, production, etc.

Subcommands

create

Create a new environment.

gurl env create [name] [flags]
FlagShortDefaultDescription
--var-vnoneVariable as KEY=VALUE
--secret-snoneSecret variable (value prompted)

list

List all environments.

gurl env list

Aliases: ls, l

switch

Switch the active environment.

gurl env switch [name]

Aliases: use, activate

delete

Delete an environment.

gurl env delete [name]

Aliases: rm, del

show

Display environment variables.

gurl env show [name]

Aliases: display, view

set

Set a variable in an environment.

gurl env set [name] [flags]
FlagShortDefaultDescription
--var-vnoneVariable as KEY=VALUE
--secret-snoneSecret variable

unset

Remove a variable from an environment.

gurl env unset [name] [flags]
FlagShortDefaultDescription
--var-vnoneVariable name to remove

import

Import variables from a file.

gurl env import [name] [flags]
FlagShortDefaultDescription
--file-fnoneFile to import from

Examples

Create an environment

gurl env create production

Creates a new environment called “production”.

Add variables

gurl env create staging --var "API_URL=https://staging.example.com" --var "DEBUG=false"

Creates staging environment with variables.

Set a secret

gurl env set production --secret "API_KEY"

Sets a secret variable (prompts for value).

Switch environment

gurl env switch production

Makes “production” the active environment.

Import from .env file

gurl env import production --file .env.production

Imports variables from a .env file.

See also