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

@mimsy-cms/cli

v1.3.1

Published

A command-line interface for the Mimsy CMS SDK that provides utilities for working with collection schemas and more.

Readme

Mimsy CLI

A command-line interface for the Mimsy CMS SDK that provides utilities for working with collection schemas and more.

Installation

# Install globally
pnpm install -g @mimsy-cms/cli

# Or run directly with pnpm
pnpm dlx @mimsy-cms/cli

Commands

update

Updates the mimsy.schema.json file with the current collection definitions. The mimsy.schema.json file is used by Mimsy as a schema reference for the structure of your collections.

Usage

msy update [options]

Options

  • -o, --output <path> - Output file path (default: "schema.json")
  • -i, --import <path> - Import collections from a TypeScript or JavaScript file before exporting
  • --pretty - Pretty print the JSON output (default: false)
  • --clear - Clear the registry before importing (useful for testing) (default: false)
  • -h, --help - Display help for command

Examples

Basic usage:

# Export current registry to schema.json
msy update

# Export with pretty formatting
msy update --pretty

Import collections and export:

# Import TypeScript collections and export
msy update --import ./collections/blog.ts --pretty --output blog-schema.json

# Import JavaScript collections and export
msy update --import ./collections/blog.js --output blog-schema.json

# Clear registry first, then import and export
msy update --import ./collections/blog.ts --clear --pretty

Collection File Examples

TypeScript Example (collections/blog.ts):

import { collection, fields, builtins, type Collection } from "@mimsy-cms/sdk";

export const Tags: Collection<any> = collection("tags", {
  name: fields.shortString({
    description: "The name of the tag",
    constraints: {
      minLength: 2,
      maxLength: 50,
    },
  }),
  color: fields.shortString({
    description: "The color of the tag, in hexadecimal format",
    constraints: {
      minLength: 6,
      maxLength: 6,
    },
  }),
});

export const Posts: Collection<any> = collection("posts", {
  title: fields.shortString({
    description: "The title of the post",
    constraints: {
      minLength: 5,
      maxLength: 100,
    },
  }),
  author: fields.relation({
    description: "The author of the post",
    relatesTo: builtins.User,
    constraints: {
      required: true,
    },
  }),
  tags: fields.multiRelation({
    description: "The tags associated with the post",
    relatesTo: Tags,
    constraints: {
      required: true,
    },
  }),
  coverImage: fields.media({
    description: "The cover image of the post",
    constraints: {
      required: true,
    },
  }),
});

JavaScript Example (collections/blog.js):

const { collection, fields, builtins } = require("@mimsy-cms/sdk");

const Tags = collection("tags", {
  name: fields.shortString({
    description: "The name of the tag",
    constraints: {
      minLength: 2,
      maxLength: 50,
    },
  }),
  color: fields.shortString({
    description: "The color of the tag, in hexadecimal format",
    constraints: {
      minLength: 6,
      maxLength: 6,
    },
  }),
});

const Posts = collection("posts", {
  title: fields.shortString({
    description: "The title of the post",
    constraints: {
      minLength: 5,
      maxLength: 100,
    },
  }),
  author: fields.relation({
    description: "The author of the post",
    relatesTo: builtins.User,
    constraints: {
      required: true,
    },
  }),
  tags: fields.multiRelation({
    description: "The tags associated with the post",
    relatesTo: Tags,
    constraints: {
      required: true,
    },
  }),
  coverImage: fields.media({
    description: "The cover image of the post",
    constraints: {
      required: true,
    },
  }),
});

module.exports = { Tags, Posts };

Output Schema Format

The exported JSON schema has the following structure:

{
  "collections": [
    {
      "name": "collection-name",
      "schema": {
        "fieldName": {
          "type": "field-type",
          "relatesTo": "related-collection-name",
          "options": {
            "description": "Field description",
            "constraints": {
              "required": true,
              "minLength": 5
            }
          }
        }
      }
    }
  ],
  "generatedAt": "2025-07-22T11:52:56.435Z"
}

Development

Building

pnpm build

Testing

pnpm test

Development Mode

pnpm dev

TypeScript Support

The CLI supports importing TypeScript files directly thanks to esbuild-register. No compilation step is required - just point to your .ts files and they'll be transpiled on the fly.

Workspace Integration

This CLI is designed to work within the Mimsy monorepo workspace. Collections are automatically registered when created using the collection() function from the SDK, making schema export seamless.

Contributing

Please see the main CONTRIBUTING.md for contribution guidelines.

License

See LICENSE for more information.