terminus

Universal terminal helper

terminus NPM version Build Status ESLint Config

Universal terminal helper inspired by Chalk.

Features

  • Universal
  • Partial Flowtype support
  • Tagged template literals based

Installation

With NPM:

$ npm install @njakob/terminus

With Yarn:

$ yarn add @njakob/terminus

Usage

Terminus uses tagged template literals in order to output colors in both your Node.js and browser applications.

import Terminus from '@njakob/terminus';

const term = new Terminus();

term.log`Stuff to ${term.red('log')} with some ${term.bold.blue('colors')}`;

Colors

  • term.log`${term.black('black')}`
  • term.log`${term.red('red')}`
  • term.log`${term.green('green')}`
  • term.log`${term.yellow('yellow')}`
  • term.log`${term.blue('blue')}`
  • term.log`${term.cyan('cyan')}`
  • term.log`${term.magenta('magenta')}`
  • term.log`${term.white('white')}`
  • term.log`${term.gray('gray')}`

Backgrounds

  • term.log`${term.bgBlack('black')}`
  • term.log`${term.bgRed('red')}`
  • term.log`${term.bgGreen('green')}`
  • term.log`${term.bgYellow('yellow')}`
  • term.log`${term.bgBlue('blue')}`
  • term.log`${term.bgCyan('cyan')}`
  • term.log`${term.bgMagenta('magenta')}`
  • term.log`${term.bgWhite('white')}`

Modifiers

  • term.log`${term.bold('bold')}`
  • term.log`${term.dim('dim')}`
  • term.log`${term.italic('italic')}`
  • term.log`${term.inverse('inverse')}`
  • term.log`${term.hidden('hidden')}`
  • term.log`${term.strikethrough('strikethrough')}`
  • term.log`${term.underline('underline')}`

Licences

njakob/terminus is licensed under the MIT License.

Related Repositories

terminus

terminus

A terminal for a more modern age ...

terminus

terminus

Get facts about a Linux system. ...

terminus

terminus

Terminal supporting inline HTML ...

terminus

terminus

The Pantheon CLI — a standalone utility for performing operations on the Pantheon Platform ...

Terminus

Terminus

An open javascript library to create your own shells ...