Porkbun DNS API client
Go to file
ge 43c79e1682 v0.2.0 2022-12-18 01:42:39 +03:00
COPYING init 2022-04-16 21:04:35 +03:00
Makefile v0.2.0 2022-12-18 01:42:39 +03:00
README.md v0.2.0 2022-12-18 01:42:39 +03:00
completion.bash v0.2.0 2022-12-18 01:42:39 +03:00
piglet v0.2.0 2022-12-18 01:42:39 +03:00



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.