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

@flagify/cli

v2.0.0

Published

Flagify CLI — manage feature flags from the terminal

Downloads

1,280

Readme

@flagify/cli

The official Flagify CLI for managing feature flags from the terminal.

Install

npm install -g @flagify/cli

Or with Homebrew:

brew tap flagifyhq/tap
brew install flagify

Or download binaries directly from GitHub Releases.

Tip: Add a short alias to your shell profile for faster usage:

echo 'alias flag="flagify"' >> ~/.zshrc && source ~/.zshrc

Quick Start

# Sign in (creates a profile called "default" on first run)
flagify auth login

# Or add a named profile — handy when you juggle work and personal accounts
flagify auth login --profile work
flagify auth list
flagify auth switch personal

# Pin a repo to a workspace/project/environment in a committable file
flagify init --workspace-id ws_01J... --project-id pr_01J... --environment development

# See the resolved context for this invocation + the source of every field
flagify status
flagify status --format json

# Manage feature flags
flagify flags list -p <project-id>
flagify flags create my-flag -p <project-id> --type boolean
flagify flags toggle my-flag -p <project-id>

Commands

Machine-readable output: every read-only command below supports --format json for clean, pipe-friendly output. Combine with jq in scripts and CI. --environment accepts the canonical development|staging|production and the short aliases dev|stg|prod.

| Command | Description | |---------|-------------| | flagify auth login | Sign in with the browser flow (--profile <name> to add a second identity without signing out of the first) | | flagify auth logout | Sign out of the active profile (--profile <name> or --all) | | flagify auth list | List signed-in profiles (--format json) | | flagify auth switch <name> | Set the active profile | | flagify auth remove <name> | Delete a profile and any repo bindings that point to it | | flagify auth rename <old> <new> | Rename a profile and update bindings | | flagify whoami | Show the current user and pinned profile (--format json) | | flagify status | Show the resolved context for this invocation with sources per field (--format json) | | flagify init | Write .flagify/project.json for the current repo (--print to dry-run, --force to overwrite in non-TTY) | | flagify project bind --profile <name> | Bind this repo to a local profile without touching the project file | | flagify project set <field> <value> | Update a field in .flagify/project.json (environment, project, workspace, preferred-profile, …) | | flagify workspaces list | List your workspaces (--format json) | | flagify workspaces pick | Interactively select a default workspace | | flagify projects list | List projects in a workspace (--format json) | | flagify projects get | Show project details with environments (--format json) | | flagify projects pick | Interactively select a default project | | flagify projects delete <id> | Delete a project and all its environments, flags, and segments (admin only) | | flagify environments pick | Interactively select a default environment | | flagify flags list | List all flags in a project (--format json) | | flagify flags get | Get details for a specific flag with per-environment status (--format json) | | flagify flags create | Create a new feature flag (kebab-case keys enforced) | | flagify flags toggle | Enable or disable a flag (interactive picker if no key given, supports --all) | | flagify flags health | Detect configuration issues (env mismatches, no-op targeting rules) (--format json) | | flagify keys generate | Generate API key pair for environment (--format json) | | flagify keys list | List API keys for environment (--format json) | | flagify keys revoke <prefix> | Revoke a single API key by prefix (e.g. flagify keys revoke pk_dev_abc). Use --id <ulid> for explicit targeting, or --all to revoke every active key in the environment | | flagify segments list | List user segments in a project (--format json) | | flagify segments create <name> | Create a segment with optional JSON rules (--match, --rules) | | flagify segments delete <id> | Delete a segment by ID | | flagify targeting list <flag-key> | Show targeting rules for a flag in an environment (--format json; returns {flag, environment, rules}) | | flagify targeting set <flag-key> | Replace all targeting rules for a flag (--rules '<json>', --format json) | | flagify whoami | Show current authenticated user (--format json) | | flagify ai-setup | Generate AI tool configs (Claude, Cursor, Copilot, Windsurf). Includes the integrations catalogue; use --include-flags for a snapshot | | flagify types | Generate typed flag key constants (--typescript or --go) for compile-time safety in application code | | flagify config | Show current configuration (--format json) | | flagify config set <key> <value> | Set a config value (api-url, console-url, workspace, project, environment) | | flagify config get <key> | Get a single config value | | flagify completion | Generate shell completion scripts | | flagify version | Print CLI version |

Shell Completions

Zsh:

flagify completion zsh > "${fpath[1]}/_flagify"

Bash:

flagify completion bash > /usr/local/etc/bash_completion.d/flagify

Fish:

flagify completion fish > ~/.config/fish/completions/flagify.fish

Configuration

Credentials live under named profiles in ~/.flagify/config.json (schema v2, migrated automatically from any older flat file with a .bak preserved alongside).

Scope is resolved per-invocation. Precedence, highest first:

  1. CLI flags (--profile, --workspace-id, --workspace, --project-id, --project, --environment).
  2. Environment variables (FLAGIFY_PROFILE, FLAGIFY_WORKSPACE_ID, FLAGIFY_WORKSPACE, FLAGIFY_PROJECT_ID, FLAGIFY_PROJECT, FLAGIFY_ENVIRONMENT, FLAGIFY_API_URL).
  3. .flagify/project.json walked up from the current directory.
  4. Local binding recorded by flagify project bind.
  5. The active profile's defaults.
  6. Built-in defaults.

Run flagify status to see exactly which signal won for each field. See the full CLI reference at flagify.dev/docs/cli for multi-account workflows and project file details.

Ephemeral tokens: set FLAGIFY_ACCESS_TOKEN (and optionally FLAGIFY_REFRESH_TOKEN) to override the stored credentials for a single invocation. The CLI does not persist refreshed tokens when these are set.

Requirements

License

MIT