NodeJS CLI for [DigitalOcean]([
Last updated 5 years ago by diniscruz .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install digitalocean-cli 
SYNC missed versions from official npm registry.


NodeJS CLI for DigitalOcean

Written in CoffeeScript, based on do-wrapper npm package


npm install -g digitalocean-cli

This will add a do-cli mapping (symlinked into ./do-cli.cofffe), which can be used like this {command}

See list of commands bellow, or just execute

do-cli -h

install from source

git clone
cd digitalocean-cli
npm install

After install you can use ./ {command}


You will need to set the DigitalOcean API Key, for example in OSX you can use:

export api_key={key}



Shows the commands availabe: do-cli -h


Gets list of droplets. Here is the info provided after executing ./do-cli list

id | name | status | region | locked | ip
5467866 | test-docker |  active | lon1 | false |

If this box was setup with an ssh key that currently exists on the local box, you can connect to it using:

ssh root@{ip} which in the example above is ssh root@

Note: if you are creating and deleting images regularly, digitalocean tends to reuse the IPs, which means that you will see an WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! error (with ssh failing to connect)

One way to deal with this is to use the command ssh-keygen -R {ip} (in this case ssh-keygen -R After that, the ```ssh root@{ip}`` will work

info {id}

Gets droplet information: ./do-cli info {id}


Creates a new droplet, using these values

configuration =
  "name": "new-droplet",
  "region": "lon1",
  "size": "512mb",
  "image": "ubuntu-14-04-x64",
  "ssh_keys": ['0d:53:e1:59:9f:f1:41:26:a8:a7:ac:9f:d3:90:45:c8'],
  "backups": false,
  "ipv6": true,
  "user_data": user_data,
  "private_networking": null
./do-cli create

delete {id}

Delete Droplet with <id>: ./do-cli delete {id}


Deletes all droplets: ./do-cli delete-all


Starts a javascript repl with the that variable set to the do-wrapper api. For example, here is how the dropletsGetAll is invoked

[fluentnode] repl> that.dropletsGetAll({}, function (err, res, body) { console.log(body)})


If you have a problem or idea for new feature please open an issue for it

Current Tags

  • 0.1.4                                ...           latest (5 years ago)

5 Versions

  • 0.1.4                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (4)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2016 © |