The rise of AI agents operating on local codebases has turned a onceโbenign habitโstoring API keys directly in .env filesโinto a potential liability. When an agent can read or modify your repository, any plaintext secret tucked into environment variables becomes as exposed as handing over your workstation to a stranger. Even if the agent itself is trustworthy, accidental logging, screenshots, or copyโpaste can leak credentials into shared spaces, undermining the very isolation that local development promises. This shift has prompted developers to rethink how secrets are handled during iterative, agentโassisted workflows, especially when the goal is to keep the repository itself free of raw credentials while still providing the runtime with the keys it needs.
Existing secretโmanagement tools such as 1Password CLI, Infisical, direnv, dotenvโbased loaders, and chamber already address the problem of keeping secrets out of source control. Each offers a robust vault, policy engine, or injection mechanism, but they often come with overhead that feels disproportionate for a solo developer or a small team working on a laptop. Setting up a remote secret server, managing access tokens, or learning a new CLI syntax can slow down the rapid feedback loops that local development thrives on. Consequently, many practitioners look for a solution that is both lightweight and tightly integrated with the operating systemโs native credential storage, without requiring a separate server or complex configuration.
EnvVault was created to fill that niche: a minimal, localโfirst secret launcher that treats the OS credential store as the source of truth while keeping only references in the projectโs .env file. Instead of duplicating secrets across multiple tools, EnvVault stores the actual values in macOS Keychain (or, via goโkeyring, in the credential stores of Windows and Linux) and resolves references like envvault://openai/dev at launch time. The resolved value is injected directly into the child processโs environment, ensuring that the repository never contains raw keys, yet the application receives exactly what it expects. This approach marries the simplicity of a dotenv file with the security of a systemโbacked vault.
In its default mode, EnvVault employs a direct credential flow. When a developer runs envvault exec
The direct credential flow offers compelling advantages for everyday local development. By leveraging the operating systemโs credential store, EnvVault benefits from builtโin encryption, biometric gating (Touch ID or Windows Hello), and seamless backup mechanisms that many developers already trust. Unlike a dedicated secret server, there is no additional service to run, no network latency, and no need to manage API tokens for the vault itself. This makes the tool particularly attractive for macOS users who already rely on Keychain for passwords, certificates, and other secrets, allowing them to extend the same trust boundary to development API keys without leaving their familiar workflow.
Early iterations of EnvVault experimented with a localhost proxy mode, wherein the child process would receive a shortโlived, proxyโspecific token instead of the real API key. The proxy would inspect each outbound request, verify it against an allowโlist of methods and paths, then attach the actual credential before forwarding the request to the upstream service. While this approach can further reduce the exposure of the raw keyโsince the child never sees the true secretโit proved to be niche in practice. Many SDKs and HTTP libraries do not expose hooks for inserting a custom bearer token based on dynamic request inspection, limiting the scenarios where the proxy could be used without code changes.
Despite its reduced feature set, the proxy mode remains an intriguing option for specialized use cases. If an SDK or framework accepts a custom base URL and a bearer tokenโas is common with OpenAIโcompatible endpointsโEnvVault can generate a temporary token that is meaningful only to the local proxy. The proxy then consults the OS credential store, retrieves the real provider key, and attaches it to authorized requests. This splitโtoken model adds a layer of indirection that can thwart accidental logging of the proxy token, because the token itself is useless outside the proxyโs context. However, developers must verify that their target library permits overriding the base URL and token; otherwise, they must fall back to the direct credential flow.
Getting started with EnvVault is deliberately straightforward. On macOS, a single Homebrew command (brew install envvault) makes the binary available. After installation, developers can add credentials via the CLI (envvault credential add
For those who prefer to avoid a .env file altogether, EnvVault supports inline environment variable syntax. By placing a double dash (–) after the envvault exec command, everything that follows is treated as the child command, allowing statements like envvault exec — python script.py OPENAI_API_KEY=envvault://openai/dev. This pattern ensures that the parser knows where the EnvVault reference ends and the actual program arguments begin, preventing accidental injection of unintended variables. The inline approach is especially useful for quick experiments, oneโoff scripts, or CIโlike scenarios where a temporary .env file would be overkill.
EnvVaultโs design shines when paired with SDKs that read API keys straight from the process environment, such as the official Google Gemini SDK or many OpenAIโcompatible libraries. Because the direct credential flow places the real secret into the expected environment variable before the child process starts, the SDK behaves exactly as it would with a traditional .env entryโno code changes, no extra configuration, and no runtime overhead. This high degree of compatibility lowers the adoption barrier: developers can try EnvVault on an existing project, verify that the application still receives its keys, and then commit the updated .env containing only references, knowing that the repository is now free of raw secrets.
When proxy mode is viable, the workflow shifts slightly but remains developerโfriendly. After storing the provider credential, the developer runs envvault proxy create
From a security standpoint, EnvVaultโs guarantees are purposefully scoped. It ensures that repositories, .env files, commandโline histories, and standard output streams do not contain plaintext API keys, thereby reducing the likelihood of accidental exposure via Git commits, shared screenshots, or log aggregation systems. However, EnvVault does not attempt to sandbox the child process or prevent the secret from being read from memory once the process is running; if a malicious actor gains access to the running application, they could still extract the key from its environment. This limitation is intentional: the tool aims to shrink the โsurface areaโ where secrets can leak, not to provide a fullโblown runtime isolation sandbox.
Failโclosed behavior further reinforces safety: if EnvVault cannot resolve a referenceโfor example, because the credential has not been stored or the keychain is lockedโit refuses to launch the child process altogether rather than falling back to any existing environment variable. This prevents a misconfiguration from silently leaking a fallback key that might be less privileged or, worse, a production secret. Developers receive a clear error message prompting them to add the missing credential or unlock their keychain, fostering a habit of explicit secret management rather than reliance on ambient variables.
Looking ahead, EnvVaultโs roadmap remains modest, reflecting its origins as a personal tool. Potential enhancements include richer proxy policies (such as perโcredential rate limiting), firstโclass support for multiโproject contexts, and a plugin system that would allow agents to automatically invoke envvault exec when they need to run a command. The agentโfocused โskillโ already present in the repository demonstrates how an AI assistant can be taught to request secretโprotected executions, aligning the toolโs goals with the emerging paradigm of AIโaugmented development.
For teams and individual developers wrestling with the tradeโoff between convenience and security, EnvVault offers a pragmatic middle step. If you are working primarily on macOS (or can adapt the goโkeyring backend for Windows/Linux), already trust your OS credential store, and want to keep your Git history free of raw API keys, give EnvVault a try. Install via Homebrew, populate your keychain with the needed secrets, replace the values in your .env with envvault:// references, and launch your workflows through envvault exec. Over time, monitor whether the reduced exposure aligns with your risk tolerance, and consider whether the proxy mode adds value for any specific services you use. By making the secretโmanagement step explicit and lightweight, EnvVault helps you develop with confidence that your credentials stay where they belongโout of the repository and under the control of your operating systemโs secure storage.