Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daysai/cgr
cgr -- change registry
https://github.com/daysai/cgr
Last synced: 28 days ago
JSON representation
cgr -- change registry
- Host: GitHub
- URL: https://github.com/daysai/cgr
- Owner: daysai
- License: mit
- Created: 2018-11-16T03:19:49.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-09-08T04:44:44.000Z (about 2 years ago)
- Last Synced: 2024-09-29T15:43:31.192Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 36.1 KB
- Stars: 53
- Watchers: 1
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-packages - cgr
README
# cgr -- change registry | yarn & npm registry manager
[![npm](https://img.shields.io/npm/v/cgr.svg)](https://www.npmjs.com/package/cgr)
[![NPM downloads](http://img.shields.io/npm/dm/cgr.svg?style=flat)](https://npmjs.org/package/cgr)
[![dependency Status](https://snyk.io/test/npm/cgr/badge.svg?style=flat-square)](https://snyk.io/test/npm/cgr)`cgr` can help you easy and fast switch between different npm or yarn registries,
now include: `npm`, `cnpm`, `taobao`, `yarn`.## Install
```
$ npm install -g cgr
```## Example
```
$ cgr ls //* for bothnpm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
* taobao - https://registry.npmmirror.com/
yarn --- https://registry.yarnpkg.com/```
```
$ cgr ls //N for npm, Y for yarn, P for pnpmN npm ---- https://registry.npmjs.org/
cnpm --- http://r.cnpmjs.org/
Y taobao - https://registry.npmmirror.com/
yarn --- https://registry.yarnpkg.com/```
```
$ cgr use cnpm //both switch registry to cnpmnpm registry has been set to: http://r.cnpmjs.org/
yarn registry has been set to: http://r.cnpmjs.org/```
```
$ cgr use cnpm y //yarn switch registry to cnpmyarn registry has been set to: http://r.cnpmjs.org/
```
```
$ cgr use cnpm n //npm switch registry to cnpmnpm registry has been set to: http://r.cnpmjs.org/
```
```
$ cgr on pnpm //enable pnpm switch registrycgr enable pnpm success
```
```
$ cgr off pnpm //disable pnpm switch registrycgr disable pnpm success
```
```
$ cgr use cnpm p //pnpm switch registry to cnpmpnpm registry has been set to: http://r.cnpmjs.org/
```
## Usage
```
Usage: cgr [options] [command]Commands:
ls List all the registries
use [type] Change registry to registry
add [home] Add one custom registry
del Delete one custom registry
test [registry] Show the response time for one or all registries
on [type] Enable pnpm or other type
off [type] Disable pnpm or other type
help Print this helpOptions:
-h, --help output usage information
-V, --version output the version number
```## Registries
- [npm](https://www.npmjs.org)
- [cnpm](http://cnpmjs.org)
- [taobao](https://npmmirror.com)
- [yarn](https://yarnpkg.com)## Notice
When you use an other registry, you can not use the `publish` command.
## LICENSE
MIT