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

@superflag-sh/cli

v0.1.6

Published

CLI for Superflag feature flags

Readme

@superflag-sh/cli

npm version

Command-line interface for managing Superflag feature flags and remote config.

Quick Start

# Install globally
npm install -g @superflag-sh/cli

# Authenticate
superflag login

# Set your default app and environment
superflag use myapp production

# Get and set flags
superflag get dark-mode
superflag set dark-mode true

Authentication

The CLI uses browser-based OAuth authentication:

superflag login   # Opens browser to authenticate
superflag whoami  # Show current user
superflag logout  # Clear credentials

Credentials are stored in ~/.superflag/credentials.json.

Context System

Instead of passing --app and --env with every command, set a default context:

superflag use myapp staging

This saves your context to ~/.superflag/context.json. Quick commands like get, set, and config will use this context automatically.

You can override context for a single command:

superflag get feature-x --app other-app --env prod

Check your current context with:

superflag status

Commands

Quick Commands

These commands use your saved context for fast flag operations:

superflag use <app> <env>   # Set default app/env context
superflag get <key>         # Get a flag value
superflag set <key> <value> # Set a flag value
superflag config            # Dump full config as JSON
superflag status            # Show auth and context status

Auth Commands

superflag login    # Authenticate via browser
superflag logout   # Clear credentials and context
superflag whoami   # Show current user email

Apps

superflag apps list              # List all your apps
superflag apps create <name>     # Create a new app

Environments

superflag envs list --app <name>  # List environments for an app

Flags

List and manage flags:

superflag flags list --app <name> --env <slug>
superflag flags create --app <name> --env <slug> --key <key> --type <type> --value <value>
superflag flags set --app <name> --env <slug> --key <key> --value <value>
superflag flags toggle --app <name> --env <slug> --key <key>
superflag flags delete --app <name> --env <slug> --key <key>

Idempotent upsert (uses context):

superflag flags upsert --key new-feature --type bool --value true
superflag flags upsert --key new-feature --type bool --value true --client  # Enable for client SDKs

Flag types: bool, string, number, json

Gradual rollout:

superflag flags rollout --key feature-x --percentage 25    # Roll out to 25%
superflag flags rollout --key feature-x --percentage 100   # Full rollout
superflag flags rollout --key feature-x --remove           # Remove rollout

A/B test variants:

# Format: --variant "value:weight:name"
superflag flags variants --key button-color \
  --variant "blue:50:control" \
  --variant "green:30:variant-a" \
  --variant "red:20:variant-b"

superflag flags variants --key button-color --remove  # Remove variants

Weights must sum to 100. Names are optional.

Bulk operations:

# From file
superflag flags bulk-set --file flags.json

# From stdin
echo '{"feature-a": true, "feature-b": "new-value"}' | superflag flags bulk-set

JSON format: {"flag-key": value, ...}

Keys

superflag keys list --app <name> --env <slug>
superflag keys create --app <name> --env <slug> --type <sdk|pub>
superflag keys revoke <key-id>

Key types:

  • sdk - Server-side SDK key (full config access)
  • pub - Client-side public key (filtered to client-enabled flags only)

Global Options

| Option | Description | |--------|-------------| | --json | Output as JSON | | --quiet, -q | Suppress non-essential output | | --app <name> | Override app context for this command | | --env <slug> | Override env context for this command | | --help, -h | Show help | | --version, -v | Show version |

Environment Variables

| Variable | Default | Description | |----------|---------|-------------| | SUPERFLAG_BASE_URL | https://superflag.sh | Base URL for API/auth endpoints (overridden by SUPERFLAG_API_URL / SUPERFLAG_AUTH_URL) | | SUPERFLAG_API_URL | https://superflag.sh/api/v1 | API endpoint | | SUPERFLAG_AUTH_URL | https://superflag.sh/cli-auth | Auth endpoint |

Exit Codes

| Code | Meaning | |------|---------| | 0 | Success | | 1 | Generic error | | 2 | Authentication or context required | | 3 | Resource not found |

Development

# Clone and install
git clone <repo>
cd superflag-cli
bun install

# Run in development
bun run dev <command>
bun run dev use myapp staging
bun run dev get feature-x

# Build
bun run build

# Type check
bun run typecheck

# Run tests
bun test

License

MIT