A powerful command line application framework for PHP. It's an extensible, flexible component, You can build your command-based application in seconds!

Overview

CLIFramework

Build Status Coverage Status Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads License

CLIFramework is a command-line application framework, for building flexiable, simple command-line applications.

Commands and Subcommands can be registered from outside of an application or your plugins.

Defining a new command is pretty simple, all you need to is declare a class which is inherited from CLIFramework\Command class.

Features

  • Intuitive command class and option spec

  • command options are supported, powered by GetOptionKit. including long option, short option, required|optional|default value.

  • Hierarchical commands.

  • Automatic help page generation.

  • Automatic zsh completion generator.

  • Automatic bash completion generator.

  • Friendly message when command arguments are not enough.

  • Testable, CLIFramework provides PHPUnit test case for testing the commands in PHP.

  • Argument validation, suggestion,

  • Command Groups

  • HHVM compatible

Synopsis

class CommitCommand extends CLIFramework\Command {

    public function brief() { return 'brief of bar'; }

    public function options($opts) {
        $opts->add('C|reuse-message:','Take an existing commit object, and reuse the log message and the authorship information (including the timestamp) when creating the commit.')
            ->isa('string')
            ->valueName('commit hash')
            // ->validValues([ 'static-50768ab', 'static-c2efdc2', 'static-ed5ba6a', 'static-cf0b1eb'])
            ->validValues(function() {
                $output = array();
                exec("git rev-list --abbrev-commit HEAD -n 20", $output);
                return $output;
            })
            ;

        // Runtime completion by setting up a closure for completion
        $opts->add('c|reedit-message:','like -C, but with -c the editor is invoked, so that the user can further edit the commit message.')
            ->isa('string')
            ->valueName('commit hash')
            ->validValues(function() {
                // exec("git log -n 10 --pretty=format:%H:%s", $output);
                exec("git log -n 10 --pretty=format:%H:%s", $output);
                return array_map(function($line) {
                    list($key,$val) = explode(':',$line);
                    $val = preg_replace('/\W/',' ', $val);
                    return array($key, $val);
                }, $output);
            })
            ;

        $opts->add('author:', 'Override the commit author. Specify an explicit author using the standard A U Thor <[email protected]> format.')
            ->suggestions(array( 'c9s', 'foo' , 'bar' ))
            ->valueName('author name')
            ;

        $opts->add('output:', 'Output file')
            ->isa('file')
            ;
    }

    public function arguments($args) {
        $args->add('user')
            ->validValues(['c9s','bar','foo']);

        // Static completion result
        $args->add('repo')
            ->validValues(['CLIFramework','GetOptionKit']);

        // Add an argument info expecting multiple *.php files
        $args->add('file')
            ->isa('file')
            ->glob('*.php')
            ->multiple()
            ;
    }

    public function init() {

        $this->command('foo'); // register App\Command\FooCommand automatically

        $this->command('bar', 'WhatEver\MyCommand\BarCommand');

        $this->commandGroup('General Commands', ['foo', 'bar']);

        $this->commandGroup('Database Commands', ['create-db', 'drop-db']);

        $this->commandGroup('More Commands', [
            'foo' => 'WhatEver\MyCommand\FooCommand',
            'bar' => 'WhatEver\MyCommand\BarCommand'
        ]);
    }

    public function execute($user,$repo) {
        $this->logger->notice('executing bar command.');
        $this->logger->info('info message');
        $this->logger->debug('info message');
        $this->logger->write('just write');
        $this->logger->writeln('just drop a line');
        $this->logger->newline();

        return "Return result as an API"; // This can be integrated in your web application
    }
}

Automatic Zsh Completion Generator

Imgur

Zsh Completion With Lazy Completion Values:

Imgur

Bash Completion

Imgur

Documentation

See documentation on our wiki https://github.com/c9s/CLIFramework/wiki

Command Forms

CLIFramework supports many command-line forms, for example:

$ app [app-opts] [subcommand1] [subcommand1-opts] [subcommand2] [subcommand2-opts] .... [arguments] 

If the subcommand is not defined, you can still use the simple form:

$ app [app-opts] [arguments]

For example,

$ app db schema --clean dbname
$ app gen controller --opt1 --opt2 ControllerName 

