PHPackages                             hvolschenk/cliphf - 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. hvolschenk/cliphf

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

hvolschenk/cliphf
=================

PHP Cli Formatting library.

v3.0.1(9y ago)077MITPHPPHP ^7.0

Since Nov 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/hvolschenk/cliphf)[ Packagist](https://packagist.org/packages/hvolschenk/cliphf)[ Docs](https://github.com/hvolschenk/cliphf)[ RSS](/packages/hvolschenk-cliphf/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (7)Used By (0)

CliPh-F
=======

[](#cliph-f)

Very simple PHP CLI formatter.

Installation
------------

[](#installation)

Cliphf can either be cloned from the repository on Github or it can be installed via composer. The preferred way is through composer as you will then be able to receive updates easily.

### Composer

[](#composer)

```
$ php composer.phar require hvolschenk/cliphf

```

### Git

[](#git)

```
$ git clone https://github.com/righteous-trespasser/cliphf.git

```

Usage
-----

[](#usage)

### Output

[](#output)

You can format output for the command line with the `Output::format` static method. It takes in only one argument and that is the string to be formatted. You can specify formats in an HTML-like syntax as in the following example:

```
use Hvolschenk\Cliphf;

Output::format('{italic}Checking config{/italic}...');
if ($something === true) {
  Output::format('{bold}{green}Done.{/green}{/bold}')
}
```

### Input

[](#input)

Capuring input is just as simple. You can specify normal text inputs and password inputs through CliPh-F with formatted labels:

```
$name = Input::text('Please enter your name: ');
$password = Input::password('Secret password: ');
```

Input text can also be formatted and uses the output class to format text:

```
use Hvolschenk\Cliphf;

$name = Input::text('{bold}{underline}Dangerous input:{/underline}{/bold}');
```

### Rules

[](#rules)

There are 10 style rules for text and 8 colors built-in. The rules are:

- blink
    - Creates blinking text
- bold
    - Highlights the text by using a bold font
- dim
    - Dims the text by making the color darker
- hide
    - Creates hidden text (Same color as background, un-highlight-able)
- invert
    - Inverts the backgroud and foreground colors
- italic
    - Emphasises text by making it italic
- strikethrough
    - Draws a line through the text
- underline
    - Draws attention to the text by underlining it
- remove
    - removes all formatting
- break
    - Adds a linebreak

The 8 colors are:

- black
- blue
- cyan
- green
- magenta
- red
- white
- yellow

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~4 days

Total

6

Last Release

3492d ago

Major Versions

v1.0.1 → v2.0.02016-11-16

v2.0.1 → v3.0.02016-11-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8377785?v=4)[Hendrik Volschenk](/maintainers/hvolschenk)[@hvolschenk](https://github.com/hvolschenk)

---

Top Contributors

[![hvolschenk](https://avatars.githubusercontent.com/u/8377785?v=4)](https://github.com/hvolschenk "hvolschenk (19 commits)")

---

Tags

phpformattercliformatting

### Embed Badge

![Health badge](/badges/hvolschenk-cliphf/health.svg)

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

###  Alternatives

[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k260.6M361](/packages/nunomaduro-termwind)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2592.3M13](/packages/nunomaduro-laravel-console-task)[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

10095.6k](/packages/mehrancodes-laravel-harbor)[php-school/learn-you-php

An introduction to PHP's core features: i/o, http, arrays, exceptions and so on.

3202.0k](/packages/php-school-learn-you-php)[alecrabbit/php-cli-snake

Lightweight cli spinner with zero dependencies

29214.4k5](/packages/alecrabbit-php-cli-snake)

PHPackages © 2026

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