PHPackages                             forge-php/forge - 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. forge-php/forge

ActiveProject[CLI &amp; Console](/categories/cli)

forge-php/forge
===============

Forge CLI.

10PHP

Since Nov 11Pushed 1y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Forge
-----

[](#forge)

Forge is a command line utility that you can extend as your liking. It's primary focus is code generation, but it can do anything a command line tool can via plugins. It's very easy to write your own plugins to use with forge.

With Forge, you can use a single tool for code generation, project management, container management and so much more instead of needing to remember on a combination of a thousand cli tools. If something does not exist, you can write your own plugin in like 5 minutes and create your own commands.

Use Cases
---------

[](#use-cases)

Forge is a general purpose cli tool. Meaning, you can extend forge to make it do whatever you want to. For me, the use case is mostly code genration. I tend to write similar code too often and because of that, repeated tasks become boring. Forge can be used to literally forge components, controllers, or any other kind of boilerplate code that you hate writing. But since the plugin ecosystem makes it so much more versatile, it can be used for practically anything that is possible on a command like application.

Plugins
-------

[](#plugins)

Install plugins by registering the plugin class in `config/plugins.php`.

```
    // config/plugins.php
    return [
        MyPlugin::class => ['dev' => true, 'prod' => true],
        SomeOtherPlugin::class => ['all' => true]
    ];
```

### Creating a Plugin

[](#creating-a-plugin)

All Forge plugins must implement `Forge\Plugins\PluginInterface` interface. For ease of use, we have provided `Forge\Plugins\Plugin` class which wraps all the boilerplate so you can focus on actually building your application.

```
use Forge\Plugins\Plugin;
use Forge\Plugins\PluginServiceProviderInterface;

class MyPlugin extends Plugin
{
    public function name(): string
    {
        return 'MyPlugin';
    }

    public function boot(PluginServiceProviderInterface $provider): void
    {
        $provider->loadStubsFrom(__DIR__ . '/stubs/', $this->name());
        $provider->commands([
            SomeConsoleCommand::class
        ]);
    }
}
```

Now, just regsiter the class name in `config/plugins.php` and we should be good to go.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/167c0b2ff9f090fac299bc49edb5764743ec7d9d5c1dfccc1ea16c760aed312d?d=identicon)[aashan10](/maintainers/aashan10)

---

Top Contributors

[![aashan10](https://avatars.githubusercontent.com/u/18713900?v=4)](https://github.com/aashan10 "aashan10 (5 commits)")

### Embed Badge

![Health badge](/badges/forge-php-forge/health.svg)

```
[![Health](https://phpackages.com/badges/forge-php-forge/health.svg)](https://phpackages.com/packages/forge-php-forge)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M320](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M19](/packages/consolidation-annotated-command)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)[codedungeon/php-cli-colors

Liven up you PHP Console Apps with standard colors

10210.1M26](/packages/codedungeon-php-cli-colors)

PHPackages © 2026

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