Subcommand Hierarchy

Commands have methods for stages, like prepare, execute, finish, for a command like below:

$ app foo_cmd bar_cmd arg1 arg2 arg3

The call graph is like:

app->run
- app->prepare
  - foo_cmd->prepare
    - bar_cmd->prepare
    - bar_cmd->execute
    - bar_cmd->finish
  - foo_cmd->finish
- app->finish

Basic Requirement

  • PHP 5.3

Installation

From composer

{
    "require": {
        "corneltek/cliframework": "*"
    }
}

Zsh Completion Generator

example/demo zsh demo > _demo
source _demo
demo <TAB>

Imgur

Imgur

Imgur

Imgur

Console Prompt (Readline)

simple prompt:

$input = $this->ask("Your name please");
$ php demo.php
Your name please: 

prompt and except valid values:

$input = $this->ask("Your name please", array('John', 'Pedro'));

Version Info

CLIFrameword has a built-in --version option, to setup the version info, you can simply override a const in your application class to setup version string:

class ConsoleApp extends CLIFramework\Application
{
    const NAME = 'YourApp';
    const VERSION = '1.2.1';
}

This shows:

$ yourapp.php --version
YourApp - version 1.2.1

Example

Please check example/demo.php

$ php example/demo.php

ArgumentEditor

use CLIFramework\ArgumentEditor\ArgumentEditor;

$editor = new ArgumentEditor(array('./configure','--enable-debug'));
$editor->append('--enable-zip');
$editor->append('--with-sqlite','--with-postgres');

echo $editor;
# ./configure --enable-debug --enable-zip --with-sqlite --with-postgres

Message style formatter

$formatter = new CLIFramework\Formatter;
$formatter->format( 'message' , 'green' );

Built-in styles:

'red'          => array('fg' => 'red'),
'green'        => array('fg' => 'green'),
'white'        => array('fg' => 'white'),
'yellow'       => array('fg' => 'yellow'),
'strong_red'   => array('fg' => 'red', 'bold'  => 1),
'strong_green' => array('fg' => 'green','bold' => 1),
'strong_white' => array('fg' => 'white','bold' => 1),

Building Phar Archive file

COMPOSER=tests/fixture/composer.json.phar-test composer install
php example/demo archive --working-dir /Users/c9s/work/php/CLIFramework \
        --composer tests/fixture/composer.json.phar-test \
        app.phar

Chooser Component

$chooser = new CLIFramework\Chooser;
$value = $chooser->choose( "System Options" , array( 
    'use php-5.4.0' => '5.4.0',
    'use php-5.4.1' => '5.4.1',
    'use system' => '5.3.0',
));

Debug Utilities

LineIndicator

use CLIFramework\Debug\LineIndicator;
$indicator = new LineIndicator;
echo PHP_EOL, $indicator->indicateFile(__FILE__, __LINE__);

ConsoleDebug class

use CLIFramework\Debug\ConsoleDebug;

ConsoleDebug::dumpRows($pdo->fetchAll());

ConsoleDebug::dumpException($e);

Todos in the next release

  • provide a easy way to define chained commands
  • inheritable options for subcommands.
  • human readable exception renderer.
  • interact utilities

Hacking

Setup

  1. Download & install Onion from https://github.com/phpbrew/Onion

  2. Use Onion to bundle the dependencies:

    $ onion bundle

  3. Run tests, it should pass.

  4. Hack hack hack.

  5. Run tests.

  6. Send a pull request.

How command class register works

  • CLIApplication is inherited from CommandBase.
  • Command is also inherited from CommandBase.
  • To register a subcommand, we use the addCommand method to register commands or subcommands.
    • The command class is optional, if command class name is omitted, then the addCommand method will try to guess the real command class, and try to load the command class.

Bitdeli Badge

