Composer Registry Manager can help you easily and quickly switch between different composer repositories.
Install via composer
$ composer global require slince/composer-registry-manager ^2.0
$ composer repo:ls
--- --------------- ------------------------------------------------
composer https://packagist.org
phpcomposer https://packagist.phpcomposer.com
aliyun https://mirrors.aliyun.com/composer
tencent https://mirrors.cloud.tencent.com/composer
huawei https://mirrors.huaweicloud.com/repository/php
laravel-china https://packagist.laravel-china.org
* cnpkg https://php.cnpkg.org
sjtug https://packagist.mirrors.sjtug.sjtu.edu.cn
--- --------------- ------------------------------------------------
$ composer repo:use
Please select your favorite repository (defaults to composer) [composer]:
[0] composer
[1] phpcomposer
[2] aliyun
[3] tencent
[4] huawei
[5] laravel-china
[6] cnpkg
[7] sjtug
>
You can also skip selection by giving repository name.
$ composer repo:use phpcomposer
Add the option --current/-c
for the current project.
Use the following command for help.
$ composer repo
_____ _____ ___ ___
/ ___| | _ \ / |/ |
| | | |_| | / /| /| |
| | | _ / / / |__/ | |
| |___ | | \ \ / / | |
\_____| |_| \_\ /_/ |_|
Composer Repository Manager version 2.0.0
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands for the "repo" namespace:
repo:add Creates a repository
repo:ls List all available repositories
repo:remove Remove a repository
repo:use Change current repository
The MIT license. See MIT