https://github.com/utopia-php/console
Lightweight & fast PHP console framework.
https://github.com/utopia-php/console
Last synced: 21 days ago
JSON representation
Lightweight & fast PHP console framework.
- Host: GitHub
- URL: https://github.com/utopia-php/console
- Owner: utopia-php
- License: mit
- Created: 2025-10-20T14:23:39.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-10-20T15:11:06.000Z (5 months ago)
- Last Synced: 2025-12-14T17:52:31.722Z (4 months ago)
- Language: PHP
- Size: 132 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Utopia Console
Small collection of helpers for working with PHP command line applications. The Console class focuses on everyday needs such as logging, prompting users for input, executing external commands, and building long-running daemons.
## Installation
Install using Composer:
```bash
composer require utopia-php/console
```
## Usage
```php
&1 echo "success"', $input, $output, 3);
echo $exitCode; // 0
echo $output; // "success\n"
```
### Create a Daemon
Use `Console::loop()` to build daemons without tight loops. The helper sleeps between iterations and periodically triggers garbage collection.
```php