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

ec2-cli

v1.0.4

Published

Command line interface for managing EC2 instances

Downloads

4

Readme

EC2 CLI

EC2 Command Line Interface provides an easy and quick way to connect into your AWS instances.

$ ec2 ssh -n dashboard

It automatically finds all instances in your account that match the given name and list them for you, so you can easily navigate and choose which one to connect to.

EC2-CLI Demo

Installation

$ npm install -g ec2-cli

Setup

EC2-CLI uses aws-sdk, so it will automatically use the keys you have setup in your computer to query your list of instances.

export AWS_SECRET_ACCESS_KEY=IkwsDF41wER2vd/DDDWdxzAqWE4r5cb7xFeiI0
export AWS_ACCESS_KEY_ID=AKIAIWE5Y789GJNAQQWE

You may also define what is your default region by setting the environment variable AWS_REGION.

export AWS_REGION=eu-west-1

Usage

Connect

EC2-CLI is meant to be very simple to use. Call ec2 ssh and get a list of all your instances.

$ ec2 ssh
0) i-08d561f1 (email-service)
1) i-28a5c38d (webserver)
2) i-e6dc4d03 (webserver)
3) i-2a1e27dd (dashboard)
4) i-81ach562 (spark-slave)
5) i-27godf99 (spark-slave)
6) i-111111bb (spark-master)
7) i-23abce23 (mongodb)
8) i-41ab2mc2 (mysql)
9) i-4924cma1 (cache-server)
Use the arrows to navigate up and down or ESC to exit
Select a row [0-9]:

Then choose which instance you want to connect to.

Filter

If you are dealing with hundreds of instances, this list can be overwhelming. Therefore, you may use the option ec2 ssh --name [regex] to filter the instances.

$ ec2 ssh -n spark
1) i-81ach562 (spark-slave)
2) i-27godf99 (spark-slave)
3) i-111111bb (spark-master)
Use the arrows to navigate up and down or ESC to exit
Select a row [0-9]:

Identity File (SSH Key)

By default, it will try to find the necessary pem key in your ~/.ssh folder. But you can overwrite this behaviour by specifying which key you want to choose.

$ ec2 ssh -i dashboard-key.pem

Specify Region

As said before, it will automatically use whatever region you have set up in your environment variable AWS_REGION. You can overwrite that behaviour by using ec2 ssh --region option.

$ AWS_REGION=eu-west-1 ec2 ssh
$ ec2 ssh --region eu-west-1
$ ec2 ssh -r eu-west-1

Specify SSH User

By default, ec2-cli will attempt to connect to your instance using the user ec2-user, you can specify a different user using the option ec2 ssh --user ubuntu.

$ ec2 ssh -u root

Notes

This project was quickly built to help me on my day to day tasks. I've only added a few features and will be adding more as I need. In the meantime. Feel free to fork and contribute with improvements or let me know of any feature you think would help your productivity.