Coder Social home page Coder Social logo

domasimu's Introduction

domasimu

domasimu is a command line tool that enables reading and management of dnsimple domains from the command line.

$ domasimu -l
example.com
example.net
$ domasimu example.com
 A 192.0.2.2
www A 192.0.2.2
$ domasimu -u 'example.com mail A - 192.0.2.3 600'
record written with id 3400485
$ domasimu -u 'example.com mail A 192.0.2.3 192.0.2.4 600'
record written with id 3400485
$ domasimu -d 'example.com mail A 192.0.2.4'
record deleted with id 3400485

The update -u flag takes a space separated list of domain, name, type, oldvalue, newvalue, ttl. To create a new record use a oldvalue of -. The TTL is always updated.

For example, to add 3 A records for www and then change one of them:

$ domasimu -u 'example.com www A - 192.0.2.10 600'
$ domasimu -u 'example.com www A - 192.0.2.11 600'
$ domasimu -u 'example.com www A - 192.0.2.12 600'
$ domasimu -u 'example.com www A 192.0.2.11 192.0.2.14 600'
$ domasimu example.com | grep ^www
www A 192.0.2.10
www A 192.0.2.12
www A 192.0.2.14

Installation

$ go get -u github.com/jrwren/domasimu/... $ go install github.com/jrwren/domasimu/...

Configuration

$ echo 'token = "YOURTOKENGOESHERE_YESQUOTED"' >> ~/.domasimurc

Get your account token by going to Account -> Automation -> API tokens -> New

Alternate Configuration

domasimu will read config from a different file if DOMASIMU_CONF environment variable is set.

$ DOMASIMU_CONF="alt-domasimurc"
$ echo 'token = "YOURTOKENGOESHERE_YESQUOTED"' >> $DOMASIMU_CONF
$ domasimu -l
moardomains.org

domasimu's People

Contributors

jpreese avatar jrwren avatar lukechampine avatar mrngm avatar pleum avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

domasimu's Issues

panic when adding invalid RR value

$ ~/bin/domasimu -u 'xmtp.net test1 A - 2899904718 300'
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x642d92]

goroutine 1 [running]:
main.createOrUpdate(0xc000096960, 0x7ffcc338e6b1, 0x21, 0xc00024a353, 0x3, 0x0, 0x444fe6, 0xc0000841cd, 0x6d6f97)
        /home/jrwren/go/src/github.com/jrwren/domasimu/cmd/domasimu/main.go:279 +0x272
main.main()
        /home/jrwren/go/src/github.com/jrwren/domasimu/cmd/domasimu/main.go:97 +0x7c1

expect: this to not panic.

support the v2 api

The v1 API from DNSimple that this client currently uses is disabled.

Update this program to support the v2 API

cache domain data

add a flag to not cache the data, but default listing to displaying the cached file if it is not older than TTL for the domain.

app crashes: account id is sometimes null in the whoami request.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x62dabd]

goroutine 1 [running]:
main.main()
        /home/jrwren/go/src/github.com/jrwren/domasimu/cmd/domasimu/main.go:51 +0x33d
exit status 2

delete doesn't seem to work

probably broke in the move to v2.

$ domasimu -d 'xmtp.net delays6 AAAA 2601:400:8000:e5c:21f:d0ff:fe85:d98b'
could not delete: could not find record

but that record shows in domain list output.

$ domasimu xmtp.net
...
delays SSHFP (86400) 2 1 3f8f769be613f6ad837b0dbe46cbb9e07ad83d33
delays6 AAAA (300) 2601:400:8000:45d1:21f:d0ff:fe85:d98b
delays6 AAAA (300) 2601:400:8000:e5c:21f:d0ff:fe85:d98b
...

load config file from XDG-spec locations

reading from $HOME/.domasimurc works right now, but that file should really be in a location compatible with XDG spec. Use $XDG_CONFIG_HOME or $HOME/.config/domasimu/config

can't add a uri record.

~/bin/domasimu -u 'xmtp.net test1 URI - http://2899904718/ 300'
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x642d92]

goroutine 1 [running]:
main.createOrUpdate(0xc000098a00, 0x7ffd51d326cc, 0x2b, 0xc0001cbb53, 0x3, 0x0, 0x444fe6, 0xc0000841cd, 0x6d6f97)
        /home/jrwren/go/src/github.com/jrwren/domasimu/cmd/domasimu/main.go:279 +0x272
main.main()
        /home/jrwren/go/src/github.com/jrwren/domasimu/cmd/domasimu/main.go:97 +0x7c1

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.