Porkbun DNS API client
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ge 43c79e1682 v0.2.0 3 months ago
COPYING init 11 months ago
Makefile v0.2.0 3 months ago
README.md v0.2.0 3 months ago
completion.bash v0.2.0 3 months ago
piglet v0.2.0 3 months ago



piglet is a Porkbun DNS API CLI client.

Currently piglet can:

  • Create a DNS record
  • Edit record
  • Delete DNS record
  • Retrieve DNS records


  1. Clone this Git-repository.
  2. Install files.

Installation with Makefile:

# System-wide installation
sudo make install
# Local installation (into user's home dir)
PREFIX=~/.local make install

Manual installation:

# Just copy files into your PATH, for example:
sudo install -Dm755 piglet /usr/local/bin/piglet
sudo install -Dm644 completion.bash /usr/share/bash-completion/completions/piglet

Make sure your shell loads files from /usr/local/share/bash-completion/completions or ~/.local/share/bash-completion/completions for Bash completion.

Add to your ~/.bashrc:

for completion in {/usr/local,~/.local}/share/bash-completion/completions/*; do
   [ -f "$completion" ] && . "$completion"

Create file ~/.config/piglet/domains.list with your domains list (each domain on new line) for complete domains names. For example:


Getting started

For first step setup the configuration file:

piglet config

piglet creates ~/.config/piglet/piglet.conf file with API credentials.

Retrieve DNS records:

piglet retrieve example.com

Create A-record on subdomain mail:

piglet create mail.example.com type=a content= ttl=3600

Edit A-record for example.org (change to

piglet edit example.org id=220755500 type=a content=

Delete DNS record by id:

piglet delete example.org id=220755592

See piglet --help for more info.