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 🙏

© 2026 – Pkg Stats / Ryan Hefner

aws-sso-auto-credentials

v1.0.1

Published

CLI tool to automate AWS SSO credential refresh setup

Readme

AWS SSO Auto-Credentials

A cross-platform Node.js CLI tool to automate the setup of AWS IAM Identity Center (AWS SSO) with auto-refreshing credentials.

Features

  • Cross-platform support: Works on MacOS, Linux, and Windows (with Git Bash or WSL)
  • Zero background processes: Credentials are refreshed on-demand when needed
  • Profile-specific scripts: Each profile gets its own refresh script for better multi-profile management
  • Easy setup: Interactive prompts guide you through the configuration process
  • Minimal configuration: Works in under 5 minutes with minimal input required

Installation

Global Installation

npm install -g aws-sso-auto-credentials

Using npx

npx aws-sso-auto-credentials

Prerequisites

  • Node.js 14 or higher
  • AWS CLI v2 installed
  • jq installed (recommended for Linux/macOS)

Usage

Run the CLI tool:

aws-sso-auto-credentials

The tool will guide you through the setup process with interactive prompts.

Command Line Options

Options:
  --force        Overwrite existing profiles or scripts without prompt
  --dry-run      Show planned changes without making them
  --script-path  Custom location for refresh script (default: ~/.aws/)
  --manual-setup Skip AWS SSO configuration and manually enter profile details
  --skip-login   Skip automatic AWS SSO login after setup

How It Works

The tool sets up two AWS CLI profiles:

  1. Base SSO Profile (<prefix>-sso): Used for AWS CLI SSO login maintenance
  2. Auto-Credentials Profile (<prefix>-auto-credentials): Uses credential_process to auto-credentials credentials on demand

It also creates a profile-specific script named ~/.aws/refresh-if-needed-<prefix>.sh that:

  • Checks if the SSO session token is near expiration
  • Runs aws sso login --profile <prefix>-sso automatically if needed
  • Otherwise, proceeds without doing anything

After Setup

The tool will automatically log you in with AWS SSO after setup (unless you use the --skip-login option). After that:

  1. Use the auto-credentials profile for all AWS commands:

    AWS_PROFILE=<prefix>-auto-credentials aws s3 ls
  2. Never worry about manually refreshing credentials again!

If you used the --skip-login option or need to login again later:

aws sso login --profile <prefix>-sso

Why Two Profiles?

  • The -sso profile is needed for AWS CLI SSO login maintenance
  • The -auto-credentials profile uses credential_process to auto-credentials credentials on demand

License

MIT