Declare env vars in khal-app.json
Add an env array to your manifest. Each entry names a variable and describes it:
Field reference
The env var name as your service reads it (e.g.
process.env.EXAMPLE_API_KEY).Human-readable description. Shown in the platform’s config UI.
If
true, the platform blocks install until a value is set.Default value when
required is false. Always a string — cast it in your service code.Controls how the value is entered and stored. Use
secret for anything sensitive — API keys, tokens, passwords.Optional storage hint.
config is plain configuration; vault forces the platform to use its secret store. Secrets default to vault.Accessing env vars from your service
Standard Bun / Nodeprocess.env:
Frontend — do not read secrets
Your frontend runs in the user’s browser or desktop shell. Anything it can read, the user can read. For a feature flag or a non-secret value, have your service publish it over NATS or return it from a service action:What the platform does for you
At install time the platform reads yourenv array, prompts the operator for values, and injects them into your service process. That’s it — from your service’s perspective, they’re just environment variables on process.env.
How the platform stores and injects them (secret stores, rotation, pod env vs mounted files) is not your concern and is not part of the SDK contract. Don’t build against implementation details — just declare, read, and move on.
What’s next
Backend overview
Where your service runs and how it talks to the frontend.
Customer install
What the customer admin supplies per install — the other side of
env[].