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

@tekorka/cloudorkabe

v1.1.6

Published

CLI tool for managing AWS Cognito users

Downloads

8

Readme

Cognito Manager CLI

A comprehensive command-line tool for managing AWS Cognito users and groups.

Features

  • List users in groups with filtering options
  • Add users to groups (batch and single mode)
  • Remove users from groups (batch and single mode)
  • Edit user attributes
  • Reset/change user passwords
  • Batch cleanup of users based on allowed lists
  • Multi-pool support with configuration

Installation

# Clone the repository
git clone https://github.com/yourusername/cognito-manager.git

# Install dependencies
cd cognito-manager
npm install

# Link the CLI globally (optional)
npm link

AWS SDK Migration Notice

Important: This project currently uses AWS SDK v2, which is in maintenance mode. Migration to AWS SDK v3 is planned.

The AWS SDK for JavaScript v2 is now in maintenance mode. It will continue to receive critical bug fixes and security patches but no new features. We recommend migrating to AWS SDK v3 for future development.

See scripts/batch-remove-users.js for examples of both AWS SDK v2 and v3 implementations.

Configuration

Create a config file at ~/.cognito-manager.json:

{
  "userPoolId": "us-west-2_example",
  "defaultGroup": "Users"
}

Or create a pools.json file in your project root:

{
  "default": "us-west-2_example",
  "pools": [
    {
      "name": "Production",
      "id": "us-west-2_example",
      "region": "us-west-2"
    },
    {
      "name": "Staging",
      "id": "us-east-1_example",
      "region": "us-east-1"
    }
  ]
}

Usage

Using the CLI

# Get help
cognito-manager --help

# List users in a group
cognito-manager list --group Users

# Add a user to a group
cognito-manager add --username [email protected] --group Users

# Remove a user from a group
cognito-manager remove --username [email protected] --group Users

# Batch remove users not in an allowed list
cognito-manager batch-remove --file allowed-emails.txt --group Users

# Cleanup users (alias for batch-remove)
cognito-manager cleanup --file allowed-emails.txt --group Users

# Edit user attributes
cognito-manager edit --username [email protected] --attribute "name=John Doe"

# Reset a user's password
cognito-manager password --username [email protected] --reset

# Switch between pools
cognito-manager pool --select

Using the Scripts

For batch operations, you can use the provided scripts:

# Batch remove users not in an allowed list (standalone script)
npm run batch-remove allowed-emails.txt

# Batch remove using the CLI
npm run batch-remove-cli allowed-emails.txt

Migrating from working-with-users.js

If you were previously using the working-with-users.js script, you can now use the batch-remove command:

# Old way
node working-with-users.js allowed-emails.txt

# New way (standalone script)
node scripts/batch-remove-users.js allowed-emails.txt

# New way (CLI)
cognito-manager batch-remove --file allowed-emails.txt --group BETA

License

MIT