CLI Reference
The ioenv CLI is the primary interface for managing environment variables from the terminal.
Installation
bash
npm install -g @ioenv/cliCommands
ioenv login
Authenticate with ioenv via GitHub OAuth.
bash
ioenv loginioenv init
Link the current directory to an ioenv project.
bash
ioenv initioenv 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 JSONioenv 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 fileioenv 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 environmentioenv get
Get the value of a single variable.
bash
ioenv get KEY
ioenv get KEY --env=prodioenv diff
Compare variables between two environments.
bash
ioenv diff dev prod
ioenv diff dev staging --format=tableioenv inject
Run a command with injected environment variables.
bash
ioenv inject -- npm start
ioenv inject --env=staging -- node server.jsioenv token
Manage API tokens.
bash
ioenv token create --name="CI deploy"
ioenv token list
ioenv token revoke <token-id>Global Options
| Flag | Description |
|---|---|
--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 |
--help | Show help for any command |
--version | Print the CLI version |