@theholocron/holocron-plugin-neon
v4.19.0
Published
Holocron plugin for Neon. Implements the storage capability against Neon's REST API — branch ops, connection strings, extensions.
Downloads
20,621
Readme
@theholocron/holocron-plugin-neon
Neon plugin for Holocron. Implements the storage
capability against Neon's REST API.
Install
pnpm add -D @theholocron/holocron-plugin-neon@alpha
Auth
Token resolution order:
--token <PAT>flag on the holocron invocationHOLOCRON_NEON_API_KEYenv varNEON_API_KEYenv var (the default Neon's own CLI reads)- Keyring
neon.<org>— tried first when an org is active via--org,HOLOCRON_ORG, ororginholocron.config.ts - Keyring
neon— unnamespaced fallback; set viaholocron auth set neon <key>
Config
{
"providers": {
"storage": ["neon", { "projectId": "ancient-resonance-…" }],
},
}
projectId(required) — the Neon project id. The plugin binds to this project; every method operates within it.
What's implemented
| Method | What it does |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| getConnectionString | Fetches the connection URI for a branch. pooled: true returns the PgBouncer URL. |
| listBranches | All branches on the bound project. |
| createBranch | Provisions a branch + a read_write compute endpoint inline (so the next connection-string call doesn't 404). |
| destroyBranch | DELETEs a branch. |
| resetBranch | Restores one branch to match another (Neon "restore branch" endpoint). |
| enableExtension | Runs CREATE EXTENSION IF NOT EXISTS "..." against the branch's default database via Neon's run_sql endpoint. Used for PostGIS, pgvector, etc. |
Vercel-managed Neon orgs reject project-create at the Neon API level
("organization is managed by Vercel"). For those setups, provision
the project via Vercel's marketplace integration (vercel install
neon) — the project becomes visible to Neon's API afterward and
holocron can take it from there. Marketplace provisioning is out of
scope for this plugin (covered by holocron-plugin-vercel if needed
later).
Status
v2.0.0-alpha.0 — published on npm under the alpha dist-tag.
Release notes.
APIs may still shift before stable v2.0.0.
