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

baysecms-cli

v1.0.9

Published

CLI for BayseCMS schema push and code generation workflows

Readme

BayseCMS CLI

Schema-as-code, codegen, and content migration for BayseCMS delivery APIs.

Install

npm install -D baysecms-cli

Quick start

  1. Copy templates from node_modules/baysecms-cli/templates/ or use the hospitality starter.
  2. Configure baysecms.config.json with apiUrl and auth.
  3. Push schema: baysecms schema push --publish
  4. Generate client helpers: baysecms codegen --out src/lib/baysecms

Add to package.json:

{
  "scripts": {
    "baysecms:codegen": "baysecms codegen --out src/lib/baysecms",
    "baysecms:schema:export": "baysecms schema export --out baysecms.schema.json"
  }
}

Commands

| Command | Description | |---------|-------------| | baysecms schema push | Push baysecms.schema.json draft to cloud | | baysecms schema export | Export latest published schema JSON | | baysecms codegen | Generate TypeScript types + data fetchers | | baysecms migrate tags-to-references | Map tag strings to reference IDs |

Auth

Set BAYSECMS_API_KEY (recommended) or BAYSECMS_TOKEN plus optional tenant/workspace headers.

Codegen behavior

  • Uses highest published version per schemaId from GET /v2/schemas.
  • reference{Collection}Item; array + reference{Collection}Item[].
  • Generated data.ts passes custom fetch with next.revalidate (default 3600s, override via BAYSECMS_REVALIDATE).
  • Published delivery returns stable /v2/media/* image URLs (not short-lived presigned URLs).

Reference fields

In the admin schema editor, enable Allow multiple references for AmenitiesItem[]-style fields. Delivery resolves references to nested published documents in /v2/content responses.

Breaking schema changes

When changing field types (e.g. tagsreference), migrate content:

baysecms migrate tags-to-references --collection rooms --field amenities --target amenities

Then re-run codegen after publishing the new schema version.

Recommended amenity fields

title, slug (from title), description, icon (image), sort-order (number).

API endpoints

| Endpoint | Purpose | |----------|---------| | GET /v2/schemas | List schema versions (alias of /schemas) | | GET /v2/content?schema=rooms | Delivery list with resolved references | | GET /v2/content/:schema/:slug | Single item by slug | | GET /v2/media/* | Stable public media proxy |

Auth: x-api-key header or Bearer JWT + x-workspace-id.