DNSimple Ruby Client Build Status

A Ruby command line utility and wrapper for the DNSimple API.

DNSimple provides DNS hosting and domain registration that is simple and friendly. We provide a full API and an easy-to-use web interface so you can get your domain registered and set up with a minimal amount of effort.


$ gem install dnsimple-ruby


Create a file in your home directory called .dnsimple.

In this file add the following:


Or if using an API token

api_token: YOUR_API_TOKEN


There are two ways to interact with the DNSimple Ruby wrapper. The first is to use the command line utility that is included. The commands available are as follows:

For help:

The following commands are available for domains:

Please note that domain registration and transfer can only be done through the API for domains that do not require extended attributes. A future version of the API will add support for extended attributes.

The following commands are available for records:

The following commands are available for custom templates:

The following commands are available for managing contacts:

The following commands are available for purchasing certificates:

The contact name/value pairs are:

Wrapper Classes

In addition to the command line utility you may also use the included Ruby classes directly in your Ruby applications.

Here's a short example.

require 'rubygems'
require 'dnsimple'

DNSimple::Client.username   = 'YOUR_USERNAME'
DNSimple::Client.password   = 'YOUR_PASSWORD'
DNSimple::Client.http_proxy = {}

user = DNSimple::User.me
puts "#{user.domain_count} domains"

puts "Domains..."
DNSimple::Domain.all.each do |domain|
  puts "  #{domain.name}"

domain = DNSimple::Domain.find("example.com")
domain.apply("template") # applies a standard or custom template to the domain

domain = DNSimple::Domain.create("newdomain.com")
puts "Added #{domain.name}"
domain.delete # removes from DNSimple

For the full API documentation visit http://rubydoc.info/gems/dnsimple-ruby