39e6592c4205f48c2065b498b73f20b3ed4646ca
Porkbun DNS Management Skill for OpenClaw
Manage Porkbun DNS records and domains via API v3.
Overview
This skill enables OpenClaw to manage DNS records on Porkbun's DNS service. It includes a CLI tool for reliable, deterministic DNS operations.
Installation
For OpenClaw Users
Installation is available via clawhub.ai: openclaw skills install porkbun-dns
Manual Installation
- Download or clone this repository
- Create
~/.config/porkbun/config.jsonwith your credentials (see Setup below) - The CLI tool is available at
scripts/porkbun-dns.js
Setup
1. Get API Keys
- Log in to Porkbun
- Visit https://porkbun.com/account/api
- Generate API credentials (both public and secret keys)
2. Configure Credentials
Option A: Config file (recommended)
mkdir -p ~/.config/porkbun
cat > ~/.config/porkbun/config.json << EOF
{
"apiKey": "your-pk1-api-key-here",
"secretApiKey": "your-sk1-secret-key-here"
}
EOF
Option B: Environment variables
export PORKBUN_API_KEY="your-pk1-api-key-here"
export PORKBUN_SECRET_API_KEY="your-sk1-secret-key-here"
Important:
- These keys are sensitive - never commit them to git or share publicly
- The config file is read automatically if present
- Environment variables take precedence over config file
- Store credentials in
~/.config/porkbun/which is excluded from git
3. Enable API Access
For each domain you want to manage:
- Go to Domain Management on Porkbun
- Click Details next to the domain
- Enable "API Access"
Usage
The skill integrates with OpenClaw and provides automated DNS management. Common operations:
- Create records: A, AAAA, CNAME, MX, TXT, and more
- List domains and records
- Update existing records
- Delete records
- Batch operations by type/subdomain
Example conversations:
- "Create an A record for www.example.com pointing to 1.1.1.1"
- "Update the MX record for example.com to use Google Workspace"
- "Delete all TXT records for old.example.com"
Features
- Full API v3 support: All Porkbun DNS endpoints
- CLI tool included: Deterministic operations via
scripts/porkbun-dns.js - Comprehensive documentation: Reference guides for all record types
- Batch operations: Edit/delete multiple records at once
- Common patterns: Pre-built workflows for websites, email, dynamic DNS
Documentation
Inside the skill:
- CHANGELOG.md - Version history and changes
- SKILL.md - Main usage guide
- references/dns-record-types.md - Complete DNS record reference
- package.json - Skill metadata and environment requirements
Online:
Development
Repository Structure
porkbun/
├── SKILL.md # Main skill documentation
├── scripts/
│ └── porkbun-dns.js # CLI tool
└── references/
└── dns-record-types.md # DNS reference
Building the .skill file
cd ~/.openclaw/workspace/skills/public/porkbun
zip -r ../porkbun.skill SKILL.md scripts/ references/
Testing
Test connection:
node scripts/porkbun-dns.js ping
List your domains:
node scripts/porkbun-dns.js list
Contributing
This skill is maintained for the OpenClaw community. For issues or improvements:
- Check this repository
- Open an issue or pull request
License
Provided as-is for use with OpenClaw.
Links
Languages
JavaScript
100%