PHPackages                             pulsestorm/pestle - 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. pulsestorm/pestle

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

pulsestorm/pestle
=================

A CLI framework for module based PHP code. Also has numerous Magento 2 code generation commands.

1.5.3(5y ago)5324.7k98[175 issues](https://github.com/astorm/pestle/issues)[3 PRs](https://github.com/astorm/pestle/pulls)MITPHP

Since Sep 6Pushed 3y ago41 watchersCompare

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

READMEChangelogDependencies (9)Versions (101)Used By (0)

[![Build Status](https://camo.githubusercontent.com/32e57edfdda3290121915d7640b271c4beada348950c554aa612b1dc28f00289/68747470733a2f2f7472617669732d63692e6f72672f6173746f726d2f706573746c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/astorm/pestle)[![Documentation Status](https://camo.githubusercontent.com/10c3f774fcccbf2bb926981048db1d796e2a4cf040106f51b8388a3a057a43bc/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f706573746c652f62616467652f3f76657273696f6e3d6c6174657374)](https://pestle.readthedocs.io/en/latest/?badge=latest)

What is Pestle?
---------------

[](#what-is-pestle)

Pestle is

- A PHP Framework for creating and organizing command line programs
- An experiment in implementing python style module imports in PHP
- A collection of command line programs, with a primary focus on Magento 2 code generation

Pestle grew out of my desire to do something about the growing number of simple PHP scripts in my `~/bin` that didn't have a real home, and my personal frustration with the direction of PHP's namespace system.

PHP doesn't **need** another command line framework. Symfony's console does a fine job of being the de-facto framework for building modern PHP command line applications. Sometimes though, when you start off building something no one needed, you end up with something nobody realized they wanted.

How to Use
----------

[](#how-to-use)

The easiest way to get started is to grab the latest build using curl

```
curl -LO http://pestle.pulsestorm.net/pestle.phar

```

You can see a list of commands with the following

```
php pestle.phar list-commands

```

and get help for a specific command with

```
php pestle.phar help generate_module

```

If you want to build your own `phar`, we've got a `phing` `build.xml` file setup so all you *should* need to do to build a stand alone `pestle.phar` executable is

- `git checkout git@github.com:astorm/pestle.git`
- composer.phar install
- ./build.sh (which, in turn, calls the `phing` job that builds the `phar`

If you're interested in working on the framework itself, you can use the `runner.php` in the project root. I personally use it by dropping the following in my `~/bin`.

```
#File: ~/bin/pestle_dev
#!/usr/bin/env php
