Open-source PHP projects categorized as CLI

Top 23 PHP CLI Projects

  • PHP Code Sniffer

    PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

    Project mention: Top 6 PHP code quality tools 2023 | | 2023-05-30

    PHP_CodeSniffer is a widely-used tool for enforcing coding standards in PHP. It checks the code against a set of predefined coding standards (such as PSR-12, PSR-2, and many others) and provides reports with violations and recommendations for improvement. Documentation: You can find more information about PHP_CodeSniffer and its usage in the official documentation: PHP_CodeSniffer Repository

  • console

    Eases the creation of beautiful and testable command line interfaces

    Project mention: Creating an application in Yii3. | | 2023-01-05

    Symfony console component. The Console component eases the creation of beautiful and testable command line interfaces.

  • Cloudways

    Cloudways' Black Friday Offer - 1st Choice of Developers. Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations.

  • PsySH

    A REPL for PHP

    Project mention: Tinker in Lumen: Your Ultimate Debugging Companion | | 2023-11-06

    Tinker is a REPL built over psysh which is a general-purpose REPL for PHP. Since a Laravel application is not plain PHP and has states, databases, caches, events, and many more complex resources specific to the framework, it's not possible to interact with the application the way one would expect just using psysh.

  • phpinsights

    🔰 Instant PHP quality checks from your console

    Project mention: Recommended Code Review Plugin for Github? | /r/laravel | 2023-06-06
  • wp-cli

    ⚙️ WP-CLI framework

    Project mention: Mastering WordPress CLI: A Comprehensive Guide to Boost Your Productivity | | 2023-11-23

    As of my last knowledge update in January 2022, the list of WordPress CLI commands may have expanded or changed. It's always a good idea to check the official WP-CLI documentation for the most up-to-date information. Here's a list of common WP-CLI commands as of my last update:

  • collision

    💥 Collision is a beautiful error reporting tool for command-line applications

    Project mention: I created a PHPUnit 10 extension to prettify CLI output | /r/PHP | 2023-04-25

    I really like how Pest PHP formats and outputs test results, but I still prefer to use PHPUnit. Luckily there's Collision. This package is designed to give you beautiful error reporting when interacting with your app through the command line.

  • Laravel-Zero

    A PHP framework for console artisans

    Project mention: Library for Creating Command Line Based Applications in PHP | /r/PHP | 2023-03-19
  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at

  • drush

    Drush is a command-line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those who spend their working hours hacking away at the command prompt.

  • CLI Menu

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

  • mix

    ☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Server / PHP 命令行模式开发框架,支持 Swoole、Swow、WorkerMan、FPM、CLI-Server (by mix-php)

  • minicli

    A minimalist framework for command-line applications in PHP

    Project mention: Console Applications With Laravel Zero | /r/laravel | 2023-05-23

    I've used Laravel Zero for several cli tools and I love it. The only thing that bugs me a bit is the size of the executable you end up with. For my next project I've decided to try out minicli, which is similar, but much smaller since it doesn't have any dependencies at all.

  • Silly

    Silly CLI micro-framework based on Symfony Console

  • phpmnd

    PHP Magic Number Detector

    Project mention: PHP libraries and tools | | 2023-10-18

    PHP Magic Number Detector: a tool that aims to help you to detect magic numbers in your PHP code.

  • PHP-watcher

    Monitor for any changes in your php application and automatically restart it (suitable for async apps).

  • PHP console

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

  • GetOpt

    A PHP library for command-line argument processing

  • Construct

    A PHP project/micro-package generator for PDS compliant projects or micro-packages. (by jonathantorres)

  • castor

    🦫 DX oriented task runner and command launcher built with PHP. (by jolicode)

    Project mention: jolicode/castor | DX oriented task runner and command launcher built with PHP | /r/PHP | 2023-06-05
  • drupal-code-generator

    A code generator for Drupal.

    Project mention: SDC in Drupal core | | 2023-09-14

    Starting from drupal-code-generator version 3.2.0, a new generator has been added to easily create new components (this replaces the Component Libraries: Generator module that is not compatible with Drush 12). Just run this command and follow the instructions:

  • keep-a-changelog

    Tools for manipulating files in Keep A Changelog format, including tagging and releasing. (by phly)

  • haulable

    Create standalone PHP CLI applications with PHP Micro CLI

    Project mention: Haulable - Make PHP (e.g. Laravel Zero) apps truly portable by bundling PHP | /r/u_Little-Ad-4734 | 2023-03-28
  • Aura.Cli

    Command-Line Interface tools

  • php-tui


  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

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 2023-11-23.

PHP CLI related posts


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

Project Stars
1 PHP Code Sniffer 10,505
2 console 9,599
3 PsySH 9,590
4 phpinsights 5,104
5 wp-cli 4,756
6 collision 4,360
7 Laravel-Zero 3,444
8 drush 2,311
9 CLI Menu 1,920
10 mix 1,892
11 minicli 985
12 Silly 887
13 phpmnd 536
14 PHP-watcher 384
15 PHP console 342
16 GetOpt 330
17 Construct 267
18 castor 267
19 drupal-code-generator 251
20 keep-a-changelog 177
21 haulable 155
22 Aura.Cli 104
23 php-tui 82
Collect and Analyze Billions of Data Points in Real Time
Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.