Ansi

Chainable ansi escape sequences.

Installation

deno add jsr:@cliffy/ansi

Usage

Ansi escape sequences

The ansi and tty module can be used to generate or write ansi escape sequences to stdout.

import { tty } from "@cliffy/ansi/tty";

tty.cursorSave
  .cursorHide
  .cursorTo(0, 0)
  .eraseScreen();

Colors

The colors module is a simple and tiny chainable wrapper for @std/fmt/colors module and works similar to node's chalk module.

import { colors } from "@cliffy/ansi/colors";

console.log(
  colors.bold.underline.rgb24("Welcome to Deno.Land!", 0xff3333),
);