term
A small library of helpful terminal procedures
Summary
| Latest Version | Unknown |
|---|---|
| License | GPL-3.0 |
| CI Status | Failing |
| Stars | 2 |
| Forks | 0 |
| Open Issues | 0 |
| Last Commit | 2023-08-20 |
| Downloads | 0 |
| Last Indexed | 2026-09-06 06:05 |
Tags
Installation
nimble install term
choosenim install term
git clone https://github.com/wick3dr0se/term
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| term | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/wick3dr0se/term |
|---|---|
| Homepage | https://github.com/wick3dr0se/term |
| Registry Source | github |
README
Term :books:
This library provides functionality for interacting with the terminal, manipulating terminal modes, screen buffers, cursor behavior, generating colors and more. term among many things, can assist in building a TUI without a dependency to curses, abstract the difficulty of working with the terminal and ANSI escape sequences
The convienently (clearly not creatively) named term library mainly utilizies the termios library, raw ANSI escape sequences and other standard Nim libraries
Installation
Install term from nimble
nimble install https://github.com/wick3dr0se/term
Usage
Import term
import term
A basic few implementations
Set the terminal to raw, canonical, noecho or cooked (default) mode
setMode(noecho) # disable echoing to the terminal
setMode(cooked) # *reset* the terminal
Scroll the terminal screen
scrollUp(10) # scroll up 10 lines
scrollDown() # scroll down 1 (implicit) line
Switch to the alternative screen buffer
altBuffer()
mainBuffer() # switch back to the main buffer
Output a random colored string
echoRandColor("test") # will print in true color if possible