PHPackages                             cspray/labrador-styled-byte-stream - 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. cspray/labrador-styled-byte-stream

ActiveLibrary

cspray/labrador-styled-byte-stream
==================================

Create colorized and formatted terminal text with Amp's OutputStream!

0.2.0(3y ago)36711MITPHPPHP ^8.0

Since May 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/labrador-kennel/styled-byte-stream)[ Packagist](https://packagist.org/packages/cspray/labrador-styled-byte-stream)[ RSS](/packages/cspray-labrador-styled-byte-stream/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (2)Dependencies (3)Versions (4)Used By (1)

Styled ByteStream
=================

[](#styled-bytestream)

A library for printing rich output to a terminal using [amphp/byte-stream](https://github.com/amphp/byte-stream)!

- Supports default foreground and background colors
    - black
    - blue
    - cyan
    - green
    - magenta
    - red
    - white
    - yellow
- Supports default formatting options
    - bold
    - underline
    - reverse
    - conceal
- Other helper methods designed to make terminal output easy to create
- An immutable fluent API for creating OutputStream with a specific style

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

[](#installation)

[Composer](https://getcomposer.org/) is the only supported way to install Styled ByteStream

```
composer require cspray/labrador-styled-byte-stream

```

Documentation
-------------

[](#documentation)

Styled ByteStream provides a single `Amp\ByteStream\OutputStream` decorator; the `Cspray\Labrador\StyledByteStream\TerminalOutputStream`. This object provides an API for creating rich terminal output. This includes outputting content with new lines, changing the color of the text, and/or adding formatting options. All of these methods can be chained together to come up with exactly the right style of content for your Amp powered CLI app.

All examples below assume to be running in the following boilerplate:

```