Comments
  • Command/subcommand autoloading

    Command/subcommand autoloading

    Hi, c9s:

    This is a great framework, first of all, thanks for building this. I heard this from you on PHPConf 14' (I'm also the who have asked you question :) )

    I'm currently using it to integrate my original back-end administration tool. The tool combines many commands, each corresponding to some part of our back-end service component.

    The key is the number of our back-end services will keep growing, so it is expected that CLI administration tool will constantly adding new commands as well, however the current mechanic in CIFramework to add new command is to strictly 'register/add' it in init() function of parent command.

    It violates the Open/Closed principle: we've expected that we'll keep adding new commands, however every time we add a new command, we need to "MODIFY" the existing file (the ApplicationClass). So I'm considering building an autoloading mechanism based on your original Command structure and PSR class autoloading.

    So

    app cmd sub-cmd1 sub-cmd2 sub-cmd3 arg1 arg2
    

    It will automatically looking into

    Application\Command\SubCmd1\SubCmd2\SubCmd3Command.php
    

    The detail of my planning implementation:

    • A new method in CommandLoader probably named autoloadCommandsFromFileSystem
    • In the Application/Command/Subcommand which expects continuous new sub-commands would be added. Invoke the autoload instead of manually registering commands
    public function init()
    {
        $this->loader->autoloadCommandsFromFileSystem();
    }
    
    • Probably a dispatch in CommandBase (Not really necessary, though)
    public function init()
    {
        $this->autoloadCommands();
    }
    

    Well, Since this fits my needs, so I'm gonna do it in my project anyway, but I'd like to know if you think it is an appropriate feature for the master branch of CLIFramework. Any suggestions/corrections would be fine as well.

    RFC 
    opened by dh3014 16
  • Add a new feature of built-in daemon command.

    Add a new feature of built-in daemon command.

    Ref: https://github.com/c9s/CLIFramework/issues/33

    I've implemented a built-in daemon command. The new Extension and hook system are described at the above issue.

    How to try

    Check my branch out and execute the following shell commands:

    $ php example/demo --log-path=/tmp/server.log server --pid-file=/tmp/sample.pid 127.0.0.1 12345
    $ echo 'Hello, world!' | netcat 127.0.0.1 12345
    $ tail /tmp/server.log
    

    php example/demo server launches an echo server, so that's ok if you can see 'Hello, world!' in the log file.

    execution steps for ServerCommand and DaemonExtension

    1. ServerCommand::init()
    2. ServerCommand::enableExtension(new DaemonExtension())
    3. ServerCommand::_init()
    4. ServerCommand::initExtensions()
    5. DaemonExtension::bind($command)
    6. ServerCommand::executeWrappers()
    7. ServerCommand::callHook('execute.before')
    8. DaemonExtension::callHook('run.before')
    9. DaemonExtension::run()
    10. DaemonExtension::daemonize()
    11. DaemonExtension::callHook('run.after')
    12. ServerCommand::execute()
    13. ServerCommand::callHook('execute.after')

    ChangeLogs

    • add CLIFramework\Hook namespace and support hook system.
    • CommandBase and ExtensionBase implement Hookable interface.
    • support global --log-path option and daemon command outputs logs to the path if --log-path is given.
    • call Logger::setVerbose and Logger::setDebug on preparing Application if verbose and debug are set in cliframework.ini
    • add Command::hasApplication in order to confirm whether we can get application or not.
    opened by shinnya 10
  • Command autoloading feature

    Command autoloading feature

    This PR actually mix with 3 stuffs.

    • Command autoloading feature
    • A bug fix when throwing an ExecuteMethodNotDefinedException
    • make ProgramName of an Application be its sufficient part of $argv[0] only

    I can re-organize it if you want.

    opened by dh3014 9
  • Where's arguments' help?

    Where's arguments' help?

    I found no documentation on usage of arguments, only on options. I would like to run a command like this: app run --dir /dev now Being:

    • app: my entry script
    • run: the command, equivalent to \MyApp\Command\RunCommand
    • --dir /dev: an option, as defined in options()
    • now: the said argument, as in execute(*$when*)

    If the command is run without the argument it fails with a generic red message + horrible exception:

    Command requires at least 1 arguments [sic].
    Command prototype:
        0 => $project
    

    I think it should:

    1. show the script/command help whenever something wrong is given;
    2. Catch its own exceptions and show something nice instead (related to first point);
    3. show the arguments' description on help;
    opened by igorsantos07 9
  • Corrector: suggests using similar_text instead of levenshtein

    Corrector: suggests using similar_text instead of levenshtein

    I think current Corrector::guess() is disappointing. I add the first command 'scheduled-job' in my app. Since I'm still using bash (no completion), I'm trying with Corrector feature. Here's what happened:

    mb sch
    Did you mean 'zsh'? [Y/n] 
    [ec2-user ~]$ mb sche
    Did you mean 'zsh'? [Y/n] n
    [ec2-user ~]$ mb sched
    Did you mean 'zsh'? [Y/n]
    [ec2-user ~]$ mb schedu
    Did you mean 'help'? [Y/n]
    [ec2-user ~]$ mb schedule
    Did you mean 'help'? [Y/n]
    [ec2-user ~]$ mb scheduled
    Did you mean 'scheduled-job'? [Y/n]
    
    

    After looking into source in Corrector, it uses levenshtein() to make the best guess. I think this algo computes edit distance between two strings. However I don't think edit-distance is fit into suggesting feature, in fact I guess even LCS or LIS would be better in suggestion.

    To make it simple, I think another php built-in function similar_text[http://php.net/manual/en/function.similar-text.php] is much better in this case. It has the same time complexity with levenshtein (but slower a bit, yes).

    I did a little experiment:

    [ec2-user ~]$ mb sche
    Did you mean 'zsh'? [Y/n] 
    [ec2-user ~]$ mb sched
    Did you mean 'scheduled-job'? [Y/n] 
    
    

    What would you think about changing the suggestion algorithm?

    Feature 
    opened by dh3014 8
  • Update symfony/finder to 5.x.x

    Update symfony/finder to 5.x.x

    Laravel Lumen requires symfony/finder 5.x.x and I'd like to use this framework without having to hack my way around in composer. I have no clue what this update entails for CLIFramework, but it would be awesome if this could be attempted.

    opened by Bertie2011 7
  • Allow raw output even if terminal emulator support colors

    Allow raw output even if terminal emulator support colors

    Hello, again :)

    This PR is useful for command output spec testing and maybe for when color support detection goes wrong (exotic contexts).

    Without this feature, a tester would have to assert cli output buffer as binary string and sometimes it does not work as expected, specially with anchored regex based assertions.

    opened by marcioAlmada 7
  • Duplicated short opt in ArchiveCommand.php

    Duplicated short opt in ArchiveCommand.php

    'composer' and 'compress?' option both have the short opt -c. This leads to following error if you run cli.php:

    >php71 cli help
    Option conflict: -c is already defined.
    

    Snipplett of the error in Question.

            $opts->add('c|composer:', 'The composer.json file. If --working-dir is ignored, dirname of the composer.json will be used.')
                ->isa('file')
                ->defaultValue('composer.json')
                ;
    
            $opts->add('c|compress?', 'compress type: gz, bz2')
                ->defaultValue('gz')
                ->validValues(array('gz', 'bz2'))
                ;
    
    opened by mbattista 5
  • Do not display the

    Do not display the "from" section for the first exception trace entry

    According to http://php.net/manual/en/exception.gettrace.php#107563, the first entry doesn't contain the file/line keys since they are recorded in the exception object itself.

    Additionally, some changes to the output formatting have been made:

    1. The trace entries are counted in a human-friendly way starting with "1" (like Xdebug does for example).
    2. The file name and line number in the "from" section are delimited by a colon without the space. This format is better IDE/editor friendly and helps easier navigation (e.g. Ctrl+N in PhpStorm, copy-paste the file:line combination).

    With this patch applied, the output looks like the following:

    ↪ phpbrew --debug install 7.1.99
    Exception: Version 7.1.99 not found.
    Thrown from /home/morozov/Projects/phpbrew/src/PhpBrew/Command/InstallCommand.php at line 217:
    
      214            $version = preg_replace('/^php-/', '', $version);
      215            $versionInfo = $releaseList->getVersion($version);
      216            if (!$versionInfo) {
    > 217                throw new \Exception("Version $version not found.");
      218            }
      219            $version = $versionInfo['version'];
      220
      221            $distUrlPolicy = new DistributionUrlPolicy();
    
    Trace:
    
        1) PhpBrew\Command\InstallCommand->execute('7.1.99')
    
        2) call_user_func_array([PhpBrew\Command\InstallCommand, 'execute'], ['7.1.99'])
            from /home/morozov/Projects/phpbrew/vendor/corneltek/cliframework/src/CommandBase.php:846
    
        3) CLIFramework\CommandBase->executeWrapper(['7.1.99'])
            from /home/morozov/Projects/phpbrew/vendor/corneltek/cliframework/src/Application.php:398
    
        4) CLIFramework\Application->run(['bin/phpbrew', '--debug', 'install', '7.1.99'])
            from /home/morozov/Projects/phpbrew/src/PhpBrew/Console.php:114
    
        5) PhpBrew\Console->runWithTry(['bin/phpbrew', '--debug', 'install', '7.1.99'])
            from /home/morozov/Projects/phpbrew/bin/phpbrew:23
    

    Fixes #108.

    opened by morozov 4
  • Fixed problem with invalid implementation of OnionPrinterInterface

    Fixed problem with invalid implementation of OnionPrinterInterface

    I don't know, maybe after upgrade GetOptionKit package, implements value in OptionPrinter.php was invalid. It should refer to OptionPrinter, instead of OptionPrinterInterface. I fixed it and now CLIFramework works fine.

    opened by pklebba 4
  • Better commnand line parser

    Better commnand line parser

    Hi,

    I am developing a project with this nice tool but when I run some tests I found an annoying issue. When I execute the following code:

    public function test()
    {
        // ...
        $this->runCommand("program arg1 \"arg2.1 arg2.2\" arg3");
        // ...
    }
    

    The arguments passed to program are

    array() = 
    {
        [0] = "program",
        [1] = "arg1",
        [2] = "\"arg2.1",
        [3] = "arg2.2\"",
        [4] = "arg3"
    }
    

    And I expect something like that:

    array() = 
    {
        [0] = "program",
        [1] = "arg1",
        [2] = "arg2.1 arg2.2",
        [3] = "arg3"
    }
    

    It is a bit annoying and I have created a better parser. How can I post my contribution in this project?

    Thanks, Petru Rares.

    opened by psincraian 4
  • Tagged Version 4 Requires Dev Dependency

    Tagged Version 4 Requires Dev Dependency

    I'm just getting started with trying to use the tool, and if I perform:

    composer require "corneltek/cliframework"
    

    Then I get the following error message:

    ksnip_tmp_DfDNKz

    Text below just in case helps with SEO etc.

    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - corneltek/cliframework[4.1.0, ..., 4.1.2] require universal/universal 2.0.x-dev -> found universal/universal[dev-master, 2.0.x-dev (alias of dev-master)] but it does not match your minimum-stability.
        - Root composer.json requires corneltek/cliframework ^4.1 -> satisfiable by corneltek/cliframework[4.1.0, 4.1.1, 4.1.2].
    
    You can also try re-running composer require with an explicit version constraint, e.g. "composer require corneltek/cliframework:*" to figure out if any version is installable, or "composer require corneltek/cliframework:^2.1" if you know which you need.
    
    Installation failed, reverting ./composer.json to its original content.
    

    I tried all of the 4.x versions, and all of them had the same issue where they are wanting to use the dev line of the Khttps://packagist.org/packages/universal/universal package. In the end I manually specified to use version 3 of the package to get this to work:

    composer require "corneltek/cliframework:3"
    

    It appears that you (c9s) are the maintainer of both. Can you not specify a tagged, stable versoin of the universal/universal package for the CLIFramework package to use? Don't forget that you can do something like 3.1.* on your dependency, so that the CLI framework can use the latest version that doesn't break signatures (if using some sort of semantic versioning).

    opened by programster 0
  • Command suffix on commands

    Command suffix on commands

    I find the requirement of Commands auto-loaded from the Command folder to have the Command suffix to be a bit bothersome at times. Would you be opposed to a patch to remove that? The classes are already name-spaced away preventing conflict. When looking at a directory listing, it can be tedious to mentally strip away the Command from everything to easily see all the class names.

    I will likely be writing my own enableCommandAutoload implementation to circumvent this, but if you are open to it being incorporated upstream I could send a pull request.

    opened by detain 1
  • Logging error with '%' : Warning fprintf too few arguments

    Logging error with '%' : Warning fprintf too few arguments

    Hello,

    We get from time to time the warning

    Warning: fprintf(): Too few arguments in /path/to/project/vendor/corneltek/cliframework/src/Logger.php on line 183
    

    Because the message getting logged contains %, in our case, an URL encoded provided by the service we're calling.

    A quick fix is to escape % :

    fprintf(STDERR, str_replace('%', '%%', $this->formatter->format($msg , $style)) . PHP_EOL);
    

    https://github.com/c9s/CLIFramework/blob/5d7c4703390e80326938cbdef7de499bca2a0143/src/Logger.php#L188

    I'm not sure where to point a fix, if the formatter should be involved or not, although I'm convinced the fprintf without additional arguments should escape %.

    Thank you for your help.

    opened by sherbrow 1
  • ArgInfo::validate() crippled validator call

    ArgInfo::validate() crippled validator call

    Using CLIFramework 3: in ArgInfo::validate():

    return call_user_func($this->validator);
    

    Unless I am missing something, there is no way for the validator to get the value to validate so validator is kindof pointless. Prolly should be

    return call_user_func($this->validator,$value);
    
    opened by exteon 0
  • smart Corrector::match

    smart Corrector::match

    The current implementation of Corrector::match currently used in HelpCommand::execute is quite naive since it is only based on php's native similar_text.

    Consider making it smarter.

    The idea occurred after

    $ phpbrew uninstall php-7.0.15
    Did you mean 'install'? [Y/n]
    

    Where one presses Yes (or at least I did) without second thought.

    I would expect Corrector::match to say "Did you mean 'remove'? [Y/n]".

    If this is a direction you would like to go towards, I would be happy to provide a first implementation.

    opened by dbaltas 1
