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

@pie-element/cli

v0.1.1

Published

CLI tools for managing PIE Elements NG

Downloads

13

Readme

@pie-element/cli

CLI tools for managing PIE Elements NG - synchronization, package generation, and verification.

Installation

From the root of the monorepo:

bun install
cd tools/cli
bun run build

Usage

From the root of the monorepo:

# Show help
bun run cli --help

# Show command help
bun run cli upstream:sync --help

Commands

Development

dev:demo

Start a demo server for an element using apps/element-demo.

# Start demo for an element
bun run cli dev:demo hotspot

# Custom port, skip builds, and don't auto-open browser
bun run cli dev:demo multiple-choice --port 5180 --skip-build --no-open

Upstream Synchronization

upstream:sync

Synchronize code from upstream pie-elements repository.

# Dry run to preview changes
bun run cli upstream:sync --dry-run

# Sync specific element
bun run cli upstream:sync --element multiple-choice

# Sync all compatible elements (controllers + React UI + demos)
bun run cli upstream:sync

# Verbose output
bun run cli upstream:sync --verbose

upstream:check

Check for changes in upstream repositories.

# Check all elements
bun run cli upstream:check

# Check specific element
bun run cli upstream:check --element multiple-choice

# Verbose output
bun run cli upstream:check --verbose

upstream:track

Track upstream repository changes.

# Show new commits since last check
bun run cli upstream:track show

# Record current upstream state
bun run cli upstream:track record

# Compare with specific commit
bun run cli upstream:track compare <commit-sha>

upstream:deps

Compare dependencies with upstream repositories.

bun run cli upstream:deps

upstream:analyze-esm

Analyze ESM compatibility of elements and packages.

# Analyze and generate report
bun run cli upstream:analyze-esm

# Verbose output
bun run cli upstream:analyze-esm --verbose

# Custom output path
bun run cli upstream:analyze-esm --output ./my-report.json

upstream:update

Recommended wrapper that runs analyze + sync.

bun run cli upstream:update

upstream:sync-mathquill

Sync the MathQuill fork used by the project.

bun run cli upstream:sync-mathquill

Package Management

packages:enable-publishing

Enable React package publishing (remove private flags).

# Dry run
bun run cli packages:enable-publishing --dry-run

# Enable publishing
bun run cli packages:enable-publishing

packages:create-controllers

Generate package.json files for controller packages.

bun run cli packages:create-controllers

packages:create-lib-react

Generate configuration files for @pie-lib React packages.

# Dry run
bun run cli packages:create-lib-react --dry-run

# Generate files
bun run cli packages:create-lib-react

packages:create-react-elements

Generate configuration files for React element packages.

bun run cli packages:create-react-elements

packages:init-synced-elements

Initialize package scaffolding for synced elements.

bun run cli packages:init-synced-elements

Verification

verify:controllers

Verify controller package exports before publishing.

bun run cli verify:controllers

verify:react-build

Verify that all React elements build successfully.

bun run cli verify:react-build

CLI Development

# Build the CLI
bun run build

# Run in development mode (with source maps)
bun run dev upstream:sync --help

# Lint
bun run lint

Architecture

The CLI is built with oclif, following the same architecture as the pie-qti CLI.

  • Commands: Located in src/commands/ organized by topic
  • Utilities: Shared utilities in src/utils/
  • Topics: Commands are grouped into topics (upstream, packages, verify)

Migration from Scripts

This CLI replaces the scripts in ./scripts directory:

| Old Script | New CLI Command | | ------------------------------------------- | -------------------------------------------- | | bun scripts/sync-upstream.ts | bun run cli upstream:sync | | bun scripts/check-upstream.ts | bun run cli upstream:check | | bun scripts/track-upstream.ts show | bun run cli upstream:track show | | bun scripts/check-deps.ts | bun run cli upstream:deps | | bun scripts/analyze-esm-compatibility.ts | bun run cli upstream:analyze-esm | | bun scripts/enable-react-publishing.ts | bun run cli packages:enable-publishing | | bun scripts/create-controller-packages.ts | bun run cli packages:create-controllers | | bun scripts/create-lib-react-packages.ts | bun run cli packages:create-lib-react | | bun scripts/create-react-packages.ts | bun run cli packages:create-react-elements | | bun scripts/verify-react-build.ts | bun run cli verify:react-build |

License

Same as parent project.