Bunny
@goodcraft/bunnyv2026.06.24.2
01README
bunny.net automation — idempotently provision CDN pull zones (global geo-zones, AutoSSL, force-HTTPS), add custom hostnames and load free Let's Encrypt certificates, create storage zones, Stream libraries and DNS zones; generated secrets (storage passwords, Stream API keys) auto-vault to 1Password. Pairs with @goodcraft/vercel to point custom domains at a pull zone.
02Models
@goodcraft/bunnyv2026.06.24.2bunny.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| accessKey | string | |
| baseUrl | string |
fn sync()
List the account's pull zones (read-only; proves the API key)
fn provisionPullZone(name: string, originUrl?: string, storageZoneId?: number, type: number, ignoreQueryStrings: boolean, dryRun: boolean)
Idempotently ensure a CDN pull zone exists (find by Name; create if absent) with the Global + AutoSSL + force-HTTPS default profile (Premium tier, all geo-zones, AutoSSL on, stale-while-updating/offline on, query strings honored). Origin is an external originUrl OR a storageZoneId. dryRun=true (default) plans without creating.
| Argument | Type | Description |
|---|---|---|
| name | string | |
| originUrl? | string | |
| storageZoneId? | number | |
| type | number | |
| ignoreQueryStrings | boolean | |
| dryRun | boolean |
fn addHostname(pullZoneId: number, hostname: string, dryRun: boolean)
Idempotently attach a custom hostname to a pull zone (skip if already present). dryRun=true (default) plans without adding.
| Argument | Type | Description |
|---|---|---|
| pullZoneId | number | |
| hostname | string | |
| dryRun | boolean |
fn enableSsl(pullZoneId: number, hostname: string, forceSsl: boolean, dryRun: boolean)
Load a free Let's Encrypt certificate for a pull-zone hostname and (when forceSsl) redirect HTTP to HTTPS. The hostname's DNS must already point at bunny (e.g. the Vercel CNAME is live) or the free-certificate load fails with 400. dryRun=true (default) plans without calling bunny.
| Argument | Type | Description |
|---|---|---|
| pullZoneId | number | |
| hostname | string | |
| forceSsl | boolean | |
| dryRun | boolean |
fn provisionStorageZone(name: string, region: string, replicationRegions: array, dryRun: boolean)
Idempotently ensure a storage zone exists (find by Name; create if absent). Returns the read-write Password and ReadOnlyPassword (vaulted). region is one of DE/NY/LA/SG. dryRun=true (default) plans without creating.
| Argument | Type | Description |
|---|---|---|
| name | string | |
| region | string | |
| replicationRegions | array | |
| dryRun | boolean |
fn provisionStreamLibrary(name: string, replicationRegions: array, dryRun: boolean)
Idempotently ensure a Stream video library exists (find by Name; create if absent). Returns the library id, its underlying pull/storage zone ids, and the ApiKey (vaulted). dryRun=true (default) plans without creating.
| Argument | Type | Description |
|---|---|---|
| name | string | |
| replicationRegions | array | |
| dryRun | boolean |
fn provisionDnsZone(domain: string, dryRun: boolean)
Idempotently ensure a bunny DNS zone exists for a domain (find by Domain; create if absent). Note: only the zone is created — record management stays with your DNS authority. dryRun=true (default) plans without creating.
| Argument | Type | Description |
|---|---|---|
| domain | string | |
| dryRun | boolean |
Resources
pullZones(infinite)— Snapshot of the account's pull zones
pullZone(infinite)— Result of the last provisionPullZone call
hostname(infinite)— Result of the last addHostname call
ssl(infinite)— Result of the last enableSsl call
storageZone(infinite)— Result of the last provisionStorageZone call
streamLibrary(infinite)— Result of the last provisionStreamLibrary call
dnsZone(infinite)— Result of the last provisionDnsZone call
03Previous Versions
2026.06.24.1
04Stats
A
100 / 100
Downloads
2
Archive size
15.6 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
05Platforms
06Labels