Skip to main content
In production there is no browser and no elding login. You need two environment variables:
ELDING_REFRESH_TOKEN=eld_rt_...   # a long-lived service key
ELDING_SET_ID=...                  # the ID of the set to load
The SDK reads them automatically — your application code does not change between development and production. Run once, locally, in your project folder:
elding login     # if not already signed in
elding init      # if the project is not yet linked to a set
elding deploy
The CLI asks for an optional key name, creates the key, and prints the two variables:
✓ Key "My App Production" created.
  → Visible in your dashboard under API Keys tab.

Add these 2 environment variables to your host (Vercel, etc.):

  ELDING_REFRESH_TOKEN=eld_rt_...
  ELDING_SET_ID=...

⚠ The key is shown only once. Copy it now.
Paste them into your host’s environment settings (Vercel → Settings → Environment Variables, Railway, Render, etc.).
Do not run elding deploy in a CI pipeline with public logs. The token would be exposed. Always run it locally and paste the values manually into your host.

Method 2 — Dashboard

  1. Open elding.app and go to API Keys.
  2. Click New key, give it a name, and copy the ELDING_REFRESH_TOKEN shown once.
  3. Open the target set. Its ID is in the URL: elding.app/vault?set=<ELDING_SET_ID>.
  4. Add both variables to your host’s environment.

What to do with the variables

Once set on your host, the SDK works automatically with no code changes:
// Development: reads secrets from the local proxy
// Production:  reads secrets from the vault via ELDING_REFRESH_TOKEN + ELDING_SET_ID
// Same code, zero change.

import { configure, secret } from "@elding/sdk";

const openai = new OpenAI(await configure("OPENAI_KEY", "https://api.openai.com"));
const dbUrl  = await secret("DATABASE_URL");

Revoke a key

Go to API Keys in the dashboard and click Revoke next to the key. The token is immediately invalidated — no deployment or code change needed.