PHPackages                             xp-forge/terminal - 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. xp-forge/terminal

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

xp-forge/terminal
=================

Terminal control

v1.0.1(5y ago)03.6k—0%[1 issues](https://github.com/xp-forge/terminal/issues)BSD-3-ClausePHPPHP &gt;=7.0.0

Since Jun 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/xp-forge/terminal)[ Packagist](https://packagist.org/packages/xp-forge/terminal)[ Docs](http://xp-framework.net/)[ RSS](/packages/xp-forge-terminal/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (0)

Terminal
========

[](#terminal)

[![Build Status on TravisCI](https://camo.githubusercontent.com/e9a7c073eee0432578122866647e13ac105c208bf9bfd6dad49ce4b5c1f43442/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f78702d666f7267652f7465726d696e616c2e706e67)](https://travis-ci.org/xp-forge/terminal)[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)[![Supports PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.png)](http://php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/68a290d69fcfdd6afb5c6ac74be21b4185fae11daf304be592f1d6646bcd84d8/68747470733a2f2f706f7365722e707567782e6f72672f78702d666f7267652f7465726d696e616c2f76657273696f6e2e706e67)](https://packagist.org/packages/xp-forge/terminal)

The terminal library adds support for color to the `util.cmd.Console` class.

[![Screenshot](https://raw.githubusercontent.com/xp-forge/terminal/master/terminal-styles.png)](https://raw.githubusercontent.com/xp-forge/terminal/master/terminal-styles.png)

Styles
------

[](#styles)

There are five predefined styles:

```
use util\cmd\Console;

Console::writeLine('This is primary!');
Console::writeLine('This is success!');
Console::writeLine('This is info!');
Console::writeLine('This is warning!');
Console::writeLine('This is danger!');
```

Colors
------

[](#colors)

For direct color control, the colors can be chosen directly by supplying their names. Foreground and background colors are separated by the `@` sign:

```
use util\cmd\Console;

Console::writeLine('An error occured');
Console::writeLine('OK: 100 Tests succeeded');
```

The colors' names are black, dark-red, dark-green, dark-yellow, dark-blue, dark-magenta, dark-cyan, gray, dark-gray, red, green, yellow, blue, magenta, cyan and white.

Attributes
----------

[](#attributes)

There are three more attributes. Not all terminals support these, though!

```
use util\cmd\Console;

Console::writeLine('http://localhost');
Console::writeLine('Watch out!');
Console::writeLine('- The XP Framework group');

// Can be combined, too
Console::writeLine('http://localhost');
```

Positioning
-----------

[](#positioning)

The `util.cmd.term.Terminal` class allows clearing the screen, positioning the cursor and writing text there.

[![Screenshot](https://raw.githubusercontent.com/xp-forge/terminal/master/terminal-clock.png)](https://raw.githubusercontent.com/xp-forge/terminal/master/terminal-clock.png)

```
use util\cmd\term\Terminal;

$message= 'Hello from the middle of the screen';

// Center text in third line
$dim= Terminal::size();
$x= ($dim[0] - strlen($message)) / 2;
$y= 3;

Terminal::clear();
Terminal::write($x, $y, $message);
```

For the more advanced example seen above in the screenshot, have a look at [this code](https://gist.github.com/thekid/d1a38a0743733d2270968d7eac8f43c9).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

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 ~224 days

Recently: every ~372 days

Total

8

Last Release

2052d ago

Major Versions

v0.6.0 → v1.0.02020-04-04

PHP version history (3 changes)v0.1.0PHP &gt;=5.5.0

v0.4.0PHP &gt;=5.6.0

v1.0.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/07d18d882c8b4aaf3466432f64018214f2771eda333202175431ee7233795376?d=identicon)[thekid](/maintainers/thekid)

---

Top Contributors

[![thekid](https://avatars.githubusercontent.com/u/696742?v=4)](https://github.com/thekid "thekid (48 commits)")

---

Tags

colorsterminalxp-frameworkmodulexp

### Embed Badge

![Health badge](/badges/xp-forge-terminal/health.svg)

```
[![Health](https://phpackages.com/badges/xp-forge-terminal/health.svg)](https://phpackages.com/packages/xp-forge-terminal)
```

###  Alternatives

[olegkoval/magento2-regenerate-url-rewrites

Add into Magento 2 a CLI feature which allow to regenerate a Url Rewrites of products and categories

4423.7M2](/packages/olegkoval-magento2-regenerate-url-rewrites)

PHPackages © 2026

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