PHPackages                             xico2k/termwind-plugin-live - 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. xico2k/termwind-plugin-live

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

xico2k/termwind-plugin-live
===========================

The live plugin for Termwind.

32.8kPHP

Since Mar 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xiCO2k/termwind-plugin-live)[ Packagist](https://packagist.org/packages/xico2k/termwind-plugin-live)[ RSS](/packages/xico2k-termwind-plugin-live/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

 [![Termwind logo](/art/logo.png)](/art/logo.png)

 `Termwind Live Plugin`

===========================

[](#----termwind-live-plugin--------)

 [![GitHub Workflow Status (master)](https://camo.githubusercontent.com/433db41bafe2df8ccd2fae1d8e54b0cfc03d664679d582db76bd8a5a7a222906/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7869636f326b2f7465726d77696e642d706c7567696e2d6c6976652f54657374732f6d6173746572)](https://github.com/xico2k/termwind-plugin-live/actions) [![Total Downloads](https://camo.githubusercontent.com/62cea760eb318573d76e47497d18344dcc5ca49a9a6c32bc4c3a0bce64db6e97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7869636f326b2f7465726d77696e642d706c7567696e2d6c697665)](https://packagist.org/packages/xico2k/termwind-plugin-live) [![Latest Version](https://camo.githubusercontent.com/61ecb137fed1339ec1c47368e62a12a704b67449685acbfc742938bc5d27b6a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7869636f326b2f7465726d77696e642d706c7567696e2d6c697665)](https://packagist.org/packages/xico2k/termwind-plugin-live) [![License](https://camo.githubusercontent.com/4b5818cdd8b5d6cf2129076315b7483aaaa26ec0645a6d4ba17cf2315d4b0a25/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7869636f326b2f7465726d77696e642d706c7567696e2d6c697665)](https://packagist.org/packages/xico2k/termwind-plugin-live)

---

**Termwind Live Plugin** allows you to make your cli content live.

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

[](#installation)

> **Requires [PHP 8.0+](https://php.net/releases/)**

Require Termwind Live Plugin using [Composer](https://getcomposer.org):

```
composer require xico2k/termwind-plugin-live
```

Usage
-----

[](#usage)

```
use function Termwind\Live\live;

live(function () {
    static $total = 0;

    return sprintf('The content was refreshed %d times.', ++$total);
})->refreshEvery(seconds: 1);
```

### `refreshEvery()`

[](#refreshevery)

The `refreshEvery` methods may be used to update the content by certain amount of time.

#### Methods available:

[](#methods-available)

- `refreshEvery(milliseconds: 0, seconds: 0)`
- `refreshEverySeconds($seconds)`
- `refreshEveryMilliseconds($seconds)`

```
// Seconds
live(fn () => 'foo')->refreshEverySeconds(1); // or
live(fn () => 'foo')->refreshEvery(seconds: 1);

// Milliseconds
live(fn () => 'foo')->refreshEveryMilliseconds(250); // or
live(fn () => 'foo')->refreshEvery(milliseconds: 1);
```

### `while(Closure $condition)`

[](#whileclosure-condition)

The `while()` method may be used to update the content while the condition is `true`.

```
live(fn () => 'Loading...')
    ->while(fn () => $process->running());
```

### `showCursor()` and `hideCursor()`

[](#showcursor-and-hidecursor)

The `showCursor()` and `hideCursor()` methods may be used to show/hide the cursor on your cli.

```
live('Loading...')
    ->hideCursor()
    ->while(fn () => $process->running())
    ->showCursor();
```

### `clear()`

[](#clear)

The `clear()` method may be used to clear the live output.

```
live('Loading...')
    ->while(fn () => $process->running())
    ->clear();
```

### `RefreshEvent`

[](#refreshevent)

The `RefreshEvent` is passed to the `Closure` and provides a way to stop the execution.

```
use Termwind\Live\Events\RefreshEvent;

live(function (RefreshEvent $event) {
    $shouldStop = true; // Call to check something...

    if ($shouldStop) {
        $event->stop();
    }

    return 'foo';
})->refreshEvery(seconds: 1);
```

---

Termwind Live Plugin is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3dc78bef54ed354737b181bff25feaff7c0a6395272ca5d919a316ae0e647969?d=identicon)[xiCO2k](/maintainers/xiCO2k)

---

Top Contributors

[![xiCO2k](https://avatars.githubusercontent.com/u/823088?v=4)](https://github.com/xiCO2k "xiCO2k (16 commits)")

---

Tags

clilivephptermwind

### Embed Badge

![Health badge](/badges/xico2k-termwind-plugin-live/health.svg)

```
[![Health](https://phpackages.com/badges/xico2k-termwind-plugin-live/health.svg)](https://phpackages.com/packages/xico2k-termwind-plugin-live)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

13046.0M6.4k](/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)
