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

nsbp-cli

v0.2.52

Published

CLI tool for creating NSBP (Node React SSR by Webpack) projects

Readme

NSBP CLI

Command-line interface for creating NSBP (Node React SSR by Webpack) projects.

🌐 Online Demo: https://nsbp.erishen.cn/

📦 Published on npm: https://www.npmjs.com/package/nsbp-cli

Installation

Global Installation (npm)

npm install -g nsbp-cli

Using npx (No Installation)

npx nsbp-cli create my-app

Verify Installation

nsbp --version

Quick Start

Create a new NSBP project with a single command:

nsbp create my-app
cd my-app
pnpm install  # NSBP CLI uses pnpm as package manager
pnpm run dev

For development with Docker (recommended):

cd my-app
make dev  # Starts development environment with hot reload

Command Reference

Create a New Project

nsbp create <app-name> [options]

# Examples
nsbp create my-app
nsbp create my-app --skip-install  # Skip npm install
nsbp create my-app --template basic  # Specify template (basic is default)

Display Framework Information

nsbp info

Help

nsbp --help          # Show all commands
nsbp create --help   # Show create command options

Templates

The CLI provides project templates to get started quickly:

  • basic (default) - Complete NSBP stack with React SSR, TypeScript, and Webpack

    • Includes full Docker support for development and production
    • Pre-configured with Makefile for easy Docker operations
    • Ready-to-use project structure
  • blog - Blog-focused template with article layouts (coming soon)

  • ecommerce - E-commerce template with product pages (coming soon)

Docker Support

The basic template includes comprehensive Docker configuration:

Docker Files Included

  • .dockerignore - Docker build ignore rules
  • docker-compose.yml - Production environment configuration
  • docker-compose.dev.yml - Development environment with hot reload
  • Dockerfile - Multi-stage production build
  • Dockerfile.dev - Development build
  • Makefile - Convenient Docker commands

Available Make Commands

make dev      # Start development environment (hot reload)
make prod     # Start production environment
make rebuild  # Rebuild and restart production containers
make logs     # View container logs
make down     # Stop and remove containers
make shell    # Open shell in production container
make shell-dev # Open shell in development container

How It Works

The CLI copies the NSBP project structure from templates/basic/ to your target directory and creates a new package.json with appropriate dependencies. You get a fully functional NSBP project ready for development, including complete Docker support.

Template Synchronization

The CLI includes a synchronization script that keeps built-in templates up-to-date with the main NSBP project code.

Sync Script

Location: cli/scripts/sync-template.js

Usage

cd cli
pnpm run update  # CLI项目使用pnpm,运行同步脚本
# 或者使用 npm run update(兼容)

Features

  • Smart copying - Copies only source code and configuration files
  • Build artifact filtering - Automatically excludes build artifacts from the public directory
  • Template transformation - Converts main project's package.json to template format
  • Integrity verification - Checks for required files before synchronization

Synchronized Files

  • src/ - React components and routing
  • public/ - Static assets
  • scripts/ - Startup and utility scripts
  • webpack.*.js - Webpack configuration
  • tsconfig.json - TypeScript configuration
  • postcss.config.js - PostCSS configuration
  • package.json - Project configuration (templatized)
  • .gitignore, .prettierrc, .prettierignore, README.md
  • Docker files: .dockerignore, docker-compose.yml, docker-compose.dev.yml, Dockerfile, Dockerfile.dev, Makefile

Development

To work on the CLI locally:

cd cli
pnpm install  # CLI项目使用pnpm作为包管理器
node ./bin/nsbp.js --help  # Test CLI locally

Package Information

  • Package Name: nsbp-cli
  • Bin Command: nsbp (install globally and run nsbp --help)
  • Version: 0.2.52
  • Dependencies: chalk, commander, fs-extra, inquirer
  • Package Manager: Uses pnpm (also compatible with npm)
  • Node Version: >=16.0.0

License

MIT