Skip to content
OverseedAIPublic

About

CLI wrapper for Porkbun API, optimized for agentic use

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

43 Commits

Folders and files

Repository files navigation

opork

CLI wrapper for the Porkbun API, optimized for agentic use.

Install

npm install -g opork

Agent Skill

Install the bundled skill with the Skills CLI:

npx skills add OverseedAI/overpork --skill opork

The skill teaches compatible agents to use opork safely for Porkbun domain, DNS, pricing, SSL, DNSSEC, and glue-record operations.

Configuration

Set credentials via environment variables:

export PORKBUN_API_KEY=pk1_xxx
export PORKBUN_SECRET_KEY=sk1_xxx

Or create a config file:

opork config init

This prompts for both credentials, hides the secret-key input in an interactive terminal, and saves them to the config file. The --api-key and --secret-key flags are available for non-interactive or CI use, but avoid them in an interactive shell because their values can appear in shell history and process listings.

Config file location: run opork config path to print the exact path for your system. The file lives in an overpork subdirectory of the OS-specific user config directory (os.UserConfigDir()), so the defaults are:

  • macOS: ~/Library/Application Support/overpork/config.yaml
  • Linux: ~/.config/overpork/config.yaml (or $XDG_CONFIG_HOME/overpork/config.yaml if $XDG_CONFIG_HOME is set)
  • Windows: %AppData%\overpork\config.yaml (e.g. C:\Users\<you>\AppData\Roaming\overpork\config.yaml)

Commands

General

opork ping                    # Test connectivity
opork version                 # Print version
opork config path             # Show config path

DNS Records

opork dns list <domain>
opork dns list <domain> --type A
opork dns list <domain> --type A --subdomain www

opork dns create <domain> <type> <content>
opork dns create example.com A 192.168.1.1
opork dns create example.com A 192.168.1.1 --name www
opork dns create example.com MX mail.example.com --prio 10

opork dns update <domain> <id> <type> <content>
opork dns set <domain> <type> <subdomain> <content>   # Update by name
opork dns set example.com A www 192.168.1.1
opork dns set example.com A @ 192.168.1.1             # @ = root

opork dns delete <domain> <id>
opork dns delete-by-name <domain> <type> <subdomain>

Domains

opork domain list
opork domain get <domain>

opork domain auto-renew <domain> enable
opork domain auto-renew <domain> disable

opork domain ns-get <domain>
opork domain ns-set <domain> <ns1> [ns2] [ns3]...

opork domain forward-list <domain>
opork domain forward-add <domain> <url> [--subdomain www] [--type permanent]
opork domain forward-delete <domain> <id>

Domain registration is currently unsupported via the CLI because it lacks the required purchase safeguards. Use Porkbun's website to register domains until CLI registration support is updated.

Pricing

opork pricing list            # List all TLD prices
opork pricing check <domain>  # Check availability and price

SSL Certificates

opork ssl get <domain> --part cert
opork ssl get <domain> --part intermediate
opork ssl get <domain> --part public
opork ssl get <domain> --part key
opork ssl get <domain>

WARNING: Without --part, the output (including JSON output with --json) contains the PRIVATE KEY. Use --part cert, intermediate, or public to print only non-sensitive parts, such as when piping JSON output into logs or other tooling.

DNSSEC

opork dnssec list <domain>
opork dnssec create <domain> --keytag X --algorithm Y --digest-type Z --digest ABC
opork dnssec delete <domain> <keytag>

Glue Records

opork glue list <domain>
opork glue create <domain> <subdomain> <ip> [ip...]
opork glue update <domain> <subdomain> <ip> [ip...]
opork glue delete <domain> <subdomain>

JSON Output

Add --json to any command for JSON output:

opork dns list example.com --json
opork pricing check example.com --json

Exit Codes

  • 0 - Success
  • 1 - Error (message printed to stderr)

Development

Local Build

make build      # Build binary
make test       # Run tests
make lint       # Run linter
make dist       # Build for all platforms

Releasing

Releases are automated via GitHub Actions. To publish a new version:

  1. Bump the version in package.json:

    npm version patch   # 0.1.0 -> 0.1.1
    npm version minor   # 0.1.0 -> 0.2.0
    npm version major   # 0.1.0 -> 1.0.0
  2. Push to main:

    git push

The workflow will automatically:

  • Build binaries for all platforms (darwin/linux/windows, amd64/arm64)
  • Create a GitHub release with the binaries
  • Publish to npm

License

MIT

About

CLI wrapper for Porkbun API, optimized for agentic use

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages