No description
Find a file
2025-08-30 14:43:56 +02:00
src Fixed warnings 2025-08-30 14:43:56 +02:00
tests Bump versions + fix tests on Nim v2.4.4 2025-08-10 14:40:35 +02:00
.gitignore Config added by VSCode Nim plugin 2025-08-30 14:36:18 +02:00
config.nims Config added by VSCode Nim plugin 2025-08-30 14:36:18 +02:00
LICENSE Create LICENSE 2021-03-22 13:57:58 +02:00
README.md Update README.md 2025-08-10 14:42:43 +02:00
termui.nimble Fixed warnings 2025-08-30 14:43:56 +02:00

Nim Terminal UI

This library provides simple UI components for the terminal. To install, run:

nimble install termui

Examples

import termui

# Ask for user input
let name = termuiAsk("What is your name?", defaultValue = "John")

# Ask for password
let password = termuiAskPassword("Enter your password:")

# Select from a list
let gender = termuiSelect("What is your gender?", options = @["Male", "Female"])

# Select multiple
let categories = termuiSelectMultiple("Select categories:", options = @["Games", "Productivity", "Utilities"])

# Confirmation
let confirmed = termuiConfirm("Are you sure you want to continue?")

# Show a label, as if the user had entered it in a input field
termuiLabel("Your name", "John")

# Progress bar
let progress = termuiProgress("Uploading file...")
progress.update(0.1)
progress.complete("Finished!")
progress.warn("Couldn't upload!")
progress.fail("No internet access!")

# Spinner (requires --threads:on when compiling)
let spinner = termuiSpinner("Checking your internet...")
spinner.update("Almost done...")
spinner.complete("Finished!")
spinner.warn("Couldn't test!")
spinner.fail("No internet access!")