# cnpm

> cnpm: npm client for cnpmjs.org

Latest version **9.4.0** (published 2023-12-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install cnpm
pnpm add cnpm
yarn add cnpm
bun add cnpm
```

Provides the command `cnpm`.

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 9.4.0 |
| Published | 2023-12-28 |
| First published | 2013-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 14.18.0 |
| Dependencies | 11 |
| Unpacked size | 43.2 MB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 2094 |
| Author | fengmk2 |
| Maintainers | alsotang, dead_horse, fengmk2 |
| Keywords | cnpm, npm, npminstall |

## Links

- npm: https://www.npmjs.com/package/cnpm
- Repository: https://github.com/cnpm/cnpm
- Issues: https://github.com/cnpm/cnpm/issues
- npm.io page: https://npm.io/package/cnpm

## Dependencies (11)

- [ini](https://npm.io/package/ini.md) ^1.3.4
- [npm](https://npm.io/package/npm.md) ^9.6.2
- [open](https://npm.io/package/open.md) ^8.2.1
- [giturl](https://npm.io/package/giturl.md) ^1.0.0
- [urllib](https://npm.io/package/urllib.md) ^3.1.0
- [bagpipe](https://npm.io/package/bagpipe.md) ^0.3.5
- [commander](https://npm.io/package/commander.md) ~2.10.0
- [npminstall](https://npm.io/package/npminstall.md) ^7.0.0
- [cross-spawn](https://npm.io/package/cross-spawn.md) ~0.2.8
- [npm-request](https://npm.io/package/npm-request.md) ^1.0.0
- [auto-correct](https://npm.io/package/auto-correct.md) ^1.0.0

## Recent versions

- 9.4.0 (latest) — 2023-12-28
- 8.6.1 (latest-8) — 2023-01-01
- 7.1.1 (latest-7) — 2022-02-08
- 6.2.0 (latest-6) — 2021-04-18
- 3.5.0 (latest-3) — 2019-05-24
- 4.6.0 (latest-4) — 2019-05-24
- 5.4.0 (latest-5) — 2019-05-24
- 9.3.2 — 2023-12-08
- 9.3.1 — 2023-12-07
- 9.3.0 — 2023-12-06
- 9.2.0 — 2023-05-02
- 9.1.0 — 2023-03-26
- 9.0.1 — 2023-01-01
- 9.0.0 — 2023-01-01
- 8.6.0 — 2023-01-01
- … 101 more at https://npm.io/package/cnpm/versions

## README

# cnpm

[![NPM Version](https://img.shields.io/npm/v/cnpm.svg?style=flat-square)](https://npmjs.com/package/cnpm)
[![NPM Download](https://img.shields.io/npm/dm/cnpm.svg?style=flat-square)](https://npmjs.com/package/cnpm)
[![NPM Quality](http://npm.packagequality.com/shield/cnpm.svg?style=flat-square)](http://packagequality.com/#?package=cnpm)
[![GitHub Actions CI](https://github.com/cnpm/cnpm/actions/workflows/nodejs.yml/badge.svg?style=flat-square)](https://github.com/cnpm/cnpm/actions/workflows/nodejs.yml)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcnpm%2Fcnpm.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcnpm%2Fcnpm?ref=badge_shield)

![logo](https://raw.github.com/cnpm/cnpmjs.org/master/logo.png)

cnpm: npm client for [npmmirror.com](http://npmmirror.com/)

## Requirements

|         | Minimum | Recommended |
|---------|---------|-------------|
| Node.js | 14.18.0 | LTS         |

## Install

```bash
npm install cnpm -g
```

If you're in China, maybe you should install it from our [China mirror](https://registry.npmmirror.com):

```bash
npm install cnpm -g --registry=https://registry.npmmirror.com
```

## Usage

Support all commands just like `npm`.

### Sync packages from `npm`

```bash
cnpm sync [moduleName]
```

### Open package document or git web url

```bash
cnpm doc [name]
cnpm doc -g [name] # open git web url directly
```

## Build your own private registry npm cli

```bash
npm install cnpm -g

# then alias it
alias mynpm='cnpm --registry=https://registry.npm.example.com \
  --registryweb=https://npm.example.com \
  --userconfig=$HOME/.mynpmrc'
```

## Install with original npm cli

cnpm using [npminstall](https://github.com/cnpm/npminstall) by default.
If you don't like symlink mode for `node_modules`, you can change the installer to original npm.
But you will lose the fastest install speed.

```bash
cnpm i --by=npm react-native
```

## License

[MIT](LICENSE.txt)

<!-- GITCONTRIBUTOR_START -->

## Contributors

|[<img src="https://avatars.githubusercontent.com/u/156269?v=4" width="100px;"/><br/><sub><b>fengmk2</b></sub>](https://github.com/fengmk2)<br/>|[<img src="https://avatars.githubusercontent.com/u/985607?v=4" width="100px;"/><br/><sub><b>dead-horse</b></sub>](https://github.com/dead-horse)<br/>|[<img src="https://avatars.githubusercontent.com/u/32174276?v=4" width="100px;"/><br/><sub><b>semantic-release-bot</b></sub>](https://github.com/semantic-release-bot)<br/>|[<img src="https://avatars.githubusercontent.com/u/1147375?v=4" width="100px;"/><br/><sub><b>alsotang</b></sub>](https://github.com/alsotang)<br/>|[<img src="https://avatars.githubusercontent.com/u/26602940?v=4" width="100px;"/><br/><sub><b>0xflotus</b></sub>](https://github.com/0xflotus)<br/>|[<img src="https://avatars.githubusercontent.com/u/114114?v=4" width="100px;"/><br/><sub><b>weakish</b></sub>](https://github.com/weakish)<br/>|
| :---: | :---: | :---: | :---: | :---: | :---: |
|[<img src="https://avatars.githubusercontent.com/u/4635838?v=4" width="100px;"/><br/><sub><b>gemwuu</b></sub>](https://github.com/gemwuu)<br/>|[<img src="https://avatars.githubusercontent.com/u/543405?v=4" width="100px;"/><br/><sub><b>ibigbug</b></sub>](https://github.com/ibigbug)<br/>|[<img src="https://avatars.githubusercontent.com/u/1094697?v=4" width="100px;"/><br/><sub><b>qiu8310</b></sub>](https://github.com/qiu8310)<br/>|[<img src="https://avatars.githubusercontent.com/u/5574625?v=4" width="100px;"/><br/><sub><b>elrrrrrrr</b></sub>](https://github.com/elrrrrrrr)<br/>|[<img src="https://avatars.githubusercontent.com/u/29791463?v=4" width="100px;"/><br/><sub><b>fossabot</b></sub>](https://github.com/fossabot)<br/>|[<img src="https://avatars.githubusercontent.com/u/360661?v=4" width="100px;"/><br/><sub><b>popomore</b></sub>](https://github.com/popomore)<br/>|
[<img src="https://avatars.githubusercontent.com/u/955484?v=4" width="100px;"/><br/><sub><b>xieren58</b></sub>](https://github.com/xieren58)<br/>|[<img src="https://avatars.githubusercontent.com/u/11746742?v=4" width="100px;"/><br/><sub><b>xiaohuoni</b></sub>](https://github.com/xiaohuoni)<br/>

This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Wed Dec 06 2023 21:42:25 GMT+0800`.

<!-- GITCONTRIBUTOR_END -->

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcnpm%2Fcnpm.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcnpm%2Fcnpm?ref=badge_large)

---
_Source: https://npm.io/package/cnpm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
