Logo
Noddev
ShowcaseDocsBlog
Go to Docs

Welcome

IntroductionEcosystem Overview

Omni (OSINT Platform)

OverviewCore ConceptsSteganographySocial Recon

ApiShield (Security)

Getting StartedRate LimitingThreat Models

Terminal-RichJS (CLI)

IntroductionInstallationComponentsLayouts

Ready to secure your next project?

GitHub Profile

© 2026 NODDEV. All rights reserved.

GitHubTwitterWhatsApp

Introduction to Terminal-RichJS

A TypeScript library for rich terminal output with colors, styles, and components.

Terminal-RichJS is a TypeScript library for rich terminal output, providing features like styled text, tables, panels, trees, syntax highlighting, and progress bars.

Console

The Console class is the main entry point for rendering content to the terminal.

typescript
import { Console } from "terminal-richjs";
 
const console = new Console();

Methods

print(...objects: any[]): void

Print one or more objects to the console. Strings are parsed for markup.

typescript
console.print("Hello, [bold]World[/bold]!");
console.print(new Panel("Content"), new Table());

log(...objects: any[]): void

Alias for print().

render(renderable: Renderable): string

Render a renderable object to a string without printing.

typescript
const output = console.render(new Panel("Hello"));

Properties

  • width: number - Terminal width in columns

Styling

RichJS supports rich markup syntax similar to Python Rich.

Markup Syntax

typescript
// Basic styles
"[bold]Bold text[/bold]";
"[italic]Italic text[/italic]";
"[underline]Underlined[/underline]";
"[dim]Dimmed text[/dim]";
"[strikethrough]Crossed out[/strikethrough]";
 
// Combined styles
"[bold italic red]Bold italic red[/bold italic red]";
 
// Short closing tag
"[bold]Bold[/]"; // Closes all open styles

Color Formats

Named Colors

typescript
"[red]Red[/red]";
"[green]Green[/green]";
"[blue]Blue[/blue]";
"[bright_red]Bright red[/bright_red]";

Hex Colors

typescript
"[#ff0000]Red[/#ff0000]";
"[#ff79c6]Dracula Pink[/#ff79c6]";

RGB Colors

typescript
"[rgb(255,0,0)]Red[/rgb(255,0,0)]";

Background Colors

Prefix any color format with on for background:

typescript
"[on red]Red background[/on red]";
"[on #282a36]Hex background[/on #282a36]";

Style Class

typescript
import { Style } from "terminal-richjs";
 
const style = Style.parse("bold red on white");
const combined = style.combine(Style.parse("italic"));

Next Steps

  • Installation - Setup and quick start
  • Components - Panel, Table, Tree, Syntax
  • Layouts - Box styles and themes
PreviousThreat ModelsNextInstallation
Was this helpful?

On This Page

ConsoleMethodsPropertiesStylingMarkup SyntaxColor FormatsStyle ClassNext Steps