PHPackages                             daspors/shellphp - 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. daspors/shellphp

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

daspors/shellphp
================

PHP command line tools

0.1(8y ago)05WTFPLPHP

Since Jan 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/DaSpors/shellphp)[ Packagist](https://packagist.org/packages/daspors/shellphp)[ Docs](http://github.com/daspors/shellphp)[ RSS](/packages/daspors-shellphp/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

ShellPHP
========

[](#shellphp)

ShellPHP helps you bring the power and ease of installation of PHP to the command line.
It is meant to provide a toolbox for developers that waht or need to develop programs in PHP that will run in bash, not in WebServer environment.

Feature overview
----------------

[](#feature-overview)

- Commandline argument handling
- Process management
- High level (Sqlite-based) data storage
- WebInterface (experimental)

\\ShellPHP\\CmdLine
===================

[](#shellphpcmdline)

The commandline handler makes it easy to define flags, options and arguments and even provides the ability to create commands that split your application into logical parts (like apt-get and many others do).

```
$cli = \ShellPHP\CmdLine\CmdLine::Make("ShellPHP Test Script","Version 0.0.0.2")
	->command('list')
		->opt('-f','none')->map('filter')
		->arrayArg('folder')
		->handler(function($args)
		{
			extract($args);
			var_dump($args);
			var_dump(get_defined_vars());
			echo "\n --> $filter $folder\n\n";
		})
		->end()
	->command('add')
		->opt('-p')->map('path')->text('Local folder to add')
		->handler(function($args)
		{
			extract($args);
			echo "Add --> $path\n\n";
		})
		->end();
$cli->command('remove')->opt('-f');
$cli->go();
```

\\ShellPHP\\Process
===================

[](#shellphpprocess)

This is a class that helps you enumerate, find and run processes.

\\ShellPHP\\Storage
===================

[](#shellphpstorage)

Really powerful yet easy to use Storage. Every application needs to store some data somewhere every now and them.
The Storage class provides a high level interface so that in most cases you wont need to perform any SQL queries.

```
class MyModel extends \ShellPHP\Storage\StoredObject
{
	public $id = 'int primary autoinc';
	public $name = 'text unique';
	public $desc = 'text';
}
\ShellPHP\Storage\Storage::Make('my_app_database.sqlite');

$obj1 = MyModel::Make(array('name'=>'obj1'));
$obj1->Save();
MyModel::Make()->set('name','obj2')->Save();

var_dump(MyModel::Select()->like('name','obj%')->results());
$obj1->Delete();
var_dump(MyModel::Select()->results());
```

\\ShellPHP\\WebInterface
========================

[](#shellphpwebinterface)

There's a currently experimental feature to provide you with a webinterface.

```
$webinterface = \ShellPHP\WebInterface\WebInterface::Make()
	->index(__DIR__."/web")
	->handler('list',function($request){ return \ShellPHP\WebInterface\WebResponse::Json(array('hello'=>'world')); } )
	->go();
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

3102d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/623201?v=4)[Daniel Spors](/maintainers/DaSpors)[@DaSpors](https://github.com/DaSpors)

---

Top Contributors

[![DaSpors](https://avatars.githubusercontent.com/u/623201?v=4)](https://github.com/DaSpors "DaSpors (15 commits)")

---

Tags

cliargumentsargvstdoutstdinargs

### Embed Badge

![Health badge](/badges/daspors-shellphp/health.svg)

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

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B13.9k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.7k357.7M11.1k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k271.5M385](/packages/nunomaduro-termwind)[clue/stdio-react

Async, event-driven console input &amp; output (STDIN, STDOUT) for truly interactive CLI applications, built on top of ReactPHP

20011.0M27](/packages/clue-stdio-react)[wp-cli/wp-cli

WP-CLI framework

5.1k19.1M405](/packages/wp-cli-wp-cli)[wp-cli/php-cli-tools

Console utilities for PHP

68227.8M375](/packages/wp-cli-php-cli-tools)

PHPackages © 2026

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