tisantan/php-clitools

There is no license information available for the latest version (dev-main) of this package.

Cli tool that helps you debug better a console

dev-main 2021-05-06 16:36 UTC

This package is auto-updated.

Last update: 2025-05-29 01:38:04 UTC


README

  • Get user input
  • Debug code
  • Progress bars
  • Multicolor text and backgrounds
  • Block divisor
  • And more...

Requirements

  • PHP > 5.6.*;
Running
<?php

//Create cli CPU process name
$cli = new CliTools('My Process Name');

//Welcome user
$cli->clear()->drawLogo()->jumpLine(1)->writeLine('Welcome!')->jumpLine(2);

//Get user input
$user_input = $cli->getUserInput('What is your name?',$cli::FOREGROUND_WHITE,$cli::BACKGROUND_GREEN);

//Use requested variable on your code
$cli->jumpLine()->writeLine("Hello $user_input")->jumpLine(1);