slince / composer-registry-manager
Composer 镜像管理器
2.3.1
2020-11-27 21:52 UTC
Requires
- php: >=7.2.5
- composer-plugin-api: ^1.1|^2.0
Requires (Dev)
- composer/composer: ^1.5|^2.0
- phpunit/phpunit: ^8.0|^9.0
README
Composer Registry Manager 可以帮助您轻松快速地在不同的 composer 仓库之间切换。
安装
通过 composer 安装
$ composer global require slince/composer-registry-manager ^2.0
示例
列出所有可用的仓库
$ composer repo:ls
--- ------------- ------------------------------------------------ ------------------------------
composer https://packagist.org.cn Europe, Canada and Singapore
aliyun https://mirrors.aliyun.com/composer China
tencent https://mirrors.cloud.tencent.com/composer China
* huawei https://mirrors.huaweicloud.com/repository/php China
cnpkg https://php.cnpkg.org China
sjtug https://packagist.mirrors.sjtug.sjtu.edu.cn China
phpcomposer https://packagist.phpcomposer.com China
kkame https://packagist.kr South Korea
hiraku https://packagist.jp Japan
webysther https://packagist.com.br Brazil
solidworx https://packagist.co.za South Africa
indra https://packagist.phpindonesia.id Indonesia
varun https://packagist.in India
--- ------------- ------------------------------------------------ ------------------------------
您可以使用 --location xx
过滤位置
$ composer repo:ls --location China
切换仓库
$ composer repo:use Please select your favorite repository (defaults to composer) [composer]: [0 ] composer [1 ] aliyun [2 ] tencent [3 ] huawei [4 ] cnpkg [5 ] sjtug [6 ] phpcomposer [7 ] kkame [8 ] hiraku [9 ] webysther [10] solidworx [11] indra [12] varun >
您也可以通过提供仓库名称来跳过选择。
$ composer repo:use aliyun
对于当前项目,添加选项 --current/-c
。
重置命令
如果您想丢弃所有自定义镜像,可以使用以下命令
$ composer repo:reset
可用命令
使用以下命令获取帮助。
$ 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
许可协议
MIT 许可协议。见 MIT