blaix / gren-ansi

Control terminal text, cursor, and screen with ANSI escape sequences in Gren

Home Page:https://packages.gren-lang.org/package/blaix/gren-ansi/latest/overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gren ANSI

Control terminal text, cursor, and screen with ANSI escape sequences in Gren.

import Ansi
import Stream exposing (Stream)

coolGreeting : Stream -> Task Never {}
coolGreeting stdout =
    "Hello!"
        |> Ansi.wrapItalic
        |> Ansi.wrapColor Ansi.Green
        |> Stream.sendLine stdout

See Ansi module docs for everything that's available.

There are also functions for controlling the screen and cursor. See the gren-tui examples for usage in a full program, including interactivity!

About

Control terminal text, cursor, and screen with ANSI escape sequences in Gren

https://packages.gren-lang.org/package/blaix/gren-ansi/latest/overview

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Nix 81.0%Language:Just 19.0%