> ## Documentation Index
> Fetch the complete documentation index at: https://www.qovery.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# qovery env

> Environment variable and secret management commands

## Overview

Manage environment variables and secrets for your Qovery services. This command helps you import and parse environment variables.

## Commands

### Import Environment Variables

Import environment variables/secrets for a Qovery service:

```bash theme={null}
qovery env import
```

This command allows you to bulk import environment variables from a file or other source into your Qovery application, container, or job.

### Parse Environment Variables

Parse environment variables and create `.env` (dot env) file:

```bash theme={null}
qovery env parse
```

This command parses environment variables and generates a local `.env` file for development purposes.

## Options

| Flag             | Description       |
| ---------------- | ----------------- |
| `--organization` | Organization name |
| `--project`      | Project name      |
| `--environment`  | Environment name  |
| `--service`      | Service name      |
| `--help`         | Show help         |

## Examples

### Import Variables from File

```bash theme={null}
# Prepare your environment variables in a file
cat > vars.env <<EOF
API_KEY=your-api-key
DATABASE_URL=postgresql://localhost:5432/mydb
FEATURE_FLAG=enabled
EOF

# Import to Qovery service
qovery env import
```

### Parse Variables to .env File

```bash theme={null}
# Generate .env file from Qovery environment
qovery env parse

# This creates a .env file with all environment variables
# from your Qovery environment
```

### Development Workflow

```bash theme={null}
# 1. Parse environment variables from Qovery
qovery env parse

# 2. Use .env file locally
cat .env

# 3. Run your application locally with same variables
npm run dev  # or your local dev command
```

## Managing Service-Specific Variables

For managing environment variables of specific services, use the service-specific commands:

```bash theme={null}
# Application environment variables
qovery application env list
qovery application env create --key "API_KEY" --value "secret"

# Database environment variables
qovery database env list

# Container environment variables
qovery container env list

# Cronjob environment variables
qovery cronjob env list

# Lifecycle job environment variables
qovery lifecycle env list
```

## Tips

<Tip>
  Use `qovery env parse` to keep your local development environment in sync with your Qovery configuration.
</Tip>

<Tip>
  The `import` command is useful for migrating from other platforms or bulk-updating environment variables.
</Tip>

<Warning>
  Never commit `.env` files containing secrets to version control. Add `.env` to your `.gitignore` file.
</Warning>

## Related Commands

* [`qovery application env`](/cli/commands/application) - Manage application environment variables
* [`qovery environment env`](/cli/commands/environment) - Manage environment-level variables
* [`qovery container env`](/cli/commands/container) - Manage container environment variables
* [`qovery cronjob env`](/cli/commands/cronjob) - Manage cronjob environment variables
* [`qovery lifecycle env`](/cli/commands/lifecycle) - Manage lifecycle job environment variables
