PHPackages                             xiian/composer-repo-tool - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xiian/composer-repo-tool

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xiian/composer-repo-tool
========================

Easily manage custom repositories in your composer setup.

1.0.2(3y ago)010MITPHPPHP ^5.6 || ^7.0

Since Mar 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xiian/composer-repo-tool)[ Packagist](https://packagist.org/packages/xiian/composer-repo-tool)[ RSS](/packages/xiian-composer-repo-tool/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

composer-repo-tool
==================

[](#composer-repo-tool)

[![Build Status](https://camo.githubusercontent.com/064f181c5eaca44cf904f2b0fa80d36ba87f5b061e12876cdbf7d6c502ad2bf0/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f786969616e2f636f6d706f7365722d7265706f2d746f6f6c2e737667)](https://travis-ci.org/xiian/composer-repo-tool)[![Code Coverage](https://camo.githubusercontent.com/6da8cb4a6911db21d0da7d0b22c76e642b76d1a47c7cdc0d8175c53f7d917c2e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f786969616e2f636f6d706f7365722d7265706f2d746f6f6c2e737667)](https://scrutinizer-ci.com/g/xiian/composer-repo-tool/?branch=master)[![License](https://camo.githubusercontent.com/5a911ddcd16b9110e7821386ffd8d637005a8b856c14a3c0861b955e91da4eba/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d6c69676874677265792e737667)](https://github.com/xiian/composer-repo-tool/blob/master/LICENSE.md)

Manage repositories defined inside your composer.json

Current functionality is limited to converting github repositories of type `git` to type `vcs` (which then enables composer to download archive dists instead of cloning every time).

It is also heavily opinionated for the use case I had when writing it, so your mileage may vary and pull requests welcome.

Installation
------------

[](#installation)

If you're even thinking of using this tool, you're already familiar with composer. It's all pretty standard.

```
$ composer require --dev xiian/composer-repo-tool
```

This will install `./vendor/bin/composer-repo-tool` for use inside your project.

You can also install globally:

```
$ composer global require --dev xiian/composer-repo-tool
```

Which installs into `$COMPOSER_HOME/vendor/bin/`, which should already be in your $PATH.

Usage
-----

[](#usage)

To update a single package's repository:

```
$ composer-repo-tool update $VENDOR/$PACKAGE
```

To update all repositories:

```
$ composer-repo-tool update:all
```

You can also pass a `--dry-run` flag to see what the tool *would* do, without actually doing any of it.

Under the Hood
--------------

[](#under-the-hood)

The `update` command will perform the following steps for each package given:

1. Rewrite the `composer.json` `repositories` entry for the given package
    - Use `vcs` instead of `git`
    - Convert URL from `git@$GITHUB_URL:$USER/$REPO.git` to `https://$GITHUB_URL/$USER/$REPO.git`
2. Phsycially remove the package from the `vendor/` directory
3. Run `composer update` with proper params to switch to using `dist` instead of `source`
4. Perform a git commit of the `composer.lock` and `composer.json` files. (I told you this was opinionated)

The `update:all` command will perform the above steps for every single package that is installed that does not have a `dist` associated with it in the `composer.lock` file.

TODO
----

[](#todo)

- **Decouple the source control stuff.** I like the idea of being able to perform a task after every package has been updated (for atomicity), but not everybody wants the same thing.
- **Batch mode.** `update:all` is kind of slow because it's performing the full update cycle for every package. If atomicity isn't a concern, all of those updates could be done together, and `composer update` would only need to be run once, which would greatly speed things up.
- **Integrate with `composer` more directly.** Using the internals of `composer/composer` could speed things up a bit by skipping some likely redundant steps of `composer update`.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1007 days

Total

3

Last Release

1341d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/901145f58f6157a06fc2d34aebd90a994f6f7b86ddf5119cabe9b0e840b68d63?d=identicon)[xiian](/maintainers/xiian)

---

Top Contributors

[![xiian](https://avatars.githubusercontent.com/u/133872?v=4)](https://github.com/xiian "xiian (3 commits)")

---

Tags

composer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xiian-composer-repo-tool/health.svg)

```
[![Health](https://phpackages.com/badges/xiian-composer-repo-tool/health.svg)](https://phpackages.com/packages/xiian-composer-repo-tool)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[shivas/versioning-bundle

Symfony application versioning, simple console command to manage version (with providers e.g. git tag) of your application using Semantic Versioning 2.0.0 recommendations

1121.2M1](/packages/shivas-versioning-bundle)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[overtrue/php-opencc

中文简繁转换，支持词汇级别的转换、异体字转换和地区习惯用词转换（中国大陆、台湾、香港、日本新字体）。基于 \[BYVoid/OpenCC\](https://github.com/BYVoid/OpenCC) 数据实现。

12130.7k](/packages/overtrue-php-opencc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
