porkbun-cli

Manage Porkbun domains, DNS records, SSL certificates, URL forwarding, and hosting blueprints via the Porkbun API. Use when the user asks about domain management, DNS, SSL certs, URL redirects, or connecting a domain to a hosting provider.

9 stars

Best use case

porkbun-cli is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Manage Porkbun domains, DNS records, SSL certificates, URL forwarding, and hosting blueprints via the Porkbun API. Use when the user asks about domain management, DNS, SSL certs, URL redirects, or connecting a domain to a hosting provider.

Teams using porkbun-cli should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/porkbun-cli/SKILL.md --create-dirs "https://raw.githubusercontent.com/exiao/skills/main/external-services/porkbun-cli/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/porkbun-cli/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How porkbun-cli Compares

Feature / Agentporkbun-cliStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Manage Porkbun domains, DNS records, SSL certificates, URL forwarding, and hosting blueprints via the Porkbun API. Use when the user asks about domain management, DNS, SSL certs, URL redirects, or connecting a domain to a hosting provider.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Porkbun CLI

Manage Porkbun domains, DNS, SSL, URL forwarding, and hosting blueprints via the Porkbun REST API.

## Credentials

Stored at `~/.porkbun/credentials.json`:
```json
{"apikey": "pk1_...", "secretapikey": "sk1_..."}
```

If missing, direct user to https://porkbun.com/account/api to generate keys. Save with `chmod 600`.

Every API call requires both keys in the JSON body.

## Setup & Test Connection

Run `scripts/test-connection.sh` to verify credentials work.

```bash
curl -s -X POST https://api.porkbun.com/api/json/v3/ping \
  -H "Content-Type: application/json" \
  -d '{"apikey":"...","secretapikey":"..."}'
```

## Domains

### List All Domains
```
POST https://api.porkbun.com/api/json/v3/domain/listAll
Payload: {"start": "0", "includeLabels": "yes", ...auth}
```

Output as table: Domain, Status, Expiry Date, Auto-Renew. Highlight 🔴 expiring within 30 days, 🟢 active.

### Check Nameservers
```
POST https://api.porkbun.com/api/json/v3/domain/getNs/DOMAIN
```

## DNS Records

### Safety First
Before any destructive action (delete/overwrite):
1. Retrieve current records for the domain/subdomain
2. Show them to the user
3. Ask for explicit confirmation
4. Ideally run `scripts/dns-backup.sh` first

### Retrieve Records
```
POST https://api.porkbun.com/api/json/v3/dns/retrieve/DOMAIN
```
Output: Type, Host, Answer, TTL, Priority (if applicable).

### Create Records
```
POST https://api.porkbun.com/api/json/v3/dns/create/DOMAIN
Payload: {"name": "SUBDOMAIN", "type": "TYPE", "content": "VALUE", "ttl": "600", ...auth}
```
- Empty `name` = root domain (@)
- Default TTL: 600 (10 min)
- Check for existing records first; ask "add new or replace?"

### Record Type Cheatsheet
- "Point to IP" → **A** (IPv4) or **AAAA** (IPv6)
- "Alias to domain" → **CNAME** (subdomains) or **ALIAS** (root)
- "Mail server" → **MX** (needs priority)
- "Verify ownership" → **TXT**

### Delete Records
```
POST https://api.porkbun.com/api/json/v3/dns/delete/DOMAIN/ID
```
Requires `id` from Retrieve. Always show record details before deleting.

## SSL Certificates

### Retrieve SSL Bundle
```
POST https://api.porkbun.com/api/json/v3/ssl/retrieve/DOMAIN
```
Returns: `privatekey`, `publickey`, `certificatechain`, `intermediatecertificate`.

Save to `./ssl-DOMAIN/`:
- `domain.key` (Private Key)
- `domain.crt` (Public Key)
- `intermediate.crt` (Chain)
- `fullchain.crt` (Public + Intermediate concatenated)

Server-specific:
- **Nginx**: `fullchain.crt` + `domain.key`
- **Apache**: `domain.crt` + `domain.key` + `intermediate.crt`

## URL Forwarding

### Check Existing Forwards
```
POST https://api.porkbun.com/api/json/v3/domain/getUrlForwarding/DOMAIN
```

