PHP Command-line

Open-source PHP projects categorized as Command-line

Top 22 PHP Command-line Projects

  • GitHub repo PsySH

    A REPL for PHP

    Project mention: Why PHP is a fantastic language to program in | reddit.com/r/PHP | 2021-04-06

    Have you tried PsySH?

  • GitHub repo Cron Expression

    CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due

  • GitHub repo Laravel-Zero

    A PHP framework for console artisans

  • GitHub repo Boris

    A tiny REPL for PHP

  • GitHub repo CLI Menu

    🖥 Build beautiful PHP CLI menus. Simple yet Powerful. Expressive DSL.

    Project mention: Weekly "ask anything" thread | reddit.com/r/PHP | 2021-03-30

    Looking for a cross-platform (Linux, Windows, macOS) library to build interactive CLI menus. Basically something like https://github.com/php-school/cli-menu, but with Windows support (can't depend on ext-posix). Any recommendations?

  • GitHub repo CLImate

    PHP's best friend for the terminal.

  • GitHub repo Commando

    An Elegant CLI Library for PHP

  • GitHub repo ShellWrap

    Lovely PHP wrapper for using the command-line

  • GitHub repo Cilex

    Cilex a lightweight framework for creating PHP CLI scripts inspired by Silex

  • GitHub repo Shunt

    [ABANDONED] PHP library for executing commands on multiple remote machines, via SSH

  • GitHub repo php-scoper

    🔨 Prefixes all PHP namespaces in a file/directory to isolate the code bundled in PHARs.

    Project mention: 🍾 GraphQL API for WordPress is now scoped, thanks to PHP-Scoper! | dev.to | 2021-03-31

    return [ 'patchers' => [ function ( $file_path, $prefix, $contents ) { /* * There is currently no easy way to simply whitelist all global WordPress functions. * * This list here is a manual attempt after scanning through the AMP plugin, which means * it needs to be maintained and kept in sync with any changes to the dependency. * * As long as there's no built-in solution in PHP-Scoper for this, an alternative could be * to generate a list based on php-stubs/wordpress-stubs. devowlio/wp-react-starter/ seems * to be doing just this successfully. * * @see https://github.com/humbug/php-scoper/issues/303 * @see https://github.com/php-stubs/wordpress-stubs * @see https://github.com/devowlio/wp-react-starter/ */ $contents = str_replace( "\\$prefix\\_doing_it_wrong", '\\_doing_it_wrong', $contents ); $contents = str_replace( "\\$prefix\\__", '\\__', $contents ); $contents = str_replace( "\\$prefix\\esc_html_e", '\\esc_html_e', $contents ); $contents = str_replace( "\\$prefix\\esc_html", '\\esc_html', $contents ); $contents = str_replace( "\\$prefix\\esc_attr", '\\esc_attr', $contents ); $contents = str_replace( "\\$prefix\\esc_url", '\\esc_url', $contents ); $contents = str_replace( "\\$prefix\\do_action", '\\do_action', $contents ); // ... } ] ]

  • GitHub repo CLIFramework

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

  • GitHub repo Hoa Console

    The Hoa\Console library.

  • GitHub repo PHP console

    🖥 PHP CLI application library, provide console argument parse, console controller/command run, color style, user interactive, format information show and more. 功能全面的PHP命令行应用库。提供控制台参数解析, 命令运行,颜色风格输出, 用户信息交互, 特殊格式信息显示 (by inhere)

  • GitHub repo GetOpt

    A PHP library for command-line argument processing

  • GitHub repo GetOptionKit

    An object-oriented option parser library for PHP, which supports type constraints, flag, multiple flag, multiple values, required value checking

  • GitHub repo Aura.Cli

    Command-Line Interface tools

  • GitHub repo Pecan

    ReactPHP Shell, based on the Symfony Console component.

  • GitHub repo librarian

    A minimalist file-based CMS created on top of minicli. I don't use a database, I don't have a control panel, or users. Everything is pulled from static content in my data dir and managed via console commands.

    Project mention: Librarian - a minimalist file-based, headless CMS in PHP | dev.to | 2021-01-08

    The great thing about this project is that it is very small, it uses only a small $5 instance and doesn't require databases or other components. You can quickly spin up a sample app using the Deploy to DO button below, but for a more serious usage you should fork the project on GitHub so you're able to customize the templates to your own liking.

  • GitHub repo OptParse

    Another Command Line Argument Parser

  • GitHub repo composer-recovery

    Helper for recovery composer dependency list (if you lost composer.json)

  • GitHub repo SitPHP/Commands

    A simple yet powerful library to run console commands from the CLI or build a command application.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-04-06.

Index

What are some of the best open-source Command-line projects in PHP? This list will help you:

Project Stars
1 PsySH 8,913
2 Cron Expression 4,839
3 Laravel-Zero 2,629
4 Boris 2,188
5 CLI Menu 1,734
6 CLImate 1,712
7 Commando 787
8 ShellWrap 739
9 Cilex 627
10 Shunt 440
11 php-scoper 416
12 CLIFramework 402
13 Hoa Console 355
14 PHP console 311
15 GetOpt 307
16 GetOptionKit 139
17 Aura.Cli 104
18 Pecan 43
19 librarian 18
20 OptParse 18
21 composer-recovery 3
22 SitPHP/Commands 1