Create projects or directory structures from templates

3.0 2020-04-28 18:31 UTC

This package is not auto-updated.

Last update: 2021-02-16 22:54:57 UTC


Build Status Travis

Cheesecake - the best!

Cheesecake is a project/directory skeleton generator thingy for PHP. It is inspired by


    $ composer require madflow/cheesecake
    $ ./vendor/bin/cheesecake

Use it without the cli

    $template = __DIR__ .'/mytemplate';
    $output = __DIR__ .'/myoutput';
    $params = ['project_name' => 'Yeah!'];
    $options = [
        Generator::OPT_OUTPUT => $output,
        Generator::OPT_NO_INTERACTION => true,
    $o = new Generator($template, $params, $options);


# Clone the repo
git clone

# Install dependencies
cd cheesecake
composer install


Create a Silex starter project
# Create output directory
mkdir /tmp/silex

# Mmmh  - Cheesecake
./bin/cheesecake -o /tmp/silex examples/silex-starter


Put your hooks in hooks and name them pre_gen.php or post_gen.php.


  • When processing Twig templates the Mustache engine tries to interpret expressions like {{ okay | upper }} and will fail with Mustache_Exception_UnknownFilterException: Unknown filter: upper
  • In order to circumvent this, it is possible to define a magic filters_ignore parameter in your cheesecake.json file.
        "app_name": "twig",
        "filters_ignore": ["upper"]
  • filters_ignore excepts an array of strings which will be translated to dummy filters.