@kody/doppler
Use Doppler secrets in secret-aware fetch through a read-only service token, without the agent ever seeing the values.
IntegrationsTopics: doppler, secrets, secret-provider, vault, credentials, service-token
- Version
- 1.0.0
- License
- Published
- October 28, 2026
- Pinned commit
b4a631e- Rating
- No ratings yet
- Forks
- 0
- Adaptation effort
- —
README
Agent docs@kody/doppler
Intent
A reference Kody custom secret provider for Doppler.
Fork it into your own Kody org, bind it, and your agent and packages can use
Doppler secrets in fetch requests without the agent, the package code, or the
chat ever seeing the values. Kody resolves the secret at the network boundary,
sends it only to the hosts you allow, and redacts it from responses.
It is meant to be read, forked, and adapted. It is small on purpose.
What it does
- Declares the Kody provider id
dopplerand a sealed./secretProviderexport that Kody calls when a request contains a Doppler placeholder. - Reads one secret at a time from the Doppler REST API at
api.doppler.comwith a read-only Doppler service token (Bearer auth).- Computed values (references expanded) come from the secrets download endpoint, limited to the one secret requested.
- Raw values come from the single secret endpoint.
- Releases the value only to the destination hostnames you list in the binding config. With no hosts configured it refuses (fails closed).
- Refuses Doppler personal and CLI tokens, because they can read and write your whole Doppler account.
- Turns Doppler errors (401, 403, 404, 429, 5xx) into short, actionable messages that never include the token, response bodies, or secret values. It never logs.
A second export (.) returns a plain description of the provider and a bind
template. It never talks to Doppler.
Prerequisites
- A Kody account where you can create packages and bind secret providers.
- A Doppler workplace with a project and config that holds the secrets you want to use.
Setup
- Fork this package into your Kody org from its page on kody.codes. Kody binds providers and resolves secret-provider slots against packages in your own org, so you use your fork, not this copy. Publish your fork once.
- Create a Doppler service token in your own Doppler project and config.
In the Doppler dashboard, open the project, pick the config, open the
Access tab, choose Generate, keep access read-only, and copy the
token (Doppler shows it once). The Doppler CLI can do the same:
doppler configs tokens create <token-name> --project <project> --config <config> --plain. See Doppler service tokens. - Save the token in Kody as a user secret named
dopplerServiceToken, withapi.doppler.comas its only allowed host. Use Kody's secret setup page and paste the token there, never into a chat: save dopplerServiceToken. - Bind your fork on your org's Secret providers page
(
/@<your-slug>/-/secret-providers) with:- provider:
doppler - package: your fork
- door secret:
dopplerServiceToken - config: at least
hosts, the hostnames your Doppler secrets may be sent to, for example{"hosts":"api.example.com"}.
- provider:
- Use it. In a secret-aware
fetch, reference a Doppler secret by name:Authorization: Bearer {{secret/doppler:s/<SECRET_NAME>}}. Ad hoc runs need nothing more. A saved package also needs a provider slot and a per-secret grant (next section).
Binding config
All values are non-secret and live on the binding, never in code.
| Key | Required | Meaning |
|---|---|---|
hosts | yes, unless every secret has its own list | Comma-separated hostnames a resolved value may be sent to. |
hosts.<SECRET_NAME> | no | Hostnames for one secret. Wins over hosts. |
project | no | Doppler project slug. Set together with config. |
config | no | Doppler config slug. Set together with project. |
A service token already implies its project and config, so you can usually
leave project and config out. Set them when you want the binding to state
which config it reads, or when you use a Doppler service account token.
Point a consumer package at the provider
A saved package that uses Doppler placeholders declares a provider slot in its
package.json that names your fork:
"kody": {
"credentials": {
"vault": {
"kind": "secret-provider",
"package": "@your-slug/doppler",
"description": "Reads the deploy API token from Doppler."
}
}
}Then write the placeholder literally in its fetch calls. Each secret name
the package uses also needs an Allow grant for that package, from your
Secret providers page. See
Custom secret providers.
Adapting it
- Other output formats. The provider returns one value per placeholder,
so it asks Doppler for
format=jsonand picks one key. If you need a whole dotenv or YAML document (for example to upload a config file), add a new ref form that calls the download endpoint withformat=envorformat=yaml. Think hard first: that sends every secret in the config to the destination. - Multiple configs. One provider id binds to one package and one door
token. For several configs (for example staging and production), fork once
per config and give each fork its own
kody.secretProvider.id(such asdoppler-stganddoppler-prd) and its own service token secret. Alternatively, use a Doppler service account token that can read several configs and add a ref form that names the project and config. - Name transformers and dynamic secrets. The download endpoint also
supports
name_transformerandinclude_dynamic_secrets. Add them insrc/secret-provider.tsif you need them. - Keep the safety rules when you change things: never log, never put the
token or a value in an error, keep the token on
api.doppler.com, and keep empty host lists failing closed.
Done when
- Your fork is published and bound as provider
doppler. - An ad hoc secret-aware
fetchto one of your allowed hosts with a{{secret/doppler:s/<SECRET_NAME>}}placeholder succeeds. - Saved packages that need a Doppler secret have a provider slot and a grant.
Agent notes live in AGENTS.md.
Report this listing
Log in to report this listing.