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

create-modern-cmdk

v1.4.2

Published

Scaffold a Vite, React 19 and TypeScript project with a modern-cmdk command palette.

Readme

Scaffold a Vite, React 19 and TypeScript project with a modern-cmdk command palette.

npm create modern-cmdk@latest my-palette

Two templates · writes 8 files · every dependency pinned to an exact version · no dependencies of its own · Node ≥ 26.4.0

Quick start

npm create modern-cmdk@latest my-palette -- --template=react-dialog
cd my-palette
npm install
npm run dev

| Template | What src/App.tsx renders | |---|---| | react-basic (default) | An inline palette with two groups | | react-dialog | A palette in a dialog that ⌘K on Apple platforms or Ctrl+K elsewhere opens and closes |

react-full is a deprecated alias of react-basic and prints a warning. pnpm create modern-cmdk@latest my-palette and npx create-modern-cmdk my-palette work too; the scaffolder prints the next commands for the package manager that ran it.

What it writes

my-palette/
├── index.html
├── package.json        exact versions; dev, build, typecheck, preview
├── tsconfig.json       references the two projects below (tsc -b)
├── tsconfig.app.json   strict, for src/
├── tsconfig.node.json  strict, for vite.config.ts
├── vite.config.ts      Vite with the React plugin
└── src/
    ├── main.tsx        imports modern-cmdk/styles.css
    └── App.tsx         the palette

npm run build runs tsc -b && vite build. The react-basic template begins src/App.tsx like this:

import { Command } from 'modern-cmdk/react';
import type { ReactElement } from 'react';

export function App(): ReactElement {
  return (
    <div style={{ padding: '2rem', fontFamily: 'system-ui' }}>
      <h1>Command Palette</h1>
      <Command label="Command menu">
        <Command.Input placeholder="Search..." />
        <Command.List>
          <Command.Empty>No results found.</Command.Empty>
          <Command.Group heading="Actions">

modern-cmdk is pinned to the modern-cmdk version this scaffolder was released with, read from the repository when it was built; the other pins are in src/versions.ts.

Options

| Option | Effect | |---|---| | --template=<name> | react-basic (default) or react-dialog; --template <name> works too | | --no-overwrite | Refuse a target that already holds a file this run would write; write nothing | | --strict | Exit 2 on every usage error, including an unknown option or template | | -h, --help | Print the usage |

| Code | Default | Strict | |---|---|---| | 0 | Success, --help, a missing project name, a malformed known option | Success, --help | | 1 | An unknown template, an unusable name, a collision, a file-system error | Only the collision and a file-system error | | 2 | Not used | Every usage error, and an unusable name |

The Default column is a run without --strict; the Strict column is a run with it. A collision is a run with --no-overwrite that finds a file it would write. Without --strict, an unknown option is warned about and ignored when a project name is given.

Before it writes anything, the scaffolder checks the files it would write. In 1.x a target that already holds any of them is listed on stderr (warning: <dir> is not empty; this run will overwrite N files:, then one path per line) and the run carries on and overwrites them. With --no-overwrite the same list is printed as an error, nothing is written and the exit code is 1.

The directory you name is the project directory. The package name in the generated package.json is derived from it and sanitized: lower-cased, every run of characters npm does not allow becomes -, and leading ., _ and - are dropped (a valid scoped name such as @scope/app is kept as given). The scaffolder prints note: package name "<name>" (from "<directory>") when it changed the name. Only a name that derives to nothing, or one over 214 characters, is refused. On Windows a directory name with a character Windows cannot use (<, >, :, ", |, ?, * or a control character) or a reserved device name (CON, PRN, AUX, NUL, COM1-COM9, LPT1-LPT9) is refused before anything is written.

Requirements

Node 26.4.0 or later; npm, pnpm, yarn or bun.

The modern-cmdk packages

| Package | Use it to | |---|---| | modern-cmdk | build the palette: core engine, React adapter, stylesheet | | create-modern-cmdk | start a Vite, React 19 and TypeScript project with a palette in it | | modern-cmdk-codemod | move code written for cmdk to modern-cmdk |

Links

Documentation · Changelog · Releases · Issues · Security policy · Repository

License

MIT © 2026 Albert Badalov