Releases(4.2.0)
  • 4.2.0(Dec 15, 2022)

    Some important commits are as follows:

    • dd19c4d927f8730badd6dd4f3a69cf7eb564b1bd

    Thanks for the following contributors 🎉!

    @c9s and @peter279k.

    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Dec 15, 2022)

    Some important commits are as follows:

    • The 3.x version is referenced by the 3.0 branch.
    • It's the 8.1 compatibility patch for the PHPBrew dependency.
    • ec530d476c819d4314320b300a6a88b8677a540e

    Thanks for the following contributors 🎉:

    @c9s and @peter279k.

    Source code(tar.gz)
    Source code(zip)
  • 4.1.2(May 27, 2022)

    What's Changed

    • Fix PHP 8.1 deprecations by @davidcole1340 in https://github.com/c9s/CLIFramework/pull/121
    • return default value by @dmnlk in https://github.com/c9s/CLIFramework/pull/122
    • Escape Logger::error message printing by @sherbrow in https://github.com/c9s/CLIFramework/pull/114

    New Contributors

    • @davidcole1340 made their first contribution in https://github.com/c9s/CLIFramework/pull/121
    • @dmnlk made their first contribution in https://github.com/c9s/CLIFramework/pull/122
    • @sherbrow made their first contribution in https://github.com/c9s/CLIFramework/pull/114

    Full Changelog: https://github.com/c9s/CLIFramework/compare/4.1.1...4.1.2

    Source code(tar.gz)
    Source code(zip)
  • 2.2.0(Dec 31, 2014)

  • 2.1.0(Dec 26, 2014)

    • Introducing new command corrector, implemented by @dh3014
    • Added command autoloader, @dh3014++
    • Added $commandAutoloadEnabled property to Application class.
    • Bug fix in Application.php: incorrect guessCommand, thanks @dh3014++
    Source code(tar.gz)
    Source code(zip)
