Documentation Index
Fetch the complete documentation index at: https://docs.vers.sh/llms.txt
Use this file to discover all available pages before exploring further.
vers env manages environment variables that Vers injects into new VMs at boot. The variables are written to /etc/environment, so they’re available to SSH sessions and anything launched via vers execute.
vers env only affects newly-created VMs. Existing VMs keep the environment they were booted with.Synopsis
Subcommands
vers env list
List all environment variables configured for your account.
| Option | Description |
|---|---|
--format json | Machine-readable output |
ls.
vers env set
Set an environment variable.
Constraints
KEYmust be a valid shell identifier: letters, digits, underscores; cannot start with a digit.KEYis at most 256 characters.VALUEis at most 8192 characters.
vers env delete
Remove an environment variable. The key is no longer injected into new VMs; existing VMs are unaffected.
Aliases: del, rm, remove.
How it works
Injected at VM boot
When a new VM is provisioned (
vers run, vers branch, vers run-commit, vers build), the orchestrator writes every variable to /etc/environment before handing the VM over.Use cases
- Secrets: API keys, database URLs, webhook tokens — available to every VM without leaking into your Dockerfile or
vers.toml. - Feature flags:
DEBUG=true,FEATURE_X=on. - Per-account defaults: any variable you want every VM you create to inherit.
vers build + ENV or write to /etc/environment in a RUN step.
Common Patterns
Bulk-load from a local .env file
Clear every variable
Verify injection on a fresh VM
See also
- vers build — bake environment into a specific commit via
ENV - vers execute — commands inherit
/etc/environment - vers connect — SSH sessions inherit
/etc/environment