burrow is a Bunny.net CLI written in Go.
- Install Go (1.21+)
- Build and run:
go build ./cmd/burrow
./burrow --helpOr:
make build
./bin/burrow --helpInstall to your $GOBIN / $GOPATH/bin:
make install
burrow --helpAuthenticate once (stores your API key securely when possible):
burrow auth login
burrow auth statusNon-interactive options:
export BUNNY_API_KEY="..."
burrow auth login
printf "%s" "$BUNNY_API_KEY" | burrow auth login --stdinCredential store selection:
- macOS: Keychain (
security) - Linux:
secret-tool, thenpass, else file fallback - Windows: Registry (value encrypted via DPAPI using
powershell)
Override with BURROW_CREDENTIAL_STORE=keychain|secret-tool|pass|registry|file.
Generic API caller (works for any Bunny.net endpoint when you know METHOD + PATH):
burrow api GET /pullzone
burrow api GET /pullzone/123 --pretty
burrow api POST /pullzone --json '{"Name":"example"}'Base URL resolution:
--base-url https://...BURROW_BASE_URL=https://...burrow config set --base-url https://...
Discover endpoints from the local contract:
burrow endpoints list
burrow endpoints resolve GET /pullzone/123
burrow endpoints call GET /pullzone/{id} --param id=123endpoints call uses base_url from the contract when available (e.g. Stream API uses https://video.bunnycdn.com).
Setup diagnostics:
burrow doctor
burrow doctor --check-authContracts are local JSON describing endpoints (see contracts/contract.json for the format).
Initialize and validate:
burrow contracts init
burrow contracts validateSync from Bunny.net API reference docs (recommended):
burrow contracts sync
burrow contracts validateImport from an OpenAPI JSON document (if Bunny publishes one):
burrow contracts import-openapi --file ./openapi.json
# or:
burrow contracts import-openapi --url https://example.com/openapi.jsonQueue a docs scrape and run it:
burrow scrape enqueue --url "https://docs.example.com/api-reference"
burrow scrape runBulk-enqueue from a sitemap:
burrow scrape sitemap --url "https://docs.example.com/sitemap.xml"
burrow scrape runOptional LLM-assisted analyzer:
- Set
BURROW_LLM_ANALYZERto an executable that reads analyzer input JSON on stdin and prints an updated contract JSON on stdout. - Reference implementation (heuristic, no LLM):
go build ./cmd/burrow-analyzerthenexport BURROW_LLM_ANALYZER=./burrow-analyzer.
Analyzer protocol:
- stdin: JSON
{ "url": "...", "html": "<raw>", "contract": { ... } } - stdout: updated contract JSON (and nothing else)