Owner
Yo-An Lin
a developer who really loves crafting tools
Yo-An Lin
Console - The Console component eases the creation of beautiful and testable command line interfaces.

Console Component The Console component eases the creation of beautiful and testable command line interfaces. Sponsor The Console component for Symfon

Symfony 9.4k Jan 7, 2023
PHP Interminal is a command-line tool that gives you access to PHP Internals discussions in your terminal.

PHP Interminal is a command-line tool that gives you access to PHP Internals discussions in your terminal. ??

Nuno Maduro 32 Dec 26, 2022
👨🏻‍🚀 A command-line tool that gives you the Alpine Day 2021 schedule in your timezone. 🚀

Alpine Day Schedule a command-line tool that gives you the Alpine Day 2021 schedule in your timezone. ?? Quick start Requires PHP 7.4+ # First, instal

Nuno Maduro 11 Jun 10, 2021
Laracon Schedule a command-line tool that gives you the Laracon Online schedule in your timezone.

Laracon Schedule a command-line tool that gives you the Laracon Online schedule in your timezone. ?? Quick start Requires PHP 7.4+ # First, install: c

Nuno Maduro 101 Sep 16, 2022
Patrol is an elegant command-line tool that keeps your PHP Project's dependencies in check.

Patrol is an elegant command-line tool that keeps your PHP Project's dependencies in check. Installation / Usage Requires PHP 8.0+ First, install Patr

