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-brightsy-component-lib

v0.1.0

Published

CLI to scaffold Brightsy component library projects

Readme

create-brightsy-component-lib

CLI tool to scaffold and deploy Brightsy component library projects.

Installation

# Use directly with npx (recommended)
npx create-brightsy-component-lib

# Or install globally
npm install -g create-brightsy-component-lib

# Or install locally in a project
npm install --save-dev create-brightsy-component-lib

Usage

Create a Project

# Create a new component library
npx create-brightsy-component-lib my-components

# Create a custom application
npx create-brightsy-component-lib my-app --template app

Authentication

The CLI uses OAuth for secure authentication (no API keys needed):

# Login - opens browser for OAuth flow
npx create-brightsy-component-lib login

# Check who you're logged in as
npx create-brightsy-component-lib whoami

# Logout
npx create-brightsy-component-lib logout

Credentials are stored securely in ~/.brightsy/config.json with restricted permissions.

Deploy to Brightsy

# Deploy (will prompt for login if needed)
npx create-brightsy-component-lib deploy

# Deploy with options
npx create-brightsy-component-lib deploy \
  --env-name production \
  --version 1.0.0

# Deploy and register with existing library
npx create-brightsy-component-lib deploy \
  --lib-id your-library-uuid \
  --env-name production

Commands

login

Authenticate with Brightsy using OAuth 2.1 with PKCE:

  • Opens your browser for secure login
  • Stores tokens locally
  • Supports multiple accounts (prompts if you have more than one)

logout

Remove stored credentials.

whoami

Show current authenticated account and token status.

deploy

Deploy the library:

  1. Builds the library (if not already built)
  2. Uploads to Brightsy file storage
  3. Optionally registers the environment with a library

| Option | Description | Default | |--------|-------------|---------| | -e, --endpoint | API endpoint | https://brightsy.ai | | -l, --lib-id | Library ID to register environment | (optional) | | -n, --env-name | Environment name | production | | -v, --version | Version to deploy | From package.json |

Deployment Flow

Login (OAuth - one time)
    ↓
Build library (npm run build)
    ↓
Upload to Brightsy Files (libs/{name}/{version}/index.js)
    ↓
Get public URL (https://files.brightsy.ai/...)
    ↓
(Optional) Register library environment with URL

Templates

Component Library (default)

Creates a project with:

  • Multiple components for the page builder
  • Example HelloWorld component
  • Puck configurations
  • LLM instructions
my-components/
  src/
    components/
      HelloWorld/
        HelloWorld.tsx
        HelloWorld.config.ts
        HelloWorld.llm.ts
        index.ts
    index.tsx
  vite.config.ts
  tsconfig.json
  package.json
  README.md

Custom Application

Creates a project with:

  • Single App component that IS the entire application
  • Handles its own routing and state
  • Minimal page builder config
my-app/
  src/
    App/
      App.tsx
      App.config.ts
      App.llm.ts
      index.ts
    index.tsx
  vite.config.ts
  tsconfig.json
  package.json
  README.md

Development

After scaffolding:

cd my-components
npm install
npm run dev

Building

npm run build

Output goes to dist/ ready for deployment.

Complete Workflow

# 1. Create the project
npx create-brightsy-component-lib my-components
cd my-components
npm install

# 2. Develop components
npm run dev

# 3. Login (one-time)
npx create-brightsy-component-lib login

# 4. Build and deploy
npm run build
npx create-brightsy-component-lib deploy

# 5. Register via MCP (if not using --lib-id)
# MCP: create_lib --name "My Components"
# MCP: create_lib_env --lib_id xxx --name production --module_url <returned-url>
# MCP: assign_lib_to_page_type --page_type_id xxx --lib_id xxx

License

MIT