termansi 0.4.0 copy "termansi: ^0.4.0" to clipboard
termansi: ^0.4.0 copied to clipboard

Collection of ANSI escape sequences definitions for terminal applications.

TermAnsi #

Pure Dart ANSI escape sequence reference library. Provides constants and helpers for terminal colors, cursor control, text styling, and advanced terminal features.

Part of TermKit.

Installation #

dependencies:
  termansi: ^0.3.1

Quick Start #

import 'package:termansi/termansi.dart';

// Colors
print('${Color.red}Error${Color.reset}');
print('${Color.color256Fg(42)}Custom${Color.reset}');
print('${Color.rgbFg(255, 100, 50)}RGB${Color.reset}');

// Text styling
print('${Text.bold}Important${Text.resetBold}');
print('${Text.italic}Emphasis${Text.resetItalic}');

// Cursor control
stdout.write(Cursor.moveTo(10, 20));
stdout.write(Cursor.hide);

Features #

  • Colors: ANSI/256/truecolor (fg/bg)
  • Cursor: Movement, positioning, visibility
  • Text: Bold, italic, underline, strikethrough
  • Terminal: Alternate screen, mouse events, keyboard protocol
  • Erase: Screen/line clearing
  • X11 colors: Named color support

Examples:

API Overview #

All features exposed via static classes:

  • Color - Foreground/background colors
  • Text - Styling attributes
  • Cursor - Cursor operations
  • Term - Terminal features (mouse, keyboard, clipboard, hyperlinks)
  • Erase - Clear operations

License #

MIT - see LICENSE

1
likes
160
points
113
downloads

Publisher

verified publishernetflux.com.ar

Weekly Downloads

Collection of ANSI escape sequences definitions for terminal applications.

Homepage
Repository (GitHub)
View/report issues

Topics

#console #terminal #ansi

Documentation

Documentation
API reference

License

MIT (license)

More

Packages that depend on termansi