PHPackages                             imponeer/composer-custom-commands - 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. [CLI &amp; Console](/categories/cli)
4. /
5. imponeer/composer-custom-commands

AbandonedArchivedComposer-plugin[CLI &amp; Console](/categories/cli)

imponeer/composer-custom-commands
=================================

Adds possibility to define console commands as composer commands with Symfony console component syntax

0.2.1(5y ago)07.2kMITPHPPHP &gt;=7.2

Since Mar 22Pushed 5y ago3 watchersCompare

[ Source](https://github.com/imponeer/composer-custom-commands)[ Packagist](https://packagist.org/packages/imponeer/composer-custom-commands)[ RSS](/packages/imponeer-composer-custom-commands/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

[![License](https://camo.githubusercontent.com/52019fe8976a610c4f8e800feeff28e6e1a172ac2eea39ead2dffec05fd18a65/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696d706f6e6565722f636f6d706f7365722d637573746f6d2d636f6d6d616e64732e7376673f6d61784167653d32353932303030)](LICENSE) [![PHP from Packagist](https://camo.githubusercontent.com/3eb36a90a08a9e55ffc0c1d6058387edfcc9e2fe13b6c2bc4215445a235edf0f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f696d706f6e6565722f636f6d706f7365722d637573746f6d2d636f6d6d616e64732e737667)](https://php.net)

Composer Custom Commands
========================

[](#composer-custom-commands)

Composer plugin that adds a possibility to define console commands as composer commands with [Symfony console](https://symfony.com/doc/current/components/console.html) component syntax.

Usage
-----

[](#usage)

To start using this plugin you need just to do 4 easy steps:

### 1. Add plugin into your composer project:

[](#1-add-plugin-into-your-composer-project)

Easiest way to do that is to execute composer command from console:

```
composer require imponeer/composer-custom-commands
```

### 2. Create class that that implements new command

[](#2-create-class-that-that-implements-new-command)

It should be look something like this:

```
namespace My\Commands;

use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;

/**
 * Your new command
 */
class DummyCommand extends Command
{

	/**
	 * Here we can configure command name, options and arguments.
	 * We using here Symfony Command syntax.
	 */
	protected function configure()
	{

	}

	/**
	 * Execute command
	 *
	 * @param InputInterface $input STDInput
	 * @param OutputInterface $output SRDOutput
	 */
	protected function execute(InputInterface $input, OutputInterface $output)
	{

	}

}
```

### 3. Create or edit config section in projects composer.json and add there section `custom-commands` with `commands` key and add there PHP class names of commands that should be added to composer

[](#3-create-or-edit-config-section-in-projects-composerjson-and-add-there-section-custom-commands-with-commands-key-and-add-there-php-class-names-of-commands-that-should-be-added-to-composer)

This should look something like this:

```
{
	"name": "my-project",
	"description": "",
	"type": "project",
	"require": {
		"imponeer/composer-custom-commands": "*"
	},
	"license": "MIT",
	"authors": [
		{
			"name": "SomeBody SomeOne",
			"email": "internet@is.ours.com"
		}
	],
	"autoload": {
		"psr-4": {
			"My\\": "src/"
		}
	},
	"extra": {
		"custom-commands": {
			"commands": [
				"My\\Commands\\DummyCommand"
			]
		}
	}
}
```

If you need that some script should be executed before every command (f.e. you need to define some constants), you can add there `boot` key with value that is filename relative from place where composer.json is.

In that case your composer.json should look similar to this:

```
{
	"name": "my-project",
	"description": "",
	"type": "project",
	"require": {
		"imponeer/composer-custom-commands": "*"
	},
	"license": "MIT",
	"authors": [
		{
			"name": "SomeBody SomeOne",
			"email": "internet@is.ours.com"
		}
	],
	"autoload": {
		"psr-4": {
			"My\\": "src/"
		}
	},
	"extra": {
		"custom-commands": {
			"commands": [
				"My\\Commands\\DummyCommand"
			],
			"boot": "boot.php"
		}
	}
}
```

### 4. If you did everything correctly, you will be able to use new composer command that is embeded in your project.

[](#4-if-you-did-everything-correctly-you-will-be-able-to-use-new-composer-command-that-is-embeded-in-your-project)

How to contribute?
------------------

[](#how-to-contribute)

If you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try [interactive GitHub tutorial](https://try.github.io).

If you found any bug or have some questions, use [issues tab](https://github.com/imponeer/composer-custom-commands/issues) and write there your questions.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.5% 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 ~437 days

Total

3

Last Release

2098d ago

PHP version history (2 changes)0.1PHP &gt;=5.5

0.2PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/dba53e399a507d1f60626164c8b1e340a5cc0dc4f0637f4c6aaff8fc239fdaee?d=identicon)[fiammybe](/maintainers/fiammybe)

![](https://www.gravatar.com/avatar/7255f306e0ca27292c50cdd9644c1c04e0d7b0f54bf35e0cdd79dc55c83b4923?d=identicon)[MekDrop](/maintainers/MekDrop)

---

Top Contributors

[![MekDrop](https://avatars.githubusercontent.com/u/342641?v=4)](https://github.com/MekDrop "MekDrop (65 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (4 commits)")[![dependabot-support](https://avatars.githubusercontent.com/u/112581971?v=4)](https://github.com/dependabot-support "dependabot-support (1 commits)")[![mend-bolt-for-github[bot]](https://avatars.githubusercontent.com/in/16809?v=4)](https://github.com/mend-bolt-for-github[bot] "mend-bolt-for-github[bot] (1 commits)")

---

Tags

composer-commandscomposer-pluginphpsymfony-console

### Embed Badge

![Health badge](/badges/imponeer-composer-custom-commands/health.svg)

```
[![Health](https://phpackages.com/badges/imponeer-composer-custom-commands/health.svg)](https://phpackages.com/packages/imponeer-composer-custom-commands)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)[madewithlove/license-checker

CLI tool to verify allowed licenses for composer dependencies

54449.8k21](/packages/madewithlove-license-checker)[shel/neos-terminal

Neos CMS Ui terminal for running Eel expressions and other commands

1441.3k](/packages/shel-neos-terminal)

PHPackages © 2026

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