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

@statechange/xano

v0.1.1

Published

StateChange CLI for Xano - Access private APIs and performance insights

Readme

StateChange CLI for Xano

CLI tool for accessing Xano private APIs and performance insights.

Installation

cd cli
yarn install
yarn build

Usage

Authentication

First, initialize your StateChange API key:

sc-cli auth init --api-key <your-api-key>
# Or run interactively:
sc-cli auth init

This saves your API key to ~/.statechange/auth.json. You can also:

  • Set STATECHANGE_API_KEY environment variable
  • Use --api-key flag on any command

Verify authentication:

sc-cli auth whoami

Environment Variables

You can set these environment variables to avoid passing flags:

  • STATECHANGE_API_KEY - StateChange API key (for fetching Xano tokens from backend)
  • XANO_TOKEN - Your Xano API token (fallback if StateChange backend not available)
  • XANO_INSTANCE - Xano instance (e.g., app.xano.com)
  • XANO_WORKSPACE - Workspace ID
  • XANO_BRANCH - Branch ID (default: 0)

Commands

X-Ray Analysis

Analyze function X-Ray data:

sc-cli xray function --id <functionId> --instance <instance> --workspace <workspace> --token <token>

Performance Analysis

Show top slowest endpoints:

sc-cli performance top-endpoints --instance <instance> --workspace <workspace> --token <token> --lookback 24

Audit

Audit workspace for issues:

sc-cli audit workspace --instance <instance> --workspace <workspace> --token <token>

Security

Secure or disable Swagger:

# Disable Swagger
sc-cli secure swagger --app-id <id> --disable

# Require token for Swagger
sc-cli secure swagger --app-id <id> --require-token

Performance Scanning

Scan all functions for nested slow steps:

sc-cli performance scan-functions --instance <instance> --workspace <workspace> --min-nesting 2

X-Ray Workspace Scanning

Scan all functions in a workspace for X-Ray issues:

sc-cli xray scan-workspace --instance <instance> --workspace <workspace> --include-warnings

Token Management

The CLI automatically fetches Xano tokens from the StateChange backend when authenticated:

  1. Extension pushes Xano tokens to StateChange backend when you're logged in
  2. CLI authenticates with StateChange backend using long-lived API key
  3. CLI fetches Xano tokens from StateChange backend by instance name

If StateChange backend is not available, you can still use --token or XANO_TOKEN as a fallback.

Implementation Status

  • ✅ Phase 0: CLI with manual token support
  • ✅ Phase 1: StateChange backend integration (extension push + CLI fetch)
  • ✅ Phase 2: Shared analysis library + higher-level commands

Backend API Requirements

For backend developers implementing the StateChange API endpoints, see XANO.md for complete API specification including:

  • Authentication requirements (extension vs CLI)
  • Endpoint specifications (POST, GET)
  • Request/response formats
  • Error handling
  • Security considerations