PHPackages                             kooditorm/hyperctl - 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. kooditorm/hyperctl

ActiveLibrary[Framework](/categories/framework)

kooditorm/hyperctl
==================

Application lifecycle manager for Hyperf framework

v1.0.0(3mo ago)05MITPHPPHP &gt;=8.1

Since Feb 5Pushed 3mo agoCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

hyperctl
========

[](#hyperctl)

用于控制 Hyperf 应用进程生命周期的命令行工具。

**简介**

`hyperctl` 提供启动、停止、重启和查看 Hyperf 服务状态的便捷命令，支持守护进程模式、文件变更监听（watch）自动重启以及清理 runtime 容器等功能。

**特性**

- 启动/停止/重启/查看 Hyperf 服务
- 支持守护进程模式（`-d`）
- 支持文件变更监听并自动重启（`--watch` / `-w`）
- 支持清理 runtime 容器（`--clear` / `-c`）
- 可指定 PHP 可执行文件路径（`--php` / `-p`）

**安装**

项目已发布为 Composer 包；在你的 Hyperf 项目中安装：

```
composer require kooditorm/hyperctl --dev
```

安装后，Hyperf 会通过 `ConfigProvider` 自动注册命令（参见 `composer.json` 的 `extra.hyperf.config` 配置）。

**使用**

命令通过 Hyperf 的控制台入口运行，示例：

```
# 在项目根目录下运行 Hyperf 控制台
php bin/hyperf.php ctl:start       # 启动服务
php bin/hyperf.php ctl:start -d    # 守护模式启动
php bin/hyperf.php ctl:start -c    # 启动前清理 runtime 容器
php bin/hyperf.php ctl:start -w -t 3   # 监听文件变化并自动重启（间隔 3 秒）
php bin/hyperf.php ctl:start -p /usr/bin/php  # 指定 PHP 可执行路径

php bin/hyperf.php ctl:stop        # 停止服务
php bin/hyperf.php ctl:restart     # 重启服务
php bin/hyperf.php ctl:restart -c  # 重启并清理 runtime 容器
php bin/hyperf.php ctl:status      # 查看服务状态
```

命令名称说明：`ctl:start`、`ctl:stop`、`ctl:restart`、`ctl:status`。

**配置与实现细节**

- 进程 PID 文件位置：`runtime/hyperf.pid`（由命令读取以判断进程状态）
- Watch 模式会监控 `app`、`config` 目录以及 `.env` 文件，支持 `inotify` 扩展优先使用
- 需要 PHP &gt;= 8.1，并依赖 `hyperf/command` 包

贡献
--

[](#贡献)

欢迎提交 Issue 或 Pull Request 来改进该项目！

### 开发者信息

[](#开发者信息)

- **作者**: oswin.hu
- **邮箱**:

许可证
---

[](#许可证)

本项目采用 MIT 许可证，详情请查看 [LICENSE](LICENSE) 文件。

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance81

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

103d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/09132288c0c7309333963089a7c55c378dfedf8de461574265eb33ece0eae492?d=identicon)[oswin](/maintainers/oswin)

---

Top Contributors

[![Kooditorm](https://avatars.githubusercontent.com/u/143475401?v=4)](https://github.com/Kooditorm "Kooditorm (1 commits)")

---

Tags

swooledaemonhyperfsupervisorprocess managershutdownstartupapplication-lifecycleservice-control

### Embed Badge

![Health badge](/badges/kooditorm-hyperctl/health.svg)

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

###  Alternatives

[hyperf/hyperf-skeleton

A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.

301187.4k](/packages/hyperf-hyperf-skeleton)

PHPackages © 2026

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