Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. PHP
  3. Aura.Cli

Aura.Cli

BSD-2-ClausePHP2.2.0

A PHP library providing request/response objects for CLI applications with Getopt support and help system.

GitHubGitHub
102 stars20 forks0 contributors

What is Aura.Cli?

Aura.Cli is a PHP library that provides request and response objects for command-line interface (CLI) applications. It simplifies CLI development by offering tools for parsing command-line arguments, managing standard I/O streams, and generating help documentation, similar to web frameworks but for terminal-based scripts.

Target Audience

PHP developers building command-line tools, scripts, or console applications who need structured argument parsing, formatted output, and help system generation.

Value Proposition

Developers choose Aura.Cli for its clean separation of concerns, flexible Getopt support, and POSIX terminal formatting, enabling maintainable CLI code without imposing a rigid framework or base class.

Overview

Command-Line Interface tools

Use Cases

Best For

  • Building PHP command-line tools with complex option parsing
  • Creating CLI applications that require formatted output (colors, styles)
  • Developing scripts with detailed help documentation and usage instructions
  • Parsing command-line arguments with support for short/long flags and positional arguments
  • Managing standard input/output/error streams in PHP CLI programs
  • Implementing Unix-like exit codes for CLI error handling

Not Ideal For

  • Projects needing a full CLI framework with built-in command routing and automatic dependency injection
  • Developers looking for interactive CLI tools with prompts, menus, or wizard-like interfaces
  • Teams already using Symfony Console or Laravel Artisan who prefer ecosystem integration and community plugins

Pros & Cons

Pros

Flexible Option Parsing

Supports complex definitions for short/long flags, aliases, multi-pass options, and optional/required parameters, as shown in the Getopt examples with arrays like 'foo,f:' and 'g*::'.

Separation of Concerns

Provides independent, composable components like Context, Stdio, and Help without enforcing a command structure, aligning with the library's philosophy for customizable CLI development.

POSIX Terminal Formatting

Includes formatter markup for colors, bold, underline, etc., in Stdio output, with a detailed cheat sheet for rich text in compatible terminals.

No Userland Dependencies

Requires only PHP 7.2+ with no external libraries, making it lightweight and easy to install via Composer or direct download.

Cons

No Command Abstraction

Lacks base command classes or routing mechanisms, forcing developers to write boilerplate code for each command, as evidenced by the manual script example in 'Writing Commands'.

Manual Error Handling

Getopt errors are collected but not automatically thrown, requiring explicit checks with hasErrors() and getErrors(), which can lead to verbose and error-prone code.

POSIX-Only Formatting Limitations

Formatter markup is designed for POSIX terminals and may not work on Windows or other platforms without additional configuration or fallbacks.

Frequently Asked Questions

Quick Stats

Stars102
Forks20
Contributors0
Open Issues1
Last commit2 years ago
CreatedSince 2011

Tags

#aura#help-system#php-library#argument-parsing#console#console-application#cli#php#command-line#getopt#cli-tools#standalone-php-library

Built With

P
PHP

Included in

PHP32.5k
Auto-fetched 9 hours ago

Related Projects

PsySHPsySH

A REPL for PHP

Stars9,831
Forks319
Last commit13 hours ago
Cron ExpressionCron Expression

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

Stars4,859
Forks340
Last commit2 years ago
CLI MenuCLI Menu

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

Stars1,942
Forks104
Last commit1 year ago
CLImateCLImate

PHP's best friend for the terminal.

Stars1,896
Forks126
Last commit12 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub