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

@scalar/cli

v2.11.0

Published

Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar

Readme

Scalar CLI

Version Downloads Discord

Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI documents from your terminal, then publish them to Scalar.

The Scalar CLI validating, linting, bundling, and serving an OpenAPI document

npx @scalar/cli document validate openapi.yaml

Documentation · Command reference · CI and scripting · Discord

Common tasks

Every example works with npx @scalar/cli in place of scalar if you have not installed the CLI.

Validate and lint an API description

scalar document validate openapi.yaml
scalar document lint openapi.yaml
scalar document lint openapi.yaml --rule .spectral.yaml

validate checks the document against the OpenAPI or AsyncAPI specification. lint applies Spectral rules and fails only on errors. Lint reports and baselines →

Bundle split files into one

scalar document bundle openapi.yaml --output openapi.bundled.yaml
scalar document bundle openapi.yaml --output openapi.bundled.yaml --treeShake

Pulls every external $ref into a single file. --treeShake drops components nothing uses. The input can be a URL.

Preview the API reference

scalar document serve openapi.yaml --watch

Serves an interactive API reference that reloads as you edit. Pass --config reference.json for API Reference options.

Mock the API

scalar document mock openapi.yaml --watch

Starts a mock server that answers with the examples and schemas in your document, so you can try requests before the API exists.

Upgrade and convert

scalar document upgrade swagger.json --output openapi.json
scalar document convert postman-collection.json --output openapi.json

Upgrades Swagger 2.0 and OpenAPI 3.0 to OpenAPI 3.1, and converts Postman collections to OpenAPI.

Publish to Scalar

scalar auth login
scalar registry publish openapi.yaml --namespace acme --slug my-api --version 1.0.0
scalar project preview
scalar project publish --slug my-docs

Push API descriptions to the Scalar Registry, preview a Scalar Docs project locally, and publish it. In CI, run scalar auth login --token <token>, or set SCALAR_API_KEY and run scalar auth login.

Install

Standalone binary, no Node.js required:

# macOS and Linux
curl -fsSL https://cdn.scalar.com/cli/install.sh | bash
# Windows (PowerShell)
irm https://cdn.scalar.com/cli/install.ps1 | iex

Or with npm:

npm install --global @scalar/cli

Git ships an unrelated scalar executable. If it gets in the way, use npm's scalar-cli alias, or run npm install --global --force @scalar/cli to replace it. The installation guide covers upgrades and shell completion.

Use with AI agents

scalar context prints every command, argument, option, default, and choice as JSON, plus notes on running without prompts. Point your agent at it instead of --help:

scalar context

The package also ships an Agent Skill at skills/scalar-cli/SKILL.md. Copy it into your project:

mkdir -p .claude/skills
cp -r "$(npm root -g)/@scalar/cli/skills/scalar-cli" .claude/skills/

Use in CI

# .github/workflows/openapi.yml
name: OpenAPI
on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v6
        with:
          node-version: 24
      - run: npx --yes @scalar/cli document lint openapi.yaml --format github-actions

--format github-actions turns findings into annotations on the pull request. JSON output, JUnit reports, and lint baselines →

Commands

| Command | Description | Subcommands | | --- | --- | --- | | scalar auth | Log in to Scalar and manage your session | login, whoami, logout | | scalar access-group | Manage access groups and allowed email domains for the current team | list, create, get, update, delete, domain add, domain remove | | scalar document | Work with OpenAPI and AsyncAPI descriptions | bundle, split, join, format, convert, markdown, mock, serve, share, validate, void, lint, upgrade | | scalar project | Manage Scalar Docs projects | list, get, init, check-config, create, preview, publish, rollback, deployments list, upgrade | | scalar registry | Manage API descriptions in the Scalar Registry | publish, update, delete, list, get | | scalar team | List and switch between your Scalar teams | list, get, set | | scalar sdk | Manage Scalar SDKs (Enterprise only) | list, get, create, update, delete, build | | scalar schema | Manage shared schemas in the Scalar Registry | delete, update, list, get, publish | | scalar readme | Open CLI documentation in your browser | generate | | scalar upgrade | Upgrade the Scalar CLI to the latest version | | | scalar context | Print every command, argument, and option as JSON for AI agents | | | scalar completion | Generate shell completion definitions | |

Run scalar <command> --help for options, or see the command reference.

Authentication details

Run scalar auth whoami to show your email, current team name and ID, role, and authentication method (browser session or personal token). Use scalar auth whoami --json for structured output with email, team: { uid, name }, role, and authentication (browser_session or personal_token). If the team name cannot be loaded, the team ID remains available and JSON returns null for the name. Missing email or role values also return null. Credentials are never included.