Nuno Maduro 237 Nov 14, 2022
Skeleton for creating a new Command Line Interface application with a minimum of dependencies.

Skeleton for creating a new Command Line Interface application with a minimum of dependencies.

Richard van Laak 1 Jan 17, 2022
A CLI tool to check whether a specific composer package uses imported symbols that aren't part of its direct composer dependencies

A CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package. This will prevent you from using "soft" dependencies that are not defined within your composer.json require section.

Matthias Glaub 722 Dec 30, 2022
🖥 Build beautiful PHP CLI menus. Simple yet Powerful. Expressive DSL.

Contents Minimum Requirements Installation Upgrading Usage Quick Setup Examples API Appearance Menu Title Colour Width Padding Margin Borders Exit But

PHP School 1.9k Dec 28, 2022
Lovely PHP wrapper for using the command-line

ShellWrap What is it? It's a beautiful way to use powerful Linux/Unix tools in PHP. Easily and logically pipe commands together, capture errors as PHP

James Hall 745 Dec 30, 2022
A PHP library for command-line argument processing

GetOpt.PHP GetOpt.PHP is a library for command-line argument processing. It supports PHP version 5.4 and above. Releases For an overview of the releas

null 324 Dec 8, 2022
Twitter raffles in the command line, with PHP and minicli

