PHPackages                             raphhh/samurai - 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. raphhh/samurai

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

raphhh/samurai
==============

PHP scaffolding tool - creates for you all the files you need to start a new project

1.0.0(10y ago)191265[1 PRs](https://github.com/Raphhh/samurai/pulls)2MITPHPPHP &gt;=5.4

Since Dec 8Pushed 9y ago4 watchersCompare

[ Source](https://github.com/Raphhh/samurai)[ Packagist](https://packagist.org/packages/raphhh/samurai)[ Docs](https://github.com/Raphhh/samurai)[ RSS](/packages/raphhh-samurai/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (10)Versions (2)Used By (2)

Samurai
=======

[](#samurai)

[![Latest Stable Version](https://camo.githubusercontent.com/d628b2a68520ed74d86cad78fc9be5206f373cf832b5d43a91be8ca7b2c3b550/68747470733a2f2f706f7365722e707567782e6f72672f7261706868682f73616d757261692f762f737461626c652e737667)](https://packagist.org/packages/raphhh/samurai)[![Docs](https://camo.githubusercontent.com/31ddc8832589367fcf1caac9cbb1923f539d18080c8ec79e83f3eeaa98a4f853/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f73616d757261692f62616467652f3f76657273696f6e3d6c6174657374)](http://samurai.readthedocs.org)[![Build Status](https://camo.githubusercontent.com/34b9cf11d92631d9bfce81996cfea047783ce53b354664df75df4c240797e244/68747470733a2f2f7472617669732d63692e6f72672f5261706868682f73616d757261692e706e67)](https://travis-ci.org/Raphhh/samurai)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/2356265329db3e672274de197289d321d5cc83ad64016cafabf7d29d0e4b8577/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5261706868682f73616d757261692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Raphhh/samurai/)[![Code Coverage](https://camo.githubusercontent.com/c38246d15a203fac111ed2e6ceb672f2a3ea58e09ee76a3dc2ab96c45a3216e7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5261706868682f73616d757261692f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Raphhh/samurai/)[![Total Downloads](https://camo.githubusercontent.com/eefc213bd066019850106cf081cdad28fda0821acc4a543e193a7dc778996e45/68747470733a2f2f706f7365722e707567782e6f72672f7261706868682f73616d757261692f646f776e6c6f6164732e737667)](https://packagist.org/packages/raphhh/samurai)[![License](https://camo.githubusercontent.com/8bff5dc9e52b8b81d3017477ef29394dbb1ddbc9b84509430de491ef296ea41e/68747470733a2f2f706f7365722e707567782e6f72672f7261706868682f73616d757261692f6c6963656e73652e737667)](https://packagist.org/packages/raphhh/samurai)

[Samurai](http://samuraiphp.com/) is a PHP scaffolding tool. It helps you to :

- **start a new project in PHP**, generating all the base files in a simple command line.
- **improve an existing project**, running several modules with specific actions.

Samurai generates all the files you need for a library, a web application, a frameworked project, and so on. You can even **load your own bootstrap**.

Samurai will run several modules during the scaffolding of a new project, or independently on an existing project. You can **choose which module** to install according to your own needs. You can also create your own module.

[![Samurai during project scaffolding](https://raw.githubusercontent.com/Raphhh/samurai/master/doc/samurai-new.png)](https://raw.githubusercontent.com/Raphhh/samurai/master/doc/samurai-new.png)

What does Samurai scaffold?
---------------------------

[](#what-does-samurai-scaffold)

Samurai installs and params your project:

1. Download the bootstrap and its dependencies with Composer
2. Param the Composer config (composer.json)
3. Dump the autoloader of Composer with your new package name
4. Execute the installed modules.

### Examples of bootstrap

[](#examples-of-bootstrap)

- A simple PHP library
- Symfony
- Laravel
- Zend
- CakePHP
- CodeIgniter
- Yii
- Drupal
- Joomla
- WordPress
- Silex
- Slim
- .. what you want!

### Examples of modules

[](#examples-of-modules)

- Init git for the project. See [raphhh/samurai-module-git](https://github.com/Raphhh/samurai-module-git).
- Create a new repo on GitHub and link it to your project (github module) (todo)
- Clean some files (changelog, ...). See [raphhh/samurai-module-cleaner](https://github.com/Raphhh/samurai-module-cleaner).
- Init PHPUnit (todo)
- Init Behat (todo)
- Link your project to Travis-ci (todo)
- ... what you want!

Installation
------------

[](#installation)

Install Samurai with Composer:

```
$ composer global require raphhh/samurai
```

Be sure you have set the COMPOSER\_BIN\_DIR in your path. For more information, see the detailed [installation doc](http://samurai.readthedocs.org/) of Samurai.

Scaffold your project
---------------------

[](#scaffold-your-project)

To create a new project, run the `new` command of Samurai and choose your bootstrap:

```
$ samurai new
```

For more information, see the detailed [scaffolding doc](http://samurai.readthedocs.org/en/latest/scaffolding/) of Samurai.

Modules
-------

[](#modules)

A module is a plugin added to Samurai. This plugin will execute some specific actions. For example, the git module will init Git in your project.

You can easily develop your own module and add it to Samurai.

The modules can run during the scaffolding of a new project, or improve an existing project.

For more information, see the detailed [modules doc](http://samurai.readthedocs.org/en/latest/modules/) of Samurai.

### Install pre-defined modules

[](#install-pre-defined-modules)

```
$ samurai module install
```

### Run modules on an existing project

[](#run-modules-on-an-existing-project)

```
$ samurai module run
```

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

[](#documentation)

See the [Samurai documentation](http://samurai.readthedocs.org/).

- [Installation](http://samurai.readthedocs.org/en/latest/installation/)
- [Usage](http://samurai.readthedocs.org/en/latest/scaffolding/)
- [Aliases](http://samurai.readthedocs.org/en/latest/aliases/)
- [Modules](http://samurai.readthedocs.org/en/latest/modules/)

Contribution and roadmap
------------------------

[](#contribution-and-roadmap)

See the [Samurai wiki](https://github.com/Raphhh/samurai/wiki).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.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

Unknown

Total

1

Last Release

3814d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fd55d984cf31c25f875f5636331a20f8be77e9443f2fd17fbccf1f9c4fe7a4c?d=identicon)[raphhh](/maintainers/raphhh)

---

Top Contributors

[![Raphhh](https://avatars.githubusercontent.com/u/5206490?v=4)](https://github.com/Raphhh "Raphhh (274 commits)")[![Gufran](https://avatars.githubusercontent.com/u/2152267?v=4)](https://github.com/Gufran "Gufran (1 commits)")[![jerairrest](https://avatars.githubusercontent.com/u/1588969?v=4)](https://github.com/jerairrest "jerairrest (1 commits)")

---

Tags

composerbootstrapscaffolding tool

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/raphhh-samurai/health.svg)

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

###  Alternatives

[icanhazstring/composer-unused

Show unused packages by scanning your code

1.7k7.0M188](/packages/icanhazstring-composer-unused)[composer/satis

Simple Repository Generator

3.3k1.4M17](/packages/composer-satis)[franzl/studio

Develop your Composer libraries with style

1.1k634.5k15](/packages/franzl-studio)[clue/phar-composer

Simple phar creation for any project managed via Composer

862881.6k29](/packages/clue-phar-composer)[sllh/composer-versions-check

Checks if packages are up to date to last major versions after update

2352.4M16](/packages/sllh-composer-versions-check)[netojose/laravel-bootstrap-4-forms

Bootstrap 4 form builder for Laravel 5

182115.3k](/packages/netojose-laravel-bootstrap-4-forms)

PHPackages © 2026

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