cnpm
cnpm is an npm client for the China mirror of npm.
What cnpm 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 is documented as `npm install cnpm -g`, and the minimum Node.js version is 20, with LTS recommended. Users can configure a custom registry, registry web URL, and user configuration file to build a private-registry npm CLI. By default, cnpm uses npminstall; users can select the original npm installer, with the stated trade-off 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, and includes options to ignore lifecycle scripts or omit optional dependencies. It cannot install from shrinkwrap files, and the project advises cleaning `node_modules` before retrying a failed install. The project recommends migrating to utoo, described as a modern npm package manager.
Good
- Supports npm commands and package synchronization.
- Can open package documentation and Git web URLs.
- Supports custom registry configuration.
- Accepts folder, tarball, URL, registry, and Git package inputs.
- Allows options to omit optional dependencies or lifecycle scripts.
Watch out
- Requires Node.js 20 or later.
- Mirror excludes write-related operations.
- Cannot install from shrinkwrap files.
- Project recommends migrating to utoo.
Who it suits
It suits developers using npm commands with the China mirror or configuring a private-registry npm CLI. Users should be prepared for the project's recommendation to move to utoo.
Verdict
cnpm provides an npm-style workflow for the China mirror, along with registry configuration and package input options. Its Node.js requirement, read-only mirror behavior, and migration recommendation are worth considering before adopting it.
The facts
Each one read from cnpm's own pages, with the date it was checked.
What it does
- Commands
- cnpm supports npm commands, including package synchronization and opening package documentation or a Git web URL.checked 28 Sep 2026
- Compatibility
- cnpm supports npm commands, and npmmirror says it supports commands such as install, info, and view, except write-related operations.checked 29 Sep 2026
- Install
- The project instructs users to install cnpm globally with `npm install cnpm -g`.checked 28 Sep 2026
- Installation
- The project documents global installation with `npm install cnpm -g`.checked 29 Sep 2026
- Installer
- cnpm uses npminstall by default; the README says users can choose the original npm installer, with slower install speed.checked 29 Sep 2026
- Install options
- npminstall documents options to ignore lifecycle scripts, omit optional dependencies, enforce registry-only installs, and forbid specified licenses.checked 28 Sep 2026
- License
- The cnpm repository is licensed under MIT.checked 29 Sep 2026
- Limitations
- npminstall says it cannot install from shrinkwrap files and warns that failed installs are best retried after cleaning node_modules.checked 28 Sep 2026
- Maintainer
- The package metadata lists fengmk2 as its author.checked 29 Sep 2026
- Mirror
- npmmirror describes itself as a read-only npm mirror that aims to synchronize with the official service in real time.checked 28 Sep 2026
- Mirror behavior
- npmmirror describes itself as a read-only npm mirror that aims to synchronize with the official service in real time.checked 29 Sep 2026
- Mirror commands
- npmmirror says its cnpm CLI supports commands such as install, info, and view, while write-related operations are excluded.checked 28 Sep 2026
- Node.js requirement
- The README lists Node.js 20 as the minimum requirement and LTS as recommended.checked 29 Sep 2026
- Package documentation
- The `cnpm doc` command opens package documentation, and `cnpm doc -g` opens a Git web URL.checked 29 Sep 2026
- Package sync
- Users can sync packages from npm with `cnpm sync [moduleName]`.checked 29 Sep 2026
- Package types
- npminstall supports package inputs including folders, tarballs, URLs, registry packages, and Git URLs.checked 28 Sep 2026
- 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.checked 28 Sep 2026
- 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.checked 29 Sep 2026
- Project status
- The project recommends migrating to utoo, described as a modern npm package manager.checked 29 Sep 2026
- Purpose
- cnpm is an npm client for the npmmirror.com China mirror of npm.checked 29 Sep 2026

