Skip to main content

The two modes

elding run

Injects secrets as environment variables in process.env. It works like an improved dotenv, but the key is in your application’s memory.

elding proxy

Your application uses placeholders and the proxy injects the real key into the outgoing request. The key never enters your application’s memory.

Comparison

elding runelding proxy
Secret typesAll secrets: API keys, databases, configurationHTTP API keys only
LanguagesAll languages, including Python, Go, and RubyAnything that sends HTTP requests
Key in application memoryYesNo
Protects against AI or compromised dependenciesNoYes
SimplicityMaximumOne SDK call: configure()
Use casesDatabases, configuration, scripts, CI, other languagesAI-assisted development and HTTP API keys
The proxy only intercepts outgoing HTTP traffic. It protects HTTP API keys such as OpenAI and Stripe. A database connection using DATABASE_URL uses TCP and is outside the proxy’s reach, so use run or secret() instead.

Which mode should you use?

  • Use run for one-off jobs such as migrations or CI builds where simplicity matters most.
  • Use proxy for everyday AI-assisted development, or in production when the key must remain outside application memory.
Organizations can disable run mode with allowEnvMode to enforce a zero-.env proxy workflow.

Production

The proxy must run as a process next to your application. This works in a container, VM, or Kubernetes, but not in serverless environments such as Vercel or Lambda, where a long-running companion process is unavailable.
DeploymentProxy supported?Behavior
Container / VM / KubernetesYesThe proxy keeps the key outside the application.
Serverless (Vercel, Lambda)NoThe SDK switches to client mode and loads the key into memory.
Production does not normally include an AI coding agent in the execution path. The proxy’s primary threat model—an AI agent seeing development keys—is therefore a development concern. Client mode is appropriate for serverless production while still removing .env files and providing centralized rotation, revocation, and audit logs.
With configure(), you do not need to change your code. The SDK uses the proxy when available and automatically switches to client mode otherwise. The same code works in development and production.