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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sptv-cli

v1.0.3

Published

Synchronize the package to verdaccio

Readme

SPTV-CLI

Sync your npm packages to verdaccio with ease

npm license verdaccio

English | 中文

🎬 Demo Preview

Usage effect

sptv-cli allows you to focus only on maintaining your dependencies for both internal and external networks. 👉🏻 How to get internal network publishable packages

📦 Overview

In daily development, sometimes we work in environments with extremely high security requirements, which leads to the distinction between internal and external networks.

In internal network development, we cannot use npm to install dependencies, which causes great difficulties for our web development. So we need to set up verdaccio in the internal network environment and sync packages used in external network projects to the verdaccio built in the internal network.

🔴 Common Issues with Verdaccio Usage

In completely isolated internal and external network environments, we generally face the following issues when using verdaccio:

  1. Manual publishing is cumbersome: Each package must be manually published to verdaccio using npm publish. When there are many packages, the workload is enormous, and the publication time is unpredictable.
  2. verdaccio may not display packages that already exist, resulting in a poor user experience
  3. Complex dependency relationships: Packages may have complex dependency relationships, and manual publishing is prone to omitting dependent packages
  4. Repetitive work: Every project update requires manually republishing all related packages
  5. Low efficiency: The entire process is time-consuming and labor-intensive, impacting development efficiency

Translated with DeepL.com (free version)

✅ Problems Solved by sptv-cli

  1. Automated Synchronization: One-click automatic synchronization of external packages to internal Verdaccio, eliminating manual publishing
  2. Intelligent Dependency Scanning: Automatically scans and identifies package dependencies, ensuring all dependent packages are synchronized
  3. Batch Processing: Supports batch processing of multiple packages, greatly improving synchronization efficiency
  4. Version Consistency: Ensures package versions in internal Verdaccio are completely consistent with external networks
  5. Progress Visualization: Real-time display of synchronization progress, keeping users informed of operation status
  6. Flexible Configuration: Supports multiple configuration options to adapt to different usage scenarios

🚀 Installation

# Install globally
npm install -g sptv-cli

# Or use npx
npx sptv-cli --help

📖 Usage

Main Command (Full Workflow)

The main command performs a complete workflow: copy packages → scan for valid packages → sync to Verdaccio.

# Basic usage (uses current directory as source)
sptv-cli -d <verdaccio storage directory>

# Specify source directory
sptv-cli -i <source-directory> -d <verdaccio storage directory>

# Save package list to file
sptv-cli -i <source-directory> -d <verdaccio storage directory> -s

Options:

| Option | Description | Default | |--------|-------------|---------| | -i, --input <path> | Source directory containing packages | Current directory | | -d, --destination-path <path> | Verdaccio storage directory path | - | | -s, --save | Save package list to file | false |

Copy Directory Command

You can use the copy function to copy a directory to another location.

sptv-cli copy <source-directory> <destination-directory>

Sync Command

If you find that there are packages in the verdaccio storage directory but they are not synced on localhost:4873, you can use the sync function in the verdaccio storage directory.

sptv-cli sync

Or specify the “source directory” and target directory:

sptv-cli sync <source-directory> <verdaccio storage directory>

Options:

| Option | Description | Default | |--------|-------------|---------| | -s, --save | Save the package list to file | false |

📦 How to get npm dependency packages

Here's a relatively good way for you to get npm dependency packages.

You need to set up verdaccio in an external network environment. Assuming you have already set up verdaccio and installed the nrm management tool:

  1. Create a new npm source:

    nrm add verdaccio http://localhost:4873
  2. Set the npm source to verdaccio

    nrm use verdaccio

At this point, your npm usage will look like this: alt text

When you use npm or pnpm to download dependencies, the corresponding packages will be cached in the storage directory of verdaccio, and you can get a series of dependency packages that meet the conditions for publishing:

packages

Afterwards, you just need to focus on maintaining these packages and use sptv-cli to sync them to the internal network environment with one click

📢 Note

If you find that packages are not cached in the verdaccio storage directory after using npm or pnpm to install dependencies, you can do the following before reinstalling:

  • npm cache clean -f
  • Delete the pnpm cache directory