Update DNS records from the command-line
dee
is single self-contained command-line utility for updating subdomain records that are managed by DNSimple written go that works on Linux, Mac OS and Windows alike.
dee <action> [arguments ...]
Get help:
dee --help
Actions:
login
to the DNSimple APIlogout
create
an address record for a given domainlist
all available domain, subdomain and DNS recordsupdate
a given address record by namedelete
a given address record by namecreateorupdate
a given address record
Save DNSimple API credentials to disc.
Arguments:
-email
: The e-mail address of your DNSimple account-apitoken
: The DNSimple API token
Example:
dee login -email apiuser@example.com -apitoken TracsiflOgympacKoFieC
The credentials are saved to: ~/.dee/credentials.json
Remove any stored DNSimple API credentials from disc.
dee logout
List all available domains or subdomains.
Arguments
-domain
: A domain name (optional)-subdomain
: A subdomain name (optional)
Examples
List all available domains:
dee list
List all subdomain of a given domain:
dee list -domain example.com
List all DNS records for a given subdomain:
dee list -domain example.com -subdomain www
Create an address record.
Arguments:
-domain
: A domain name (required)-subdomain
: The subdomain name (required)-ip
: An IPv4 or IPv6 address (required)-ttl
: The time to live (TTL) for the DNS record in seconds (default: 600)
Examples:
Create an AAAA
record for the subdomain www
:
dee create -domain example.com -subdomain www -ip 2001:0db8:0000:0042:0000:8a2e:0370:7334
Create an AAAA
record for the subdomain www
with TTL of 1 minute:
dee create -domain example.com -subdomain www -ip 2001:0db8:0000:0042:0000:8a2e:0370:7334 -ttl 60
Create an A
record for the subdomain www
:
dee create -domain example.com -subdomain www -ip 10.2.1.3
The -ip
parameter can also be passed via Stdin:
echo "2001:0db8:0000:0042:0000:8a2e:0370:7334" | dee create -domain example.com -subdomain www -ttl 3600
Deletes an address record.
Arguments:
-domain
: A domain name (required)-subdomain
: The subdomain name (required)-type
: The address record type (required, e.g. "AAAA", "A")
Examples:
Delete the IPv6 address record for www.example.com:
dee delete -domain example.com -subdomain www -type AAAA
Delete the IPv4 address record for www.example.com:
dee delete -domain example.com -subdomain www -type A
Update the DNS record for a given sub domain
Arguments:
-domain
: A domain name (e.g.example.com
)-subdomain
: A subdomain name (e.g.www
)-ip
: An IPv4 or IPv6 address
Examples:
Set the AAAA
record of www.example.com
to the given IP address:
dee update -domain example.com -subdomain www -ip 2001:0db8:0000:0042:0000:8a2e:0370:7334
The -ip
address parameter can also be passed in via Stdin:
echo "2001:0db8:0000:0042:0000:8a2e:0370:7334" | dee update -domain example.com -subdomain www
The create-or-update action can be used if you are not sure if the address record you are trying to update does already exist. If the record exists it will be just updated; if it does not yet exist it will be created with the given IP address.
Arguments:
-domain
: A domain name (required)-subdomain
: The subdomain name (required)-ip
: An IPv4 or IPv6 address (required)-ttl
: The time to live (TTL) for the DNS record in seconds (default: 600)
dee uses the github.com/andreaskoch/dee-ns library for creating, reading, updating and delting DNSimple DNS records.
Install dee-cli using go get
:
go get -u github.com/andreaskoch/dee-cli
Compile dee-cli yourself:
go get -u github.com/andreaskoch/dee-cli
cd $GOPATH/github.com/andreaskoch/dee-cli
go run make.go -install
Compile the dee binaries for Linux (64bit, ARM, ARM5, ARM6, ARM7), Mac OS (64bit) and Windows (64bit):
cd $GOPATH/github.com/andreaskoch/dee-cli
go run make.go -crosscompile
If you find a bug or if you want to add or improve some feature please create an issue or send me a pull requests. All contributions are welcome.
If you are planning to sign up for DNSimple and if you like this tool I would be happy if you use this link: https://dnsimple.com/r/381546095cf6a2
One month of free service for the both of us 👯