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

diffsurge

v0.3.1

Published

Diffsurge CLI — API traffic capture, diff, schema comparison, replay, and CI/CD checks with API key auth

Readme

diffsurge

Catch breaking API changes before your users do.

Diffsurge helps you detect breaking API changes before they reach production.

Install

npm install -g diffsurge

Or use Docker:

docker run equixankit/diffsurge-cli --help

Setup

  1. Create an API key in the Diffsurge dashboard → Settings → API Keys
  2. Add it to your .env file in your project root:
SURGE_API_KEY=diffsurge_live_your_key_here
SURGE_PROJECT_ID=your-project-uuid
  1. Verify it works:
surge whoami

Commands

surge whoami

Verify your API key is valid and see account info:

surge whoami

surge check

Run API checks in your CI/CD pipeline:

# Basic check — validates API key, fetches traffic & schema stats
surge check --project-id abc-123

# With local schema diff — detect breaking changes before deploy
surge check --project-id abc-123 --schema openapi.yaml --fail-on-breaking

surge diff

Compare two JSON API responses:

surge diff --old response-v1.json --new response-v2.json

surge schema diff

Compare two OpenAPI/Swagger schema files and detect breaking changes:

surge schema diff --old api-v1.yaml --new api-v2.yaml --fail-on-breaking

surge replay

Replay captured traffic against a target server:

surge replay --source captured.json --target http://localhost:8080

CI/CD Integration

GitHub Actions

name: API Check
on: [push, pull_request]
jobs:
  api-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm install -g diffsurge
      - run: surge check --project-id ${{ secrets.SURGE_PROJECT_ID }}
        env:
          SURGE_API_KEY: ${{ secrets.SURGE_API_KEY }}

GitLab CI

api-check:
  image: node:20
  script:
    - npm install -g diffsurge
    - surge check --project-id $SURGE_PROJECT_ID
  variables:
    SURGE_API_KEY: $SURGE_API_KEY

Environment Variables

| Variable | Description | Default | |---|---|---| | SURGE_API_KEY | Your API key (starts with diffsurge_live_) | — | | SURGE_API_URL | API base URL | https://api.diffsurge.com | | SURGE_PROJECT_ID | Default project ID | — |

All variables can also use the DIFFSURGE_ prefix (e.g., DIFFSURGE_API_KEY) as a fallback.

Flags

All commands support these global flags:

--api-key     API key (overrides SURGE_API_KEY)
--api-url     API base URL (overrides SURGE_API_URL)
--project-id  Project ID (overrides SURGE_PROJECT_ID)

License

MIT