Skip to content

Tools ​

Small command-line tools shared across SVRBC projects live in this repository’s tools/ directory. Each is a single file with no dependencies beyond a standard interpreter, and documents itself in --help.

Installing ​

Clone the repository and link each tool onto your PATH, so a git pull updates them:

sh
git clone https://gitlab.com/svrbc/developers.svrbc.org.git ~/projects/developers.svrbc.org
mkdir -p ~/.local/bin
ln -sf ~/projects/developers.svrbc.org/tools/porkbun ~/.local/bin/porkbun

Tools never contain credentials. They read them from the environment or from ~/.env.

porkbun ​

A CLI for the Porkbun v3 API: domains, DNS records and nameserver delegation. It’s written rather than installed because what a wrapper is handed is registrar credentials, and a short, dependency-free script is easier to trust than somebody else’s package.

sh
porkbun ping                                   # which account am I acting as?
porkbun domains --all                          # every configured account
porkbun check <domain>                         # why won’t it resolve?
porkbun dns list <domain> [--type T] [--name N]
porkbun dns set <domain> <type> <name> <content> [--ttl 600]   # an upsert
porkbun dns delete <domain> --id <id>
porkbun ns get|set <domain> [<host> …]         # registry delegation

Credentials. The default account’s keys are PORKBUN_API_KEY and PORKBUN_SECRET_KEY. Each further account is a profile: PORKBUN_<NAME>_API_KEY and PORKBUN_<NAME>_SECRET_KEY, selected with --profile <name>. SVRBC’s domains are all in the svrbc profile (see Domains).

Wrong account. When a command fails because the domain is in another configured account, porkbun names that account. It never switches by itself; rerun with the --profile it suggests.

Beyond the CLI. Porkbun’s API covers far more than these commands (DNSSEC, URL forwarding, SSL, glue records), and every write accepts dryRun. The whole reference is greppable at https://porkbun.com/llms-full.txt. Email forwarding has no API and is control-panel only.