# CLI Reference

Complete reference for all KeyEnv CLI commands.

Source: https://keyenv.dev/docs/cli/

The KeyEnv CLI provides commands for managing secrets from your terminal.

## Global Options

These options work with all commands:

| Option | Description |
|--------|-------------|
| <code>--json</code> | Output JSON instead of human-readable text |
| <code>-q, --quiet</code> | Minimize output (only essential info) |
| <code>--no-color</code> | Disable colored output |
| <code>-v, --verbose</code> | Enable verbose output |
| <code>-h, --help</code> | Print help information |
| <code>-V, --version</code> | Print version |

## Command Categories

### Authentication
- [`login`](/docs/cli/authentication#login) - Authenticate with KeyEnv
- [`logout`](/docs/cli/authentication#logout) - Clear stored credentials
- [`whoami`](/docs/cli/authentication#whoami) - Display current user

### Projects
- [`init`](/docs/cli/projects#init) - Initialize a project
- [`projects`](/docs/cli/projects#projects) - List all projects
- [`switch`](/docs/cli/projects#switch) - Switch to a different project

### Secrets
- [`pull`](/docs/cli/secrets#pull) - Pull secrets from server
- [`push`](/docs/cli/secrets#push) - Push secrets to server
- [`list`](/docs/cli/secrets#list) - List all secrets
- [`get`](/docs/cli/secrets#get) - Get a secret value
- [`set`](/docs/cli/secrets#set) - Set a secret value
- [`delete`](/docs/cli/secrets#delete) - Delete a secret
- [`export`](/docs/cli/reference#export) - Export secrets to various formats

### Workflow
- [`run`](/docs/cli/workflow#run) - Run command with secrets
- [`diff`](/docs/cli/workflow#diff) - Compare local and remote secrets
- [`history`](/docs/cli/workflow#history) - View secret history

### Security
- [`scan`](/docs/cli/reference#security) - Scan for hardcoded secrets in your codebase

### Tokens
- [`tokens list`](/docs/cli/reference#tokens) - List all service tokens
- [`tokens create`](/docs/cli/reference#tokens) - Create a new service token
- [`tokens revoke`](/docs/cli/reference#tokens) - Revoke a service token
- [`tokens rotate`](/docs/cli/reference#tokens) - Rotate a service token

### Teams
- [`team list`](/docs/cli/reference#teams) - List your teams
- [`team show`](/docs/cli/reference#teams) - Show team details and members
- [`team invite`](/docs/cli/reference#teams) - Invite a member to a team
- [`team role`](/docs/cli/reference#teams) - Update a member's role
- [`team remove`](/docs/cli/reference#teams) - Remove a member from a team

### Rotations
- [`rotations`](/docs/cli/reference#rotations) - Manage secret rotation configurations

### Update
- [`update check`](/docs/cli/reference#update) - Check for CLI updates
- [`update install`](/docs/cli/reference#update) - Install the latest CLI version

### Utility
- [`completions`](/docs/cli/reference#shell-completions) - Generate shell completion scripts

See the [full reference](/docs/cli/reference) for all commands on a single page.
