PHPackages                             danc0/dcli - 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. danc0/dcli

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

danc0/dcli
==========

A lightweight PHP CLI application framework.

v4.0.0(3y ago)032UnlicensePHPPHP &gt;=7.4

Since Feb 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/DPCobb/d-cli)[ Packagist](https://packagist.org/packages/danc0/dcli)[ RSS](/packages/danc0-dcli/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (2)Versions (23)Used By (0)

D-CLI
=====

[](#d-cli)

A Basic PHP CLI App Framework. This project is dependency free and meant to be a lightweight starting point for PHP CLI applications.

***These docs are a work in progress as this project is still in development.***

[Full Documentation](https://github.com/DPCobb/d-cli/wiki) (For Beta Version)

[![GitHub tag (latest by date)](https://camo.githubusercontent.com/9220497b12310b92c525346b64a5b23d16d6e72d3e54ea225a06d6ccd23e6f09/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6470636f62622f642d636c693f7374796c653d706c6173746963)](https://camo.githubusercontent.com/9220497b12310b92c525346b64a5b23d16d6e72d3e54ea225a06d6ccd23e6f09/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6470636f62622f642d636c693f7374796c653d706c6173746963) [![GitHub](https://camo.githubusercontent.com/e54e8a89681fdd9a115945efc89c25197ab60c8c0c42773522d3991c5e3cf141/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6470636f62622f642d636c693f7374796c653d706c6173746963)](https://camo.githubusercontent.com/e54e8a89681fdd9a115945efc89c25197ab60c8c0c42773522d3991c5e3cf141/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6470636f62622f642d636c693f7374796c653d706c6173746963)

Basic Setup
-----------

[](#basic-setup)

Install with: `composer create-project danc0/dcli` or download the latest package.

After creating your main file (ex: `src/dcli`) ensure you make that file executable and optionally add it to your path so you can call your application from anywhere. You will also want to create a Composer autoload file.

The most basic setup uses anonymous functions to process commands.

```
#!/usr/bin/php
