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-light-cms

v0.2.1

Published

Scaffold a Next.js project with Light CMS

Readme

create-light-cms

Scaffold a fresh Next.js app that is ready for light-cms.

Prompt flow

When you run create-light-cms, it asks for:

  1. Project name (if not passed as the first argument)
  2. ORM (drizzle)
  3. Database provider (turso or supabase)
  4. Package manager (pnpm, npm, or bun) - default: pnpm
  5. Admin username
  6. Admin password

Usage

pnpm create light-cms@latest

Or pass the project name directly:

pnpm create light-cms@latest my-app

CLI options:

  • --skip-install: scaffold the Next app and skip setup/install steps
  • -h, --help: show help
  • -v, --version: show version

The selected package manager is used for all scaffold commands:

  • pnpm + pnpm dlx
  • npm + npx
  • bun + bunx

What it does

1) Creates a Next.js app

Uses create-next-app with:

  • TypeScript
  • Tailwind
  • ESLint
  • App Router
  • @/* import alias
  • pnpm

Note: it intentionally creates app/ at project root (no src/app).

It also updates next.config.ts to enable:

  • cacheComponents: true

2) Installs shadcn/ui and starter components

  • Runs shadcn init --defaults
  • Adds: button, input, textarea, select, switch, separator, sidebar, sonner, sheet, tooltip, skeleton

3) Installs dependencies

Base dependencies:

  • drizzle-orm
  • zod
  • @tanstack/react-form

Provider-specific dependency:

  • Turso: @libsql/client
  • Supabase: postgres

Dev dependency:

  • drizzle-kit

4) Boots light-cms via its own CLI

  • pnpm dlx light-cms@latest init --yes
  • Creates app/(marketing)
  • pnpm dlx light-cms@latest create about --yes

This ensures lightcms.config.ts and pageSchema.ts match the current light-cms templates.

5) Writes DB and env files

  • drizzle.config.ts
  • .env
  • db/index.ts
  • db/schema.ts

Generated examples

Supabase db/index.ts

import { config } from "dotenv";
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";

config({ path: ".env" });

const client = postgres(process.env.DATABASE_URL!);
export const db = drizzle({ client });

Supabase drizzle.config.ts

import { defineConfig } from "drizzle-kit";

export default defineConfig({
  schema: "./db/schema.ts",
  out: "./migrations",
  dialect: "postgresql",
  dbCredentials: {
    url: process.env.DATABASE_URL!,
  },
});

Turso drizzle.config.ts

import { defineConfig } from "drizzle-kit";

export default defineConfig({
  schema: "./db/schema.ts",
  out: "./migrations",
  dialect: "turso",
  dbCredentials: {
    url: process.env.TURSO_DATABASE_URL!,
    authToken: process.env.TURSO_AUTH_TOKEN!,
  },
});

After scaffolding

Typical next steps:

cd <project-name>
# fill in env values
pnpm drizzle-kit generate
pnpm drizzle-kit migrate
pnpm dev