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

cagophilist

v1.2.7

Published

A toolbelt for easily managing AWS keys for those that need to switch between roles while using the SDK or CLI.

Downloads

3

Readme

Build Status Coverage Status

Cagophilist


1) A collector of or a fondness for collecting keys.

2) A toolbelt for easily managing AWS keys for those that need to switch between roles while using the SDK or CLI.

Important Features:

  • Configurable menu (friendly account names!)
  • Scrolling menu (looks nice!)
  • Colors (very nice!)
  • Fast switching of active profiles (convenient!)
  • One command update of all expired tokens (very convenient!)
  • Modular design (works with alternate identity providers!)
  • Supports custom plugins (for alternate identity providers!)
  • Written in Node (if that's important to you...)

Install

  1. Install node v4.3.2 or above
  2. npm i -g cagophilist
  3. Add the cagophilist options file: ~/.cagorc [see the different settings below]
  • For Windows users, add the .cagorc file to C:\Users\<your user>\.cagorc

Configure

To disable auto copying of the cagophilist source command to the clipboard, add "autocopy": false to the .cagorc config.

Using settings for roles

    {
      "rc_version": "1.1.0",
      "autocopy": true,
      "aws": {
        "region": "us-east-1",
        "outputFormat": "json",
        "credentialsPath": "~/.aws/credentials",
        "rolesSource": "settings",
        "useHttpsProxy": true,
        "refreshMinutes": 10
      },
      "roles": [{
        "roleArn": "arn:aws:iam::123456789012:role/S3-FullAccess",
        "roleSessionName": "MyCorp-S3-FullAccess"
      }, {
        "roleArn": "arn:aws:iam::123456789013:role/S3-ReadOnly",
        "roleSessionName": "MyCorp-S3-ReadOnly"
      }, {
        "roleArn": "arn:aws:iam::123456789014:role/EC2-Access",
        "roleSessionName": "MyCorp-EC2-Access"
      }, {
        "roleArn": "arn:aws:iam::123456789012:role/Test-Role",
        "roleSessionName": "MyCorp-Test-Role"
      }, {
        "roleArn": "arn:aws:iam::123456789015:role/S3-FullAccess",
        "roleSessionName": "MyCorp-S3-FullAccess"
      }],
      "accounts": {
        "123456789012": "Production",
        "123456789013": "Stage",
        "123456789014": "Development",
        "123456789015": "EU Production"
      },
      "regions": {
        "123456789015": "eu-west-1"
      }
    }

Using plugin for roles

    {
      "rc_version": "1.1.0",
      "autocopy": true,
      "aws": {
        "region": "us-east-1",
        "outputFormat": "json",
        "credentialsPath": "~/.aws/credentials",
        "rolesSource": "settings",
        "useHttpsProxy": true,
        "refreshMinutes": 10
      },
      "accounts": {
        "123456789012": "Production",
        "123456789013": "Stage",
        "123456789014": "Development",
        "123456789015": "EU Production"
      },
      "regions": {
        "123456789015": "eu-west-1"
      },
      "plugins": {
        "cago-custom-idp": "[email protected] --registry https://my.corp.com/artifactory/api/npm/custom-repo"
      },
      "config": {
        "cago-custom-idp": {
          "url": "... link to my.corp.com identity solution ...",
          "targetUrl": "... link to aws to get roles ...",
          "prompt": {
            "username": "Acct:",
            "password": "Pass:"
          }
        }
      }
    }

Custom Plugin Development

Plugin Development Guide

Use

If you've linked or installed Cagophilist globally, you can use cago update.

Adding a new profile

Cagophilist can add a new AWS profile

  1. cago update
  2. Authenticate
  3. Choose a role to use for the profile
  4. Select 'Create a new profile'
  5. Enter in a name for the new profile
  6. Done!

Reconfigure a new profile

Cagophilist can reconfigure an existing AWS profile to use a specific role

  1. cago update
  2. Authenticate
  3. Choose a role to use for the profile
  4. Choose an existing AWS profile to use for the role
  5. Done!

Refresh the tokens in all of your profiles

Cagophilist can be used to refresh all of the tokens for all of your AWS profiles

  1. cago refresh
  2. Authenticate
  3. For any profiles not already mapped to a role - Choose the role
  4. Done!

Using a profile

Cagophilist can configure your shell environment variables for a specific AWS profile. Note: This functionality is somewhat dependant on Bash. Keep that in mind if you're using another shell.

  1. source $(cago env update) <profile-name>
  2. Done!

Issues

Feel free to submit issues and enhancement requests.

NOTE: Add your system info to the issue from the output of the environment versions command: cago env versions

Contributing

Please follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Ensure Tests are written to cover your changes
  5. Push your work back up to your fork
  6. Submit a Pull request so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

License

Copyright (c) 2016, General Electric Company. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of General Electric Company or its subsidiaries nor the names of their contributors, or any trademarks of General Electric Company or its subsidiaries may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.