Logo

CLI Guide

Project Management

A project groups variables and environments under a single namespace inside an organization. The CLI lets you create projects and pin a project + environment to the current directory so subsequent commands inherit the context.

Before You Begin

Logged in via envv login --token <API_KEY>.

Have at least one organization (created during signup).

Creating a Project

Create a project non-interactively with name and description flags:

envv project create -n my-app -d "Customer-facing web app"

Or call without flags for an interactive prompt:

envv project create
? Project name: my-app
? Description (optional): Customer-facing web app
✓ Created project my-app (proj_xxx)

Selecting a Project for the Current Directory

envv use opens an interactive picker — search projects, then choose an environment:

cd ~/code/my-app
envv use

? Select a project: my-app
? Select an environment: development
✓ Wrote .envv.json

Subsequent envv env, envv secrets, and envv run calls in this directory auto-load the project + environment from .envv.json.

The .envv.json File

The picker writes a small JSON file in the current directory:

{
  "project_id": "proj_2bk9...",
  "project_name": "my-app",
  "selected_environment": "development"
}

The file contains no secrets — only IDs & names. Committing it makes the project context reproducible for teammates, but most teams keep it untracked because the project ID is internal. envv logout removes the file from the current directory.

Override via Environment Variables

For CI pipelines or scripts, skip the picker entirely by exporting the project ID:

export ENVVAULT_TOKEN=evk_xxxxxxxxxxxxxxxx
export ENVVAULT_PROJECT=proj_2bk9
export ENVVAULT_ENV=production

envv env list
envv run -- npm run deploy

Env vars take precedence over .envv.json. Useful for ephemeral CI jobs that should not write any files into the workspace.

Switching Projects

Just run envv use again — the picker will overwrite .envv.json with the new selection.

cd ~/code/my-other-app
envv use   # picks a different project for this directory

Project context is directory-scoped. Two terminals in different directories can safely operate on different projects.