npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

digitalocean-cli

v0.1.4

Published

NodeJS CLI for [DigitalOcean]([https://www.digitalocean.com)

Downloads

5

Readme

digitalocean-cli

NodeJS CLI for DigitalOcean

Written in CoffeeScript, based on do-wrapper npm package

install

npm install -g digitalocean-cli

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

See list of commands bellow, or just execute

do-cli -h

install from source

git clone [email protected]:o2platform/digitalocean-cli.git
cd digitalocean-cli
npm install

After install you can use ./do-cli.coffee {command}

configure

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

export api_key={key}

commands

-h

Shows the commands availabe: do-cli -h

list

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 | 46.101.48.220

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 [email protected]

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 46.101.48.220). After that, the ```ssh root@{ip}`` will work

info {id}

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

create

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 : ./do-cli delete {id}

Delete-all

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

repl

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)})

issues/bugs

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