PHPackages                             clearlyip/composer-push - 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. clearlyip/composer-push

ActiveComposer-plugin

clearlyip/composer-push
=======================

Provide a Push command to composer to push to repositories

v2.0.0(1y ago)02.1k—5.6%Apache-2.0PHPPHP ^8.2CI passing

Since Jul 26Pushed 1y agoCompare

[ Source](https://github.com/clearlyip/composer-push)[ Packagist](https://packagist.org/packages/clearlyip/composer-push)[ RSS](/packages/clearlyip-composer-push/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (3)Used By (0)

Push command for composer
=========================

[](#push-command-for-composer)

This composer plugin provide a `composer push` command that allow to push the current package into a distant composer repository.

Currently supported repositories are:

- [JFrog Artifactory](https://jfrog.com/artifactory/)
- Nexus, with [nexus-repository-composer](https://github.com/sonatype-nexus-community/nexus-repository-composer).

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

[](#installation)

```
 $ composer require elendev/composer-push
```

**Important note**

This plugin is the continuation of `elendev/nexus-composer-push`, you have to migrate to this one if you haven't done it yet.

Usage
-----

[](#usage)

Many of the options are optional since they can be added directly to the `composer.json` file.

```
 # At the root of your directory
 $ composer push [--name=] \
   [--url=] \
   [--type=]
   [--repository=] \
   [--username=USERNAME] \
   [--password=PASSWORD] \
   [--ignore=test.php]\
   [--ignore=foo/]\
   [--ignore-by-git-attributes]\
   [--src-type=]\
   [--src-url=]\
   [--src-ref=]\
   [--keep-vendor, Keep vendor directory when creating zip]\
   [--ssl-verify=true/]\
   [--access-token=]

If  is not set, `composer.json` version will be used.

 # Example
 $ composer push --username=admin --password=admin123 --url=http://localhost:8081/repository/composer --ignore=test.php --ignore=foo/ --src-type=git --src-url="$(git remote get-url origin)" --src-ref="$(git rev-parse HEAD)" 0.0.1

 # Example of use --repository
 # you need firstly configure multi repositories in composer.json of the project.
 # Please refer to Configuration below (multi repository configuration format) for configuration method
 # The component will be uploaded to the first repository whose's name value matching -- repository value
 # If there is no matching between the value of repository name and the value of -- repository, the upload will fail with a prompt
 $ composer push --username=admin --password=admin123 --repository=prod --ignore=test.php --ignore=foo/ 0.0.1
```

Configuration
-------------

[](#configuration)

It's possible to add some configurations inside the `composer.json` file

```
{
    "extra": {
        "push": {
            "url": "http://localhost:8081/repository/composer",
            "type": "nexus",
            "ssl-verify": true,
            "username": "admin",
            "password": "admin123",
            "ignore-by-git-attributes": true,
            "ignore": [
                "test.php",
                "foo/"
            ]
        }
    }
}
```

Above configuration may be called unique repository configuration format, as you can only configue one repository in composer.json.

In practice, for security reasons, different versions of component code, such as production and development, often apply different deployment policy, such as disable redeploy for the production version and allow redeploy for the development version, so they need to be stored in different repositories. For versions later than 0.1.5, the command-line parameter -- repository is introduced to meet this requirement. To enable the -- repository parameter, the composer.json file needs to be in the following format:

```
{
    "extra": {
        "push": [{
            "name": "prod",
            "type": "artifactory",
            "url": "https://jfrog-art.com/artifactory/composer-local/",
            "username": "admin",
            "password": "admin123",
            "ignore-by-git-attributes": true,
            "ignore": [
                "test.php",
                "foo/"
            ]
        }, {
            "name": "dev",
            "url": "http://localhost:8081/repository/composer-devs",
            "username": "admin",
            "password": "admin123",
            "ignore-by-git-attributes": true,
            "ignore": [
                "test.php",
                "foo/"
            ]
        }]
    }
}
```

Above configuration may be called multi repository configuration format.

The new version continues to support parsing the unique repository configuration format, but remember that you cannot use the -- repository command line argument in this scenario.

The `username` and `password` can be specified in the `auth.json` file on a per-user basis with the [authentication mechanism provided by Composer](https://getcomposer.org/doc/articles/http-basic-authentication.md).

### Global configuration

[](#global-configuration)

It's also possible to add some configuration inside global `composer.json` located at composer home (`composer config -g home`).

Following precedence order will be used for each key:

- command-line parameter
- local `composer.json`
- global `composer.json`
- default

Array values will not be merged.

The command-line parameter -- repository is required if local configuration is multi repository. Global unique repository configuration will be ignored in that case.

Multi repository configuration will be merged by the `name` key.

Providers
---------

[](#providers)

Specificity for some of the providers.

### Nexus

[](#nexus)

***Source type, URL, reference***

This is an optional part that can be added to the composer.json file provided for the package which can contain the source reference for this version. This option is useful in case you have a source manager and you would like to have a direct link to the source of an specific version. The example above given will read the last commit ID from git and the remote address from git as well which is quiet simple and useful.

### Artifactory

[](#artifactory)

**Tokens**

Tokens are currently supported when used as password. The username is still required for it to work.

Standalone tokens are currently not supported.

Example of token usage:

```
{
    "extra": {
        "push": {
            "url": "https://jfrog-art.com/artifactory/composer-local",
            "type": "artifactory",
            "username": "",
            "password": ""
        }
    }
}
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.2% 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

653d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ec0eab735e90845e372e877f867df9d50957c7aeb79437b13863aa1d299e188?d=identicon)[tm1000](/maintainers/tm1000)

---

Top Contributors

[![Elendev](https://avatars.githubusercontent.com/u/1331273?v=4)](https://github.com/Elendev "Elendev (135 commits)")[![tm1000](https://avatars.githubusercontent.com/u/564256?v=4)](https://github.com/tm1000 "tm1000 (15 commits)")[![Hodgy](https://avatars.githubusercontent.com/u/1502446?v=4)](https://github.com/Hodgy "Hodgy (11 commits)")[![BramG](https://avatars.githubusercontent.com/u/379891?v=4)](https://github.com/BramG "BramG (9 commits)")[![romainvv](https://avatars.githubusercontent.com/u/1131543?v=4)](https://github.com/romainvv "romainvv (4 commits)")[![qbaze](https://avatars.githubusercontent.com/u/5493094?v=4)](https://github.com/qbaze "qbaze (4 commits)")[![LeJeanbono](https://avatars.githubusercontent.com/u/11347342?v=4)](https://github.com/LeJeanbono "LeJeanbono (4 commits)")[![zhwei](https://avatars.githubusercontent.com/u/1446459?v=4)](https://github.com/zhwei "zhwei (2 commits)")[![hexa2k9](https://avatars.githubusercontent.com/u/118494?v=4)](https://github.com/hexa2k9 "hexa2k9 (2 commits)")[![pnkov](https://avatars.githubusercontent.com/u/10485212?v=4)](https://github.com/pnkov "pnkov (2 commits)")[![glorpen](https://avatars.githubusercontent.com/u/990336?v=4)](https://github.com/glorpen "glorpen (1 commits)")[![marcoreni](https://avatars.githubusercontent.com/u/2797489?v=4)](https://github.com/marcoreni "marcoreni (1 commits)")[![andypost](https://avatars.githubusercontent.com/u/73713?v=4)](https://github.com/andypost "andypost (1 commits)")[![fghamsary](https://avatars.githubusercontent.com/u/5503041?v=4)](https://github.com/fghamsary "fghamsary (1 commits)")[![r32rf](https://avatars.githubusercontent.com/u/60923682?v=4)](https://github.com/r32rf "r32rf (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![theravel](https://avatars.githubusercontent.com/u/1029434?v=4)](https://github.com/theravel "theravel (1 commits)")[![bfeaver](https://avatars.githubusercontent.com/u/441396?v=4)](https://github.com/bfeaver "bfeaver (1 commits)")[![xrobau](https://avatars.githubusercontent.com/u/457798?v=4)](https://github.com/xrobau "xrobau (1 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/clearlyip-composer-push/health.svg)

```
[![Health](https://phpackages.com/badges/clearlyip-composer-push/health.svg)](https://phpackages.com/packages/clearlyip-composer-push)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M679](/packages/drush-drush)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)

PHPackages © 2026

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