Giter VIP home page Giter VIP logo

porkbun-cli's Introduction

porkbun-cli

A simple command line interface for managing your porkbun domains.

  • Create/Delete domain records
  • Edit existing domain records
  • Update record content:
    • By command line
    • By current external IP address
    • Periodically, to pick changes in external address (useful if you have a dynamic IP)

Dependencies

  • docopt (python3 -m pip install docopt)

That's it!

Usage:

Setup:

Before using this tool, you will need to generate API keys for your porkbun account and enable API access for any domains that you want to manage with this tool. You can do this from your porkbun dashboard. The tool expects to see two files in it's working directory:

api-key secret-api-key

Which should contain your api and secret keys respectively. Remember to set appropriate file permissions for your secret key!

Command line:

The first thing you should probably do is ping the porkbun API to check that your API keys are set up correctly:

python3 porkbun-cli ping

The tool also has comprehensive help output:

python3 porkbun-cli -h

If you are unfamiliar with command line interfaces like this one and find the help message confusing, then here is a brief summary:

  • <> Indicates an input field
  • [] Indicates an optional argument
  • (A|B) Indicates that you may specify A or B, but not both
  • - or -- Indicates an option

If you are a programmer and want to learn how to create beautiful command line interfaces like this one, then look no further!

Periodic updates:

This tool can be used to create a dynamic updater that will update the content of a record periodically to keep track with your external IP address. This is especially useful if you want your record to point at a residential connection with a dynamic IP.

For example, the following command will check your external IP address every 5 seconds and update the specified record if the IP changes:

python3 porkbun-cli record update <domain> <record-id> --delay=5

The record id can be obtained by listing the records associated with your domain:

python3 porkbun-cli record list <domain>

Installation as a systemd unit:

TODO

porkbun-cli's People

Contributors

ac101m avatar jorgetorres96 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.