PHPackages                             omarsemgey/forgefoundary - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. omarsemgey/forgefoundary

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

omarsemgey/forgefoundary
========================

A general programming scaffolder with pluggable modes.

v1.0.0(5mo ago)10PHPPHP ^8.2CI passing

Since Jan 24Pushed 5mo agoCompare

[ Source](https://github.com/omarSemgey/ForgeFoundary)[ Packagist](https://packagist.org/packages/omarsemgey/forgefoundary)[ RSS](/packages/omarsemgey-forgefoundary/feed)WikiDiscussions main Synced today

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

ForgeFoundary
=============

[](#forgefoundary)

ForgeFoundary is a CLI scaffolding tool that generates complete project structures (files, folders, and boilerplate code) from configurable YAML templates.

Instead of manually creating directories, files, and boilerplate code, ForgeFoundary generates them from reusable YAML-based templates and configurable modes, helping teams maintain consistent project structures while reducing repetitive work.

---

Why ForgeFoundary?
------------------

[](#why-forgefoundary)

Creating new features often involves repeating the same boilerplate:

- Creating directories
- Adding multiple related files
- Following naming conventions
- Copying template code
- Remembering project structure

ForgeFoundary automates these repetitive tasks through configurable modes, allowing projects to generate consistent scaffolding with a single command.

---

Quick Example
-------------

[](#quick-example)

Instead of manually creating:

```
Controllers/
└── UserController.php

Services/
└── UserService.php

Repositories/
└── UserRepository.php

Tests/
└── UserServiceTest.php

```

Generate everything with a single command:

```
ForgeFoundary make service User
```

The generated files, templates, naming conventions, and directory structure are entirely defined by your selected YAML mode, allowing the same command to work across different languages, frameworks, and project architectures.

---

Quick Start
-----------

[](#quick-start)

```
ForgeFoundary dry-run
```

---

Problem It Solves
-----------------

[](#problem-it-solves)

Developers repeatedly rebuild the same project structure when starting new features or projects:

- Controllers, services, repositories, tests
- Naming conventions
- Boilerplate setup
- Repeated file creation

ForgeFoundary removes this repetition by generating consistent, reusable project structures from configuration instead of manual setup.

---

Key Features
------------

[](#key-features)

- Multi-language support: Scaffold projects in any language by defining your own modes.
- Customizable modes: Each mode defines directory structures, templates, naming conventions, and scaffolding rules.
- CLI-driven workflow: Easily scaffold components, directories, and units from the command line.
- Template engine support: Use Mustache, Twig, or Blade-style templates.
- Pre- and post-scaffold hooks: Run custom commands automatically before or after scaffolding.
- Portable and framework-agnostic: Not tied to any specific framework or programming style.

---

How It Works
------------

[](#how-it-works)

### ForgeFoundary reads configuration from YAML mode files, which define:

[](#forgefoundary-reads-configuration-from-yaml-mode-files-which-define)

- Component paths and names
- Directory structures and units
- Template files, placeholders, and extensions
- Naming conventions (PascalCase, camelCase, etc.)
- CLI flags and overrides for flexible scaffolding

---

Architecture
------------

[](#architecture)

ForgeFoundary is built around a modular architecture:

- CLI command parser
- YAML mode loader
- Template rendering engine
- Placeholder resolver
- File generation engine
- Hook execution system
- Naming convention engine

---

Philosophy
----------

[](#philosophy)

ForgeFoundary is designed for developers who value automation, consistency, and flexibility in project setup. By separating scaffolding logic into configurable modes, it ensures repeatable and predictable project structures, no matter the language, framework, or team.

---

Why PHP?
--------

[](#why-php)

ForgeFoundary is implemented in PHP because of its strong ecosystem, Composer integration, and cross-platform compatibility, allowing the tool to be distributed easily while remaining language-agnostic.

---

Installation Options
--------------------

[](#installation-options)

### Requirements

[](#requirements)

Before installing ForgeFoundary, make sure you have the following installed:

- **PHP** (version 8.5 or higher) [Download PHP](https://www.php.net/downloads)
- **Composer** (PHP dependency manager) [Download Composer](https://getcomposer.org/download/)

> ForgeFoundary depends on PHP and Composer to run and manage dependencies.

### Manual Installation (Directly from the installation script)

[](#manual-installation-directly-from-the-installation-script)

You can fetch the installation script directly from the repository and run it. This works on Unix/Linux/macOS and Windows.

#### **Unix / Linux / macOS**

[](#unix--linux--macos)

```
curl -o install.sh https://raw.githubusercontent.com/omarSemgey/ForgeFoundary/main/InstallationScripts/install.sh
chmod +x install.sh
./install.sh
```

The script will:

1. Ask for the installation directory (default: ~/ForgeFoundary).
2. Clone the ForgeFoundary repository to the specified folder.
3. Install PHP dependencies using Composer.
4. Attempt to make the ForgeFoundary command available globally (requires write access to /usr/local/bin).
5. If the script cannot link globally, you can manually add the install directory to your PATH.

---

#### **Windows**

[](#windows)

```
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/omarSemgey/ForgeFoundary/main/InstallationScripts/install.ps1" -OutFile "install.ps1"
Set-ExecutionPolicy Bypass -Scope Process -Force
.\install.ps1
```

The script will:

1. Ask for the installation directory (default: $HOME\\ForgeFoundary).
2. Clone the ForgeFoundary repository to the specified folder.
3. Install PHP dependencies using Composer.
4. Optionally guide you to make ForgeFoundary accessible globally.

---

### Automatic Installation

[](#automatic-installation)

ForgeFoundary can also be installed using the following ways:

#### **Docker Installation**

[](#docker-installation)

The fastest way to run ForgeFoundary without installing PHP, Composer, or dependencies on your host machine.

1. Pull the Image

```
docker pull omarsemgey/forgefoundary
```

2. Run Anywhere Since Docker runs in a container, you must mount your current directory so the tool can see your project files:

```
docker run --rm -it -v "$(pwd):/app" -w /app omarsemgey/forgefoundary [command]
```

3. (Optional) Set an Alias To run it just by typing ForgeFoundary, add an alias to your shell profile:

**Linux/macOS (.bashrc or .zshrc):**

`alias ForgeFoundary='docker run --rm -it -v "$(pwd):/app" -w /app omarsemgey/forgefoundary'`

**Windows (PowerShell $PROFILE):**

`function ForgeFoundary { docker run --rm -it -v "${PWD}:/app" -w /app omarsemgey/forgefoundary $args }`

#### **Docker Environment Constraints**

[](#docker-environment-constraints)

Because Docker runs in a secure, isolated "sandbox," there are specific behaviors you need to be aware of:

- Host Dependency Limitation: Post-process hooks (like npm install or local system scripts) will fail because the container cannot "see" your host's installed binaries. Only tools included in the image (PHP, Composer, Git) will function.
- Path Isolation: The container only has access to the directory you "mount" into it. Absolute paths from your host machine will not work. You must use relative paths (e.g., ./output) to ensure files are written to your project folder.
- Permissions (Linux Users): Files created via Docker may be owned by root. Use the -u flag (detailed below) to avoid permission issues.

#### **AUR / yay (Arch Linux)**

[](#aur--yay-arch-linux)

```
yay -S forgefoundary
```

---

Documentation
-------------

[](#documentation)

ForgeFoundary includes a full documentation system that explains every feature in depth, including CLI commands, YAML configuration, template behavior, and scaffolding logic.

[Docs](https://omarsemgey.github.io/ForgeFoundary/Manual/).

The documentation is designed as a complete reference guide. It walks through ForgeFoundary step-by-step, from basic usage to advanced configuration, including:

- Every CLI command and option
- Full YAML mode structure (file-by-file breakdown)
- Template engine behavior and placeholder system
- Hook system (pre/post execution flow)
- Naming conventions and resolution rules
- Edge cases and known limitations
- Real usage examples and expected outputs

It is structured so you can follow it sequentially, starting from a simple scaffold and progressing toward building complex, production-ready project structures using reusable configurations.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance72

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

159d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/110037975?v=4)[omar semgey](/maintainers/omarSemgey)[@omarSemgey](https://github.com/omarSemgey)

---

Top Contributors

[![omarSemgey](https://avatars.githubusercontent.com/u/110037975?v=4)](https://github.com/omarSemgey "omarSemgey (46 commits)")

---

Tags

php8scaffoldingscaffolding-frameworkscaffolding-projectscaffolding-tool

### Embed Badge

![Health badge](/badges/omarsemgey-forgefoundary/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M150](/packages/laravel-mcp)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

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