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 --helpActions:
loginto the DNSimple APIlogoutcreatean address record for a given domainlistall available domain, subdomain and DNS recordsupdatea given address record by namedeletea given address record by namecreateorupdatea 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 TracsiflOgympacKoFieCThe credentials are saved to: ~/.dee/credentials.json
Remove any stored DNSimple API credentials from disc.
dee logoutList all available domains or subdomains.
Arguments
-domain: A domain name (optional)-subdomain: A subdomain name (optional)
Examples
List all available domains:
dee listList all subdomain of a given domain:
dee list -domain example.comList all DNS records for a given subdomain:
dee list -domain example.com -subdomain wwwCreate 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:7334Create 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 60Create an A record for the subdomain www:
dee create -domain example.com -subdomain www -ip 10.2.1.3The -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 3600Deletes 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 AAAADelete the IPv4 address record for www.example.com:
dee delete -domain example.com -subdomain www -type AUpdate 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:7334The -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 wwwThe 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-cliCompile dee-cli yourself:
go get -u github.com/andreaskoch/dee-cli
cd $GOPATH/github.com/andreaskoch/dee-cli
go run make.go -installCompile 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 -crosscompileIf 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 👯