PHPackages                             sitnikovik/clipher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. sitnikovik/clipher

ActiveLibrary[CLI &amp; Console](/categories/cli)

sitnikovik/clipher
==================

CLI tool to beatify your scripts with colors, bolds, loading bars and much more

v1.0.0(1y ago)05MITPHPPHP &gt;=7.1

Since Apr 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sitnikovik/clipher)[ Packagist](https://packagist.org/packages/sitnikovik/clipher)[ RSS](/packages/sitnikovik-clipher/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (0)

Console
=======

[](#console)

Beatifies your cli scripts with colors, bolds, loading bars and much more

- [Input](#input)
    - [confirm](#confirm)
    - [prompt](#prompt)
- [Output](#output)
    - [println](#println)
    - [separate](#separate)
    - [quit](#quit)
    - [panic](#panic)
    - [Colors](#colors)
    - [Progressbar](#progress-bar)

Get started
-----------

[](#get-started)

Just create an object of `Sitnikovik\Console\Console` and go on:

```
$console = new \Sitnikovik\Console\Console();
```

Input
-----

[](#input)

### confirm

[](#confirm)

```
\Sitnikovik\Console\Console::confirm(string $question, bool $yesOnDefault = false): void
```

Make user approve or decline some process with the `y/n`

### prompt

[](#prompt)

```
\Sitnikovik\Console\Console::prompt(string $question): string
```

Asks user input the answer needed to continue the program

Output
------

[](#output)

### println

[](#println)

```
\Sitnikovik\Console\Console::println(string $text): void
```

Prints the text console output with new line

### separate

[](#separate)

```
\Sitnikovik\Console\Console::separate(int $width = 0): void
```

Prints a separate bar with provided width or stretched if width is `0`

### quit

[](#quit)

```
\Sitnikovik\Console\Console::quit(string $message = '')
```

Exit the program with `0` code and prints message text if not empty

### panic

[](#panic)

```
\Sitnikovik\Console\Console::panic(string $message = '', int $code = 1)
```

Exit the program with provided code signalizing the program failed and prints message in red color if not empty

Colors
------

[](#colors)

If you want to switch color styles you have to provide `Sitnikovik\Console\Style\StyleInterface`classes for text and background layout to colorize the output.

```
// set colors
$console->setTextStyle(new Sitnikovik\Console\Style\Text\Bold());
$console->setBackgroundStyle(new Sitnikovik\Console\Style\Background());

// or via constructor
$console = new Console(new Sitnikovik\Console\Style\Text\Regular(), new Sitnikovik\Console\Style\Background());
```

### Customize style colors

[](#customize-style-colors)

Eitherway, you can create custom classes extended by `Sitnikovik\Console\Style\AbstractStyle`or others implemented `Sitnikovik\Console\Style\StyleInterface` and modify colors you prefer.

### Colorize text

[](#colorize-text)

There are at least **8 methods** to colorize text implemented by `Sitnikovik\Console\Style\AbstractStyle`and `Sitnikovik\Console\Style\StyleInterface`. Class calls the interface methods:

- black()
- red()
- green()
- yellow()
- blue()
- purple()
- cyan()
- white()

```
$text = $console->red('some text'); // colorize text
// or
$text = $console->bgRed('some text'); // set background to text
```

They return provided text colorized to called color.

Progress bar
------------

[](#progress-bar)

If you need to visualize some process progress you can use `Sitnikovik\Console\Progressbar\Progressbar`

```
// Create the bar like that
$maxValue = 100;
$progressbar = $console::createProgressbar($maxValue);
// or
$progressbar = Sitnikovik\Console\Progressbar\Progressbar($maxValue);

// Advancing
for ($current = 0; $current < $maxValue; $current++) {
    $progressbar->advance(); // increment with 1 point of the max value
}

// Or advance it manually
$progressbar->advance(40); // or another value
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

678d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31476786?v=4)[Ilya Sitnikov](/maintainers/sitnikovik)[@sitnikovik](https://github.com/sitnikovik)

---

Top Contributors

[![sitnikovik](https://avatars.githubusercontent.com/u/31476786?v=4)](https://github.com/sitnikovik "sitnikovik (3 commits)")

---

Tags

cmdconsolephptoolkit

### Embed Badge

![Health badge](/badges/sitnikovik-clipher/health.svg)

```
[![Health](https://phpackages.com/badges/sitnikovik-clipher/health.svg)](https://phpackages.com/packages/sitnikovik-clipher)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[styleci/cli

The CLI tool for StyleCI

71470.5k9](/packages/styleci-cli)[winbox/args

Windows command-line formatter

20720.9k21](/packages/winbox-args)[tomatophp/filament-artisan

Simple but yet powerful library for running some artisan commands for FilamentPHP

3275.4k1](/packages/tomatophp-filament-artisan)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
