Warp now supports dynamic environment variables in Warp, enabling developers to fetch keys and secrets from external managers such as 1Password or LastPass at runtime rather than keeping them in local .env files. This approach pulls secrets into terminal sessions via a templated command at the moment of use, while avoiding persistent storage of those secrets inside Warp itself.
How it works
Dynamic environment variables are created inside Warp Drive as named, templated commands that invoke an external manager’s CLI or API when loaded into a session. After authenticating with the external manager’s CLI, Warp can search and reference named keys available to the user. When invoked, the templated command fetches the secret into the terminal session on demand.
Key technical points:
- Secrets are not stored in Warp; Warp generates commands that pull values from an external manager at runtime.
- Integration relies on the external manager’s CLI being authenticated beforehand (examples given include 1Password and LastPass).
- Variables can be invoked in standard terminal sessions and in Warpified subshells.
Creating and using environment variables
The creation flow mirrors adding a workflow or notebook in Warp Drive. Important steps:
- Ensure the external manager’s CLI is authenticated.
- Create a new environment variable set within Warp Drive and assign a meaningful name and description.
- Click the key icon and select the external manager and specific named key.
- Save the environment variable; it appears alongside workflows and can be searched via Warp Drive or the Command Palette.
When executed, the templated command fetches the secret into the current session, allowing authentication into different development environments without context switching or local secret files.
Workflows and reuse
Workflows in Warp can now optionally load saved environment variables at runtime. This enables a single parameterized workflow to operate across multiple environments by pairing it with environment-specific dynamic variables rather than maintaining separate workflow variants for each environment. This is particularly useful for repeatable, on-demand runs that require different credentials or tokens.
Dynamic vs. static env vars
Warp retains support for static environment variables for non-sensitive values (for example, endpoint HOST strings). Static variables are stored in Warp Drive and benefit from Warp’s cloud protections. However, static storage in Warp is not recommended as a replacement for a dedicated secret manager for sensitive credentials.
More information about Warp’s security posture is available at the trust center.
Availability
Dynamic and static environment variables are available to all Warp customers in Free Preview. Documentation and setup details are published in the Warp docs and the Warp Drive feature pages. The project credits an intern contribution from Tej Singh.
Read the original announcement and follow setup instructions: https://www.warp.dev/blog/dynamically-sync-env-vars-into-your-terminal-session