Rafflebird Rafflebird is a highly experimental CLI application for giveaways / raffles on Twitter, built in PHP with Minicli. Disclaimer: The recent s

Erika Heidi 33 Nov 16, 2022
A PHP command line tool used to install shlink

Shlink installer A PHP command line tool used to install shlink. Installation Install this tool using composer.

null 8 Nov 3, 2022
Command-line control panel for Nginx Server to manage WordPress sites running on Nginx, PHP, MySQL, and Let's Encrypt

EasyEngine v4 EasyEngine makes it greatly easy to manage nginx, a fast web-server software that consumes little memory when handling increasing volume

EasyEngine 2k Jan 4, 2023
Generic PHP command line flags parse library

PHP Flag Generic PHP command line flags parse library Features Generic CLI options and arguments parser. Support set value data type(int,string,bool,a

PHP Toolkit 23 Nov 13, 2022
A simple command-line tool whose aim is to facilitate the continous delivery of PHP apps

Deployer Simple command-line tool that aims to facilitate the continous delivery of PHP apps, particularly Laravel apps. Imagine you want to update yo

Fernando Bevilacqua 4 Sep 8, 2021
🍃 In short, it's like Tailwind CSS, but for the PHP command-line applications.

Termwind Termwind allows you to build unique and beautiful PHP command-line applications, using the Tailwind CSS API. In short, it's like Tailwind CSS

Nuno Maduro 1.8k Dec 30, 2022
A PHP Command Line tool that makes it easy to compile, concat, and minify front-end Javascript and CSS/SCSS dependencies.

Front End Compiler A PHP Command Line tool that makes it easy to compile, concat, and minify front-end Javascript and CSS/SCSS dependencies. The minif

Happy Medium 2 Nov 12, 2021
php command line script to DCA crypto from Coinbase Pro

dca.php A simple php script designed to be run via the command line via a cron job. This will connect to coinbase pro and buy the crypto coins specifi

Ben Suffolk 2 Oct 22, 2021
A PHP library for command-line argument processing

GetOpt.PHP GetOpt.PHP is a library for command-line argument processing. It supports PHP version 7.1 and above. Releases For an overview of the releas

null 324 Dec 8, 2022