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

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

hytmng/php-scaffolding
======================

PHPで実装したスカフォールディングツール

1.1.0(6mo ago)00MITPHPPHP &gt;=8.3

Since Dec 24Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/tominaga-h/php-scaffolding)[ Packagist](https://packagist.org/packages/hytmng/php-scaffolding)[ Docs](https://github.com/tominaga-h/php-scaffolding)[ RSS](/packages/hytmng-php-scaffolding/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (8)Versions (3)Used By (0)

php-scaffolding
===============

[](#php-scaffolding)

PHP で実装したスカフォールディングツール

インストール
------

[](#インストール)

### Composer でグローバルインストール

[](#composer-でグローバルインストール)

```
composer global require hytmng/php-scaffolding
```

`~/.composer/vendor/bin` に PATH を通してください：

```
# ~/.zshrc または ~/.bashrc に追加
export PATH="$HOME/.composer/vendor/bin:$PATH"
```

### 使用方法

[](#使用方法)

```
phspcff new my-project
```

機能
--

[](#機能)

- `template:add` - ファイルをテンプレートとして登録（`-g` オプションでグループ名を設定可能）
- `template:edit` - 指定したテンプレートを開き、雛形作成時にパラメータ化したいところを編集
- `group:list` - 全グループをリスト表示（`-f` オプションでグループ内のテンプレートも表示）
- `group:config` - フォルダ構造や使うファイルを設定する `meta.yaml` ファイルを編集
- `group:rename` - グループ名をリネーム
- `group:tree` - `meta.yaml` で設定したフォルダ構造をtree形式で表示
- `new` - 指定したグループのフォルダ構造をもとに、グループ内のテンプレートを対象ディレクトリに構築

グループとテンプレート
-----------

[](#グループとテンプレート)

グループとテンプレートは、本ツールのコアとなる概念です。

### グループ

[](#グループ)

「グループ」はプロジェクトの雛形（フォルダ/ファイル構造、テンプレートの集合）をまとめて管理する単位です。たとえば、「laravel-project」「web-service」「library」など、プロジェクトの種類ごとにグループを作成できます。

- グループごとに `meta.yaml` ファイルで、構築するディレクトリや必要なファイル構造をツリー形式で記述します。
- テンプレートをグループごとに紐付けることができ、テンプレートもグループごとに管理されます。

### テンプレート

[](#テンプレート)

「テンプレート」は、よく使うファイルの雛形です。コントローラ、モデル、設定ファイルなど、よく使うファイルをテンプレートとして登録できます。

- テンプレートは、通常のテキストファイルですが、Twig記法で変数を埋め込むことができます。
- テンプレートはコマンドで追加・編集でき、グループ内に紐づけて管理します。

### 注意

[](#注意)

バージョン1.0.0現在では、**グループ名**（`{{ group }}`）と **ディレクトリ名**（`{{ directory }}`）しか変数を利用できません。 今後のアップデートで使える変数を増やしていきます。

### 具体例

[](#具体例)

たとえば「webapp」グループに、以下のようなフォルダ構成やテンプレートファイルを記述しておくと、`phscff new webapp-sample`コマンドでその構造が自動生成されます。

#### meta.yaml の一例

[](#metayaml-の一例)

```
structure:
  src:
    Controller:
      - HomeController.php
    Model:
      - User.php
  config:
    - app.php
  public:
    - index.php
```

### 使い分け

[](#使い分け)

- **グループ** … フォルダ・ファイルの構成を定義したまとまり
- **テンプレート** … 各種ファイルの雛形。動的にコンテンツを生成可能

これにより、さまざまなプロジェクトの型を簡単に再現・使い回せます。

設定フォルダ
------

[](#設定フォルダ)

このツールは `$HOME/.phpscff` に設定フォルダを作成します。登録したテンプレート、グループ設定を保存します。

- `.phpscff/templates` テンプレート保存場所
- `.phpscff/groups` グループ設定 yaml 保存場所

CHANGELOG
---------

[](#changelog)

[CHANGELOG.md](./CHANGELOG.md) を参照

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance67

Regular maintenance activity

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Every ~0 days

Total

2

Last Release

191d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/96279553?v=4)[冨永隼人](/maintainers/tominaga-h)[@tominaga-h](https://github.com/tominaga-h)

---

Top Contributors

[![tominaga-h](https://avatars.githubusercontent.com/u/96279553?v=4)](https://github.com/tominaga-h "tominaga-h (110 commits)")

---

Tags

cliscaffoldinggeneratortemplateproject templateboilerplate

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54743.1k4](/packages/jolicode-castor)

PHPackages © 2026

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