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

@apidex/cli

v0.2.0

Published

Official apidex.dev CLI tool for uploading API spec files

Readme

@apidex/cli

Agent-native CLI for apidex.dev. Manage projects and API specs from your terminal, CI, or an AI agent — no dashboard, no prompts.

Install

npm install -g @apidex/cli
# or run ad-hoc:
npx @apidex/cli --help

Auth

Every command needs an API token (create one under CLI in the dashboard). Provide it with --token or the APIDEX_TOKEN environment variable.

export APIDEX_TOKEN=apx_your_token_here

The API base URL defaults to https://api.apidex.dev; override with --api-url or APIDEX_API_URL.

Global options

| Option | Description | | --- | --- | | -t, --token <token> | API token (or set APIDEX_TOKEN) | | --api-url <url> | API base URL (or set APIDEX_API_URL) | | --json | Print the raw API response as JSON (for scripting/agents) |

--json emits only the API response on stdout; in human mode you get a spinner and a short summary. Any failure exits non-zero with the error on stderr. There are no interactive prompts — missing required input is an error, not a question.

Commands

project

apidex project create --name <name> [--theme <id>] [--description <text>]
apidex project list
apidex project remove <projectId>

--theme accepts any public-page theme id (e.g. rose-pine, catppuccin, tokyo-night, nord, ayu).

subdomain

apidex subdomain set    <projectId> --subdomain <s>   # claim/change the {x}.apidex.dev address
apidex subdomain remove <projectId>                   # release it (reverts to a generated id)

The subdomain is the project's public address segment. Use 3–32 lowercase letters, digits, or hyphens (no leading/trailing hyphen); a handful of words (www, api, app, …) are reserved. Changing it mutates the project's canonical URL.

spec

apidex spec sync   <projectId> --file <path> [--slug <s>] [--title <s>] [--public]
apidex spec remove <projectId> --slug <s>

spec sync is an upsert: with --slug it updates that spec (creating it if the slug doesn't exist yet); without --slug it creates a new spec. Running the same --slug command repeatedly is idempotent — ideal for CI.

guide

apidex guide sync   <projectId> --file <path.md> [--slug <s>] [--title <s>]
apidex guide remove <projectId> --slug <s>

changelog

apidex changelog sync   <projectId> --file <path.md> [--slug <s>] [--title <s>]
apidex changelog remove <projectId> --slug <s>

guide/changelog sync read a markdown file and upsert exactly like spec sync. The title comes from --title, else a YAML front-matter title:, else the first # Heading in the file. --slug (or a front-matter slug:) makes it an idempotent upsert; a front-matter published_on: sets a changelog entry's date.

Examples

Create a project and sync a spec into it, capturing JSON for an agent:

export APIDEX_TOKEN=apx_...
PROJECT=$(apidex project create --name "My API" --json | jq -r .public_id)
apidex spec sync "$PROJECT" --file ./openapi.json --slug my-api --public --json

GitHub Actions:

- name: Sync API Docs
  env:
    APIDEX_TOKEN: ${{ secrets.APIDEX_TOKEN }}
  run: |
    npx @apidex/cli spec sync ${{ vars.APIDEX_PROJECT_ID }} \
      --file ./openapi.json --slug my-api --public

Development

npm install
npm run build   # tsc -> dist/
npm test        # builds, then runs scripts/cli-selftest.mjs (no network)