### Create Forward
```
POST https://api.porkbun.com/api/json/v3/domain/addUrlForward/DOMAIN
Payload: {"subdomain": "", "location": "https://dest.com", "type": "temporary", "includePath": "yes", "wildcard": "yes", ...auth}
```

- **301 (permanent)**: SEO-friendly, use for permanent moves
- **302 (temporary)**: For testing or temporary redirects
- **includePath**: `old.com/blog/post` → `new.com/blog/post` (usually ON)
- **wildcard**: Matches `*.old.com` (usually ON)

## Hosting Blueprints

One-click DNS configs for popular platforms. Read the blueprint from `references/blueprints/` then apply via DNS create.

| Platform | Blueprint file |
|----------|---------------|
| Vercel | `references/blueprints/vercel.md` |
| Netlify | `references/blueprints/netlify.md` |
| GitHub Pages | `references/blueprints/github-pages.md` |
| Cloudflare Pages | `references/blueprints/cloudflare-pages.md` |
| Railway | `references/blueprints/railway.md` |
| Self-hosted / VPS | `references/blueprints/self-hosted.md` |

### Execution Protocol
1. Explain the plan: "To set up Vercel, I need A record → 76.76.21.21 and CNAME www → cname.vercel-dns.com"
2. Check for conflicts (existing A/CNAME on root/www)
3. Warn about records being replaced
4. Execute after confirmation
5. Verify with brief output

Related Skills

writer

9
from exiao/skills

Write content in Eric's voice — articles, blog posts, tweets, social media posts, marketing copy, newsletter drafts. Loads WRITING-STYLE.md and enforces kill phrases.

positioning-angles

9
from exiao/skills

Use when defining product positioning, choosing strategic angles, crafting value propositions, competitive positioning, product messaging, differentiation strategy, or go-to-market angles. Also use for 'how should I position my app', 'what angle should I use', 'painkiller vs vitamin', or 'market positioning'.

outline-generator

9
from exiao/skills

Use when generating outlines, article structures, content outlines, blog outlines, planning article sections, structuring posts, breaking down topics into sections, or organizing ideas for long-form content. Also use for 'outline this', 'structure this article', or 'plan the sections'.

last30days-open

9
from exiao/skills

Use only when the user explicitly asks for the open variant of last30days, including watchlists, briefings, and history queries. Sources: Reddit, X, YouTube, web.

last30days

9
from exiao/skills

Use when researching what happened in the last 30 days on a topic. Also triggered by 'last30'. Sources: Reddit, X, YouTube, web. Produces expert-level summary with copy-paste-ready prompts.

hooks

9
from exiao/skills

Use when generating hooks, headlines, titles, and scroll-stopping openers for content. Also use when analyzing viral posts, Reels, TikToks, YouTube Shorts, or successful social examples to extract reusable hook patterns and improve hook guidance.

evaluate-content

9
from exiao/skills

Use when judging content quality OR editing/improving existing copy: shareability, readability, voice, cuttability, angle, copy sweeps.

editor-in-chief

9
from exiao/skills

Use when a first draft is complete and all Phase 1 gates are done: topic selected (seo-research), title approved (hooks), outline approved (outline-generator), draft written (writer). Runs autonomous diagnosis-prescribe-rewrite loop before Substack.

copywriting

9
from exiao/skills

Write or improve marketing copy for any surface: pages, ads, app stores, landing pages, TikTok/Meta scripts, push notifications, UGC. Combines page copy frameworks with direct response principles.

content-strategy

9
from exiao/skills

Use when building content strategy: hooks, angles, and ideas from what's trending now. Covers organic and paid creative across TikTok, X, YouTube, Meta, LinkedIn.

content-pipeline

9
from exiao/skills

Orchestrator for the 3-article content pipeline — runs research phase, spawns parallel article sub-agents, creates Typefully drafts. Use when running the full content pipeline (usually via cron at 3am).

yt-dlp

9
from exiao/skills

Download audio/video from YouTube and other sites using yt-dlp. Use when the user asks to download music, songs, albums, podcasts, or video from YouTube or similar platforms. Triggers on 'download song', 'get mp3', 'yt-dlp', 'youtube download', 'rip audio'.