PHPackages                             uniondrug/console - 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. uniondrug/console

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

uniondrug/console
=================

Uniondrug Console Component for uniondrug/framework

2.3.1(5y ago)06.1k4MITPHP

Since Jan 16Pushed 5y ago2 watchersCompare

[ Source](https://github.com/uniondrug/console)[ Packagist](https://packagist.org/packages/uniondrug/console)[ RSS](/packages/uniondrug-console/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (15)Used By (4)

UniondrugConsole 命令行工具
======================

[](#uniondrugconsole-命令行工具)

安装
--

[](#安装)

```
composer requre uniondrug/console

```

使用
--

[](#使用)

```
$ php console
   __  __      _             ____
  / / / /___  (_)___  ____  / __ \_______  ______ _
 / / / / __ \/ / __ \/ __ \/ / / / ___/ / / / __ `/
/ /_/ / / / / / /_/ / / / / /_/ / /  / /_/ / /_/ /
\____/_/ /_/_/\____/_/ /_/_____/_/   \__,_/\__, /
                                          /____/   Console 1.0.0

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -e, --env[=ENV]       The environment the command should run under. [default: "development"]
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  config      列出所有配置文件
  help        Displays help for a command
  list        Lists commands
```

命令
--

[](#命令)

### 默认命令

[](#默认命令)

`config` 列出所有配置文件信息。使用如下：

```
$ php console config -e production
+-----------------------------------+----------------------+
| Key                               | Value                |
+-----------------------------------+----------------------+
| key.k1.k2                         | value                |
+-----------------------------------+----------------------+
```

### 自定义命令

[](#自定义命令)

在项目`app\Commands`目录下，创建命令，默认命名空间是`App\Commands`，命令类必须以`Command`结尾，继承`UniondrugConsole\Command`.

比如：

```
namespace App\Commands;

use Uniondrug\Console\Command;

class LocalCommand extends Command
{
    public function configure()
    {
        $this->setName('local:name');
    }

    public function handle()
    {
        $this->line("Hello world");
    }
}
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 88% 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 ~69 days

Recently: every ~199 days

Total

14

Last Release

2180d ago

Major Versions

1.2 → 2.02018-02-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/865ceb7d8226574735eab8fc82de9cfbc4a708c291b3c816e75d53944348b686?d=identicon)[wsfuyibing](/maintainers/wsfuyibing)

---

Top Contributors

[![xueron](https://avatars.githubusercontent.com/u/2560873?v=4)](https://github.com/xueron "xueron (22 commits)")[![fuyibing](https://avatars.githubusercontent.com/u/8390620?v=4)](https://github.com/fuyibing "fuyibing (2 commits)")[![william-wqq](https://avatars.githubusercontent.com/u/12166074?v=4)](https://github.com/william-wqq "william-wqq (1 commits)")

### Embed Badge

![Health badge](/badges/uniondrug-console/health.svg)

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

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.4k](/packages/illuminate-console)[whatsdiff/whatsdiff

See what's changed in your project's dependencies

771.2k](/packages/whatsdiff-whatsdiff)

PHPackages © 2026

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