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

@secondcontext/save-money

v0.2.0

Published

Architecture-aware AWS cost optimization using your local Claude CLI

Readme

save-money

Architecture-aware AWS cost optimization powered by your local Claude CLI.

Fetches real AWS cost data, scans your infrastructure files, queries live resource inventory, then invokes Claude to produce ranked, actionable cost-reduction recommendations — with an interactive deep-dive menu to go deeper on any item.

Usage

npx save-money [options]

Or install globally:

npm install -g save-money
save-money [options]

Options

| Flag | Description | Default | |---|---|---| | --profile <name> | AWS CLI profile to use (interactive picker if omitted) | $AWS_PROFILE or default | | --region <name> | AWS region | $AWS_REGION or us-east-1 | | --infra-dir <path> | Directory to scan for Terraform/CDK/CloudFormation files | . (current dir) | | --no-infra | Skip infrastructure file scanning | — | | --dry-run | Print the Claude prompt without invoking it | — | | --claude-path <path> | Override path to the claude binary | auto-detected | | -h, --help | Show help | — |

Examples

# Interactive profile picker
npx save-money

# Specify profile directly
npx save-money --profile my-aws-profile

# Point at your infrastructure directory
npx save-money --profile my-aws-profile --infra-dir ./infrastructure

# See the prompt that would be sent without calling Claude
npx save-money --profile my-aws-profile --dry-run

Prerequisites

  1. AWS CLI — configured with a profile that has these permissions:

    • ce:GetCostAndUsage
    • ce:GetCostForecast
    • ecs:ListClusters, ecs:ListServices, ecs:ListTasks
    • rds:DescribeDBInstances, rds:DescribeDBClusters
    • ec2:DescribeInstances, ec2:DescribeNatGateways
    • elasticache:DescribeCacheClusters
    • lambda:ListFunctions
    • s3:ListBuckets
    • sts:GetCallerIdentity
    • (optional) organizations:ListAccounts for multi-account support
    • (optional) sts:AssumeRole for cross-account inventory
  2. Claude CLI — install from https://claude.ai/download

What it does

  1. Fetches 4 weeks of AWS Cost Explorer data (with week-over-week trend analysis)
  2. Scans your working directory for infrastructure files (Terraform .tf, CDK, CloudFormation)
  3. Queries live AWS resource inventory across ECS, RDS, EC2, Lambda, ElastiCache, S3, and more
  4. For AWS Organizations management accounts: automatically enumerates linked accounts, fetches per-account costs, and assumes OrganizationAccountAccessRole in each account to collect cross-account inventory
  5. Renders an ASCII cost trend chart and top services bar chart
  6. Invokes Claude with all context to generate 5 ranked cost-reduction recommendations
  7. Opens an interactive menu to deep-dive into any recommendation or ask custom questions

Multi-account support

If your AWS profile is an Organizations management account, the tool automatically:

  • Lists all linked accounts via organizations:ListAccounts
  • Fetches per-account cost breakdowns
  • Assumes OrganizationAccountAccessRole in each linked account to collect resource inventory
  • Provides Claude with a full cross-account view

Environment variables

| Variable | Description | |---|---| | AWS_PROFILE | Default AWS profile (overridden by --profile) | | AWS_REGION | Default region (overridden by --region) | | NO_COLOR=1 | Disable ANSI color output |