Skip to content
SPECIFICTION
Get listed

cnpm

github.com

WindowsmacOSLinuxSelf-hosted
Visit github.com
Spec score 7.6 #11 of 19 in JavaScript Package Managers

What it is

cnpm is an npm client for the China mirror of npm. It supports npm commands for package installation and synchronization, and can open package documentation or a Git web URL. Global installation uses `npm install cnpm -g`, and the minimum Node.js version is 20, with LTS recommended. Users can configure a custom registry, registry web address, and user configuration file to create a private-registry npm CLI. cnpm uses npminstall by default, though the original npm installer can be selected at the stated cost of losing the fastest install speed. The mirror is read-only and aims to synchronize with the official service in real time, so write-related operations are excluded. npminstall accepts folders, tarballs, URLs, registry packages, and Git URLs. Its options include ignoring lifecycle scripts, omitting optional dependencies, enforcing registry-only installs, and forbidding specified licenses. It cannot install from shrinkwrap files, and failed installs are best retried after cleaning `node_modules`. The project is MIT licensed and recommends migrating to utoo, described as a modern npm package manager. cnpm runs on Linux, macOS, Windows, and self-hosted environments.

Spec sheet

Purpose
cnpm is an npm client for the npmmirror.com China mirror of npm.Read 29 Sep 2026 · github.com
License
The cnpm repository is licensed under MIT.Read 29 Sep 2026 · github.com
Commands
cnpm supports npm commands, including package synchronization and opening package documentation or a Git web URL.Read 28 Sep 2026 · github.com
Compatibility
cnpm supports npm commands, and npmmirror says it supports commands such as install, info, and view, except write-related operations.Read 29 Sep 2026 · npmmirror.com
Install
The project instructs users to install cnpm globally with `npm install cnpm -g`.Read 28 Sep 2026 · github.com
Install options
npminstall documents options to ignore lifecycle scripts, omit optional dependencies, enforce registry-only installs, and forbid specified licenses.Read 28 Sep 2026 · github.com
Installation
The project documents global installation with `npm install cnpm -g`.Read 29 Sep 2026 · github.com
Installer
cnpm uses npminstall by default; the README says users can choose the original npm installer, with slower install speed.Read 29 Sep 2026 · github.com
Limitations
npminstall says it cannot install from shrinkwrap files and warns that failed installs are best retried after cleaning node_modules.Read 28 Sep 2026 · github.com
Maintainer
The package metadata lists fengmk2 as its author.Read 29 Sep 2026 · github.com
Mirror
npmmirror describes itself as a read-only npm mirror that aims to synchronize with the official service in real time.Read 28 Sep 2026 · npmmirror.com
Mirror behavior
npmmirror describes itself as a read-only npm mirror that aims to synchronize with the official service in real time.Read 29 Sep 2026 · npmmirror.com
Mirror commands
npmmirror says its cnpm CLI supports commands such as install, info, and view, while write-related operations are excluded.Read 28 Sep 2026 · npmmirror.com
Node.js requirement
The README lists Node.js 20 as the minimum requirement and LTS as recommended.Read 29 Sep 2026 · github.com
Package documentation
The `cnpm doc` command opens package documentation, and `cnpm doc -g` opens a Git web URL.Read 29 Sep 2026 · github.com
Package sync
Users can sync packages from npm with `cnpm sync [moduleName]`.Read 29 Sep 2026 · github.com
Package types
npminstall supports package inputs including folders, tarballs, URLs, registry packages, and Git URLs.Read 28 Sep 2026 · github.com
Private registries
The README shows how to alias cnpm with a custom registry, registry web URL, and user configuration file to build a private registry npm CLI.Read 28 Sep 2026 · github.com
Private registry
The README shows how to alias cnpm with custom registry, registry web, and user configuration URLs to build a private registry npm CLI.Read 29 Sep 2026 · github.com
Project status
The project recommends migrating to utoo, described as a modern npm package manager.Read 29 Sep 2026 · github.com

Strong points and limits

Strong points

  • Free npm client for the China mirror
  • Supports Linux, macOS, Windows, and self-hosting
  • Offers custom registry configuration
  • Accepts packages from multiple input types
  • Includes package synchronization and documentation commands

Limits

  • Requires Node.js 20 or later
  • Read-only mirror excludes write operations
  • Cannot install from shrinkwrap files
  • Project recommends migrating to utoo

Who it suits

It suits developers using npm-compatible commands with the China npm mirror or configuring a private registry CLI. Users should be comfortable with Node.js 20 or later and the mirror's read-only behavior.

Verdict

cnpm provides npm-style workflows, registry configuration, and package synchronization around a read-only China mirror. Its documented Node.js requirement and shrinkwrap limitation matter when fitting it into existing projects.

Where Specifiction places it

Alternatives to cnpmAll alternatives →