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

Overview

Symfony CLI Minimum Skeleton

Thi CLI project skeleton tempts to require the least amount of code needed to write a command line interface project based on Symfony Console.

The folder structure follow a simple Domain Driven Design application structure by suggesting splitting Application, Domain, UserInterface, and Infrastructure responsibilities.

The minimum of features that is needed for developing CLI applications is included:

  • Auto-wiring on all classes in /src
  • Autoconfigure Command implementations directly to the CLI console application
  • PHPUnit

How to run tests?

Running PHPUnit test suites is possible by running composer run tests. The /tests folder gets auto-registered by composer, and follows the DDD application structure, but no actual tests are provided with the skeleton.

How to register a command to the CLI console?

Registering a command to the CLI application is the only autoconfiguration available in this skeleton, as can be found in config/services.php.

  • Create a class (preferably in /src/UserInterface/Cli) and let it extend Symfony\Component\Console\Command\Command
  • Run bin/console, the command created became available

Environment requirements

  • PHP >=8.0.2 with ext-mbstring extension enabled
  • Composer
You might also like...
👨🏻‍🚀 A command-line tool that gives you the Alpine Day 2021 schedule in your timezone. 🚀
👨🏻‍🚀 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

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.

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

Twitter raffles in the command line, with PHP and minicli
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

A command line code generator for Drupal.

Drupal Code Generator A command line code generator for Drupal. Installation Download the latest stable release of the code generator.

A PHP command line tool used to install shlink
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.

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.

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

Command-line control panel for Nginx Server to manage WordPress sites running on Nginx, PHP, MySQL, and Let's Encrypt
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

Generic PHP command line flags parse library
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

A simple command-line tool whose aim is to facilitate the continous delivery of PHP apps
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

Releases(v1.0.0)
Owner
Richard van Laak
Richard van Laak
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
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
BetterWPCLI - a small, zero-dependencies, PHP library that helps you build enterprise WordPress command-line applications.

BetterWPCLI - a small, zero-dependencies, PHP library that helps you build enterprise WordPress command-line applications.

Snicco 5 Oct 7, 2022
This bundle provides new generator command line tools for doctrine generator.

GenBundle This bundle provides new generator command line tools for doctrine generator, extending SensioGeneratorBundle. php bin/console gen:generate:

Koldo Picaza 5 Sep 6, 2016
Command-Line Interface tools

Aura.Cli Provides the equivalent of request ( Context ) and response ( Stdio ) objects for the command line interface, including Getopt support, and a

Aura for PHP 102 Dec 31, 2022
Provides the equivalent of request ( Context ) and response ( Stdio ) objects for the command line interface

Provides the equivalent of request ( Context ) and response ( Stdio ) objects for the command line interface, including Getopt support, and an independent Help object for describing commands.

Aura for PHP 103 Sep 28, 2022
The Platform.sh CLI is the official command-line interface for Platform.sh

The Platform.sh CLI is the official command-line interface for Platform.sh. Use this tool to interact with your Platform.sh projects, and to build them locally for development purposes.

Platform.sh 222 Dec 29, 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
Another Command Line Argument Parser

Optparse — Another Command Line Argument Parser Install 1. Get composer. 2. Put this into your local composer.json: { "require": { "chh/optparse

Christoph Hochstrasser 18 Nov 1, 2019