Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cnpm/cnpm

cnpm: npm client for China mirror of npm
https://github.com/cnpm/cnpm

cnpm npm npminstall tnpm

Last synced: 3 days ago
JSON representation

cnpm: npm client for China mirror of npm

Awesome Lists containing this project

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)

## Contributors

|[
fengmk2](https://github.com/fengmk2)
|[
dead-horse](https://github.com/dead-horse)
|[
semantic-release-bot](https://github.com/semantic-release-bot)
|[
alsotang](https://github.com/alsotang)
|[
0xflotus](https://github.com/0xflotus)
|[
weakish](https://github.com/weakish)
|
| :---: | :---: | :---: | :---: | :---: | :---: |
|[
gemwuu](https://github.com/gemwuu)
|[
ibigbug](https://github.com/ibigbug)
|[
qiu8310](https://github.com/qiu8310)
|[
elrrrrrrr](https://github.com/elrrrrrrr)
|[
fossabot](https://github.com/fossabot)
|[
popomore](https://github.com/popomore)
|
[
xieren58](https://github.com/xieren58)
|[
xiaohuoni](https://github.com/xiaohuoni)

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`.

[![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)