PHPackages                             easyswoole/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. [Framework](/categories/framework)
4. /
5. easyswoole/console

ActiveLibrary[Framework](/categories/framework)

easyswoole/console
==================

An efficient swoole framework

2.0.1(6y ago)47.9k31Apache-2.0PHPPHP &gt;=7.1.0

Since Mar 3Pushed 6y agoCompare

[ Source](https://github.com/easy-swoole/console)[ Packagist](https://packagist.org/packages/easyswoole/console)[ Docs](https://www.easyswoole.com/)[ RSS](/packages/easyswoole-console/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (1)

安装
--

[](#安装)

```
composer require easyswoole/console

```

Server
------

[](#server)

```
use EasySwoole\Console\Console;
use EasySwoole\Console\ModuleInterface;
$http = new swoole_http_server("127.0.0.1", 9501);

$http->on("request", function ($request, $response) {
    $response->header("Content-Type", "text/plain");
    $response->end("Hello World\n");
});

/*
 * 开一个tcp端口给console 用
 */
$tcp = $http->addlistener('0.0.0.0',9600,SWOOLE_TCP);
/*
 * 实例化一个控制台，设置密码为123456
 */
$console = new Console('myConsole','123456');

/*
 * 定义自己的一个命令
 */

class Test implements ModuleInterface
{

    public function moduleName(): string
    {
        return 'test';
    }

    public function exec(array $arg, int $fd, Console $console)
    {
       return 'this is test exec';
    }

    public function help(array $arg, int $fd, Console $console)
    {
        return 'this is test help';
    }
}

/*
 * 命令注册
 */

$console->moduleContainer()->set(new Test());
/*
 * 依附给server
 */
$console->protocolSet($tcp)->attachToServer($http);

$http->start();

```

Client
------

[](#client)

```
telnet 127.0.0.1 9600

```

### 鉴权

[](#鉴权)

```
auth {PASSWORD}

```

### 执行命令

[](#执行命令)

```
{MODULE} {ARG1} {ARG2}

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% 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 ~45 days

Total

4

Last Release

2492d ago

Major Versions

1.0.2 → 2.0.12019-07-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/45c234d5f129ea570e630425636299127647534f0c2cbb073555e2c45d403d6f?d=identicon)[kiss291323003](/maintainers/kiss291323003)

---

Top Contributors

[![kiss291323003](https://avatars.githubusercontent.com/u/24490609?v=4)](https://github.com/kiss291323003 "kiss291323003 (14 commits)")[![tioncico](https://avatars.githubusercontent.com/u/31308307?v=4)](https://github.com/tioncico "tioncico (1 commits)")

---

Tags

asyncframeworkswooleeasyswoole

### Embed Badge

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

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

###  Alternatives

[easyswoole/easyswoole

An efficient swoole framework

4.8k186.9k50](/packages/easyswoole-easyswoole)[easyswoole/mysqli

An efficient swoole framework

34120.5k27](/packages/easyswoole-mysqli)[easyswoole/redis

easyswoole component

3391.8k12](/packages/easyswoole-redis)[easyswoole/orm

php stander lib

3088.7k17](/packages/easyswoole-orm)[easyswoole/compiler

easyswoole component

691.1k](/packages/easyswoole-compiler)[easyswoole/fast-cache

An efficient swoole framework

1030.3k2](/packages/easyswoole-fast-cache)

PHPackages © 2026

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