composer切换源_Composer Registry Manager

Composer Registry Manager(CRM)是一个方便的工具,用于在不同Composer源之间切换。它支持列出所有源、切换当前项目源以及管理自定义注册表。通过'crm use'命令可以轻松改变包的下载源,例如从'composer'切换到'phpcomposer'。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

软件简介

CRM - Composer Registry Manager

Composer Registry Manager 可以帮助你轻松的在不同的源之间进行切换

安装

通过composer安装

$ composer global require slince/composer-registry-manager

例子

列出所有的源

$ crm ls

composer       https://packagist.org

phpcomposer    https://packagist.phpcomposer.com

* composer-proxy https://packagist.composer-proxy.org

如果你想基于当前项目列出所有源,加上选项 --current/-c

$ crm ls -c

* composer       https://packagist.org

phpcomposer    https://packagist.phpcomposer.com

composer-proxy https://packagist.composer-proxy.org

切换源

$ crm use phpcomposer

同样的,添加选项 --current/-c 为当前项目修改

可用命令

使用下面命令查看帮助.

$ crm -l

_____   _____        ___  ___

/  ___| |  _  \      /   |/   |

| |     | |_| |     / /|   /| |

| |     |  _  /    / / |__/ | |

| |___  | | \ \   / /       | |

\_____| |_|  \_\ /_/        |_|

Composer Registry Manager

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:

add     Add one custom registry

help    Displays help for a command

list    Lists commands

ls      List all available registries

remove  Delete one custom registry

reset   Reset registry configurations

use     Change current registry

LICENSE

The MIT license. See MIT

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值