PHPackages                             onspli/composer-inject-repositories - 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. onspli/composer-inject-repositories

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

onspli/composer-inject-repositories
===================================

Plugin loads repository definitions from external files and injects them to composer.json.

v0.1.0(2y ago)13MITPHP

Since Apr 20Pushed 2y agoCompare

[ Source](https://github.com/onspli/composer-inject-repositories)[ Packagist](https://packagist.org/packages/onspli/composer-inject-repositories)[ RSS](/packages/onspli-composer-inject-repositories/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Composer Inject Repositories Plugin
===================================

[](#composer-inject-repositories-plugin)

This Composer plugin allows loading repository definitions from external files and injecting them to composer.json. Files with additional repositories can be stored locally or fetched from remote locations (http, git).

Usage
-----

[](#usage)

You have several composer packages stored in private Github repositories (and thus not available on public packagist.org repository), and you want to use the packages in several composer projects.

Install plugin globally.

```
composer global require onspli/composer-inject-repositories
```

Create file `repos.json` listing all the repositories you want to use (as described on )

```
{
    "repositories": [
        {
            "type": "git",
            "url": "git@github.com:onspli/private-package-1.git"
        },
        {
            "type": "git",
            "url": "git@github.com:onspli/private-package-2.git"
        },
        {
            "type": "git",
            "url": "git@github.com:onspli/private-package-3.git"
        }
    ]
}
```

Add extra option `inject-repositories` to `composer.json` of your project.

```
{
    "name": "onspli/project-using-private-repos",
    "type": "project",
    "extra": {
        "inject-repositories": [
            {
                "type": "local",
                "path": "/path/to/repos.json"
            },
            {
                "type": "remote",
                "url": "https://my-domain.cz/repos.json"
            },
            {
                "type": "git",
                "url": "git@github.com:onspli/private-repos.git",
                "file": "repos.json"
            }
        ]
    },
    "require": {
        "onspli/private-package-2": "dev-main"
    }
}
```

The plugin reads `repos.json` file and injects repositories to `composer.json` of the project, so during composer invocations it effectively looks like:

```
{
    "name": "onspli/project-using-private-repost",
    "type": "project",
    "require": {
        "onspli/private-package-2": "dev-main"
    },
    "repositories": [
        {
            "type": "git",
            "url": "git@github.com:onspli/private-package-1.git"
        },
        {
            "type": "git",
            "url": "git@github.com:onspli/private-package-2.git"
        },
        {
            "type": "git",
            "url": "git@github.com:onspli/private-package-3.git"
        }
    ]
}
```

Verbose mode
------------

[](#verbose-mode)

See what files and repositories are injected using composer verbose mode:

```
composer install --verbose
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

759d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/413b99f734b277cbf822e1726f13864540b9ae61e5dfe18154507605dc1af4ab?d=identicon)[onspli](/maintainers/onspli)

---

Top Contributors

[![onspli](https://avatars.githubusercontent.com/u/7120489?v=4)](https://github.com/onspli "onspli (7 commits)")

---

Tags

composercomposer-plugin

### Embed Badge

![Health badge](/badges/onspli-composer-inject-repositories/health.svg)

```
[![Health](https://phpackages.com/badges/onspli-composer-inject-repositories/health.svg)](https://phpackages.com/packages/onspli-composer-inject-repositories)
```

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

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