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

saml-to

v2.2.0

Published

The CLI for saml.to

Downloads

79

Readme

SAML.to Command Line Interface

GitHub release (latest by date) GitHub issues GitHub Workflow Status

  • Website: https://saml.to
  • Forums: https://github.com/saml-to/cli/discussions
  • Documentation: https://docs.saml.to

Introduction

This is the CLI for SAML.to. It allows for command-line AWS role assumption.

saml-to [command]

Commands:
  saml-to list-roles        Show roles that are available to assume
  saml-to login [provider]  Login to a provider
  saml-to assume [role]     Assume a role

Options:
  --help     Show help  [boolean]
  --version  Show version number  [boolean]

Installation

Please make sure the following is installed:

  • NodeJS v14+
  • npm or yarn or npx avaliable on the $PATH
  • (MacOS Alternative) Homebrew available on the $PATH

Using npm or yarn or npx

npm:

npm install -g saml-to
saml-to assume

yarn:

yarn global add saml-to
saml-to assume

npx:

npx saml-to assume

Using Homebrew (MacOS)

brew tap saml-to/tap
brew install saml-to
saml-to assume

Getting Started

Once the CLI is installed, run the following commands to login and assume roles:

# Saves a GitHub token with a user:email scope to ~/.saml-to/github-token.json
saml-to login github
# List available roles to assume
saml-to list-roles

If no logins or roles are available, an administrator for an AWS account should complete the initial setup.

Add the --help flag to any command for available options.

Assuming Roles

Interactive prompt for roles to assume:

saml-to assume

Or, if the full role name is known:

saml-to assume arn:aws:iam::123456789012:role/some-role

Alternatively, use the shorthand:

# Any distinct part of the role names in from saml-to list-roles will match
saml-to assume some-role # match by the role name
saml-to assume 123456789012 # match by the account ID

Check out the documentation for assume.

Setting Environment Variables

The --headless flag will output an expression to update your shell environment with a role.

bash, zsh, etc...

Use a subshell ($(...)) to set AWS_* related environment variables:

$(saml-to assume some-role --headless)
aws s3api list-buckets # or any desired `aws` command

Powershell

Use Invoke-Expression (iex) to set AWS_* related environment variables:

iex (saml-to assume some-role --headless)
aws s3api list-buckets # or any desired `aws` command

Initial Setup

Visit SAML.to Install to get started by connecting a GitHub User or Organization to an AWS Account.

Reporting Issues

Please Open a New Issue in GitHub if an issue is found with this tool.

Maintainers

Usage Metrics Opt-Out

If you do not want to be included in Anonymous Usage Metrics, ensure an environment variable named SAML_TO_DNT is set:

SAML_TO_DNT=1 npx saml-to

License

Apache-2.0 License