Skip to main content

eai env

Manage environment variables between your local development environment and the cloud.

Description

The eai env command group synchronizes environment configuration between your local .env.local file and the platform's cloud configuration. This ensures your local development environment has the correct API endpoints, authentication settings, and feature flags.

Subcommands

SubcommandDescription
eai env pullDownload cloud configuration to local .env.local
eai env listShow current environment variables
eai env pushPush local configuration overrides to cloud (admin only)

eai env pull

Sync cloud configuration to your local .env.local file.

Syntax

eai env pull [options]

Description

Downloads the current environment configuration from the cloud and writes it to your local .env.local file. This is typically one of the first commands you run after cloning a project and authenticating, as it populates the API endpoints and configuration values needed for local development.

Example

eai env pull
tip

Run eai env pull after eai login to ensure your local environment is configured correctly before starting development.


eai env list

Show current environment variables.

Syntax

eai env list [options]

Description

Displays the environment variables currently set in your local configuration. Useful for verifying that your environment is configured correctly without opening the .env.local file directly.

Example

eai env list

eai env push

Push local configuration overrides to the cloud.

Syntax

eai env push [options]

Description

Uploads local configuration overrides to the cloud configuration. This command is restricted to administrators and is used to update shared environment settings that other developers will receive when they run eai env pull.

caution

This command requires administrator privileges. Pushing incorrect configuration values can affect all developers on the project. Use with care.

Example

eai env push
  • eai login -- Authenticate before pulling environment configuration
  • eai dev -- Start the development server (requires environment to be configured)
  • eai doctor -- Diagnose .env.local completeness issues