termstyle

Easy to use styles for terminal output

Abandoned Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:23

Installation

nimble install termstyle
choosenim install termstyle
git clone https://github.com/PMunch/termstyle

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
termstyle - - - - - - -

Source

Repository https://github.com/PMunch/termstyle
Homepage https://github.com/PMunch/termstyle
Registry Source nimble_official

README

termstyle

This module is created to bring extremely easy to use terminal colours and styles. The official terminal module also does this but requires you to use calls like setStyle which clutters your input. This module on the other hand just defines simple, single-word procedures that applies styles to everything that follows. The most simple example is a regular echo statement for logging. To style it with a red text colour simply do: :: echo red "mystring" This allows you to easily drop it into any echo statement without trouble. Similarily to an echo it also takes varargs, so this would also work: :: echo red("mystring", 42) It even converts the integer to a string when concatenating just like echo does! If you want to have multiple colours on a single line you can use multiple of them and the echo varargs system: :: echo red "This is blue: ", blue 42 In case you want to add more styles and don't want to chain them you can of course also use the style procedure and combine the various styles: :: echo style("mystring", termRed & termBlink)

This file is automatically generated from the documentation found in termstyle.nim. Use nim doc2 termstyle.nim to get the full documentation.