Skip to content

CLI Reference

The ioenv CLI is the primary interface for managing environment variables from the terminal.

Installation

bash
npm install -g @ioenv/cli

Commands

ioenv login

Authenticate with ioenv via GitHub OAuth.

bash
ioenv login

ioenv init

Link the current directory to an ioenv project.

bash
ioenv init

ioenv pull

Download variables to a local .env file.

bash
ioenv pull                  # pull default environment
ioenv pull --env=staging    # pull a specific environment
ioenv pull --format=json    # output as JSON

ioenv push

Upload a local .env file to ioenv.

bash
ioenv push                  # push from .env
ioenv push --env=dev        # push to a specific environment
ioenv push --file=.env.local  # push from a custom file

ioenv set

Set a single variable.

bash
ioenv set KEY=value
ioenv set API_KEY=sk-xxx --secret    # mark as secret
ioenv set KEY=value --env=prod       # set in a specific environment

ioenv get

Get the value of a single variable.

bash
ioenv get KEY
ioenv get KEY --env=prod

ioenv diff

Compare variables between two environments.

bash
ioenv diff dev prod
ioenv diff dev staging --format=table

ioenv inject

Run a command with injected environment variables.

bash
ioenv inject -- npm start
ioenv inject --env=staging -- node server.js

ioenv token

Manage API tokens.

bash
ioenv token create --name="CI deploy"
ioenv token list
ioenv token revoke <token-id>

Global Options

FlagDescription
--org <name>Override the default organization
--project <name>Override the default project
--env <name>Specify the target environment
--format <type>Output format: env, json, table
--helpShow help for any command
--versionPrint the CLI version

Environment Cloud for Developers & AI Teams