Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dist

A terminal text display tool with optional styling, typewriter effects, and alignment. By default behaves like echo.

Build Go

Installation

go build -o dist .
# or install to PATH
go install

Usage

dist [flags] [file | text]

CLI Flags

Flag Type Default Description
-align string left Alignment: left, center, right
-type bool false Enable typewriter effect
-form bool false Enable forging/construction animation
-speed int 50 Typewriter speed (ms per character)
-cursor string block Cursor style: block, bar, underline, none
-blink bool false Blinking cursor
-wrap string off Word wrap: on, off
-color string (none) Text color
-w int 0 Terminal width override (0 = auto)
-h Show help

Color Options

Basic: black, red, green, yellow, blue, magenta, cyan, white

Bright: bright-black, bright-red, bright-green, bright-yellow, bright-blue, bright-magenta, bright-cyan, bright-white

Special: bold, reset

File Directives

Place /c/ commands in a file to control behavior. Directives override CLI flags and persist until overwritten.

/c/align left|center|right
/c/type
/c/notype
/c/form
/c/noform
/c/speed <ms>
/c/cursor block|bar|underline|none
/c/blink
/c/noblink
/c/wrap
/c/nowrap
/c/color <name>
/c/color reset
/c/delay <ms>

Directives can appear multiple times and change behavior throughout the file. They persist until explicitly changed by another directive.

Examples

Basic echo

dist hello world
# Output: hello world

Centered text

dist -align center -w 60 "Hello"
# Output:                             Hello

Typewriter effect

dist -type -speed 30 "Typing..."

Colors

dist -color red "Error message"
dist -color bright-green "Success!"

From file with directives

dist myfile.txt

Where myfile.txt contains:

/c/type
/c/speed 20
/c/color cyan
Hello
/c/color reset
/c/delay 500
World

Forging animation

dist -form -speed 60 "FORGE"

Or in a file:

/c/form
/c/speed 60
/c/color cyan
FORGE

Terminal width override

dist -w 40 -align center "Fixed width centered"

Behavior

  • Inline text: Behaves like echo — no padding, no wrapping
  • File input: Uses all styling options from /c/ directives
  • Piped stdin: Processes piped content with current flags
  • Terminal width: Auto-detected from $COLUMNS or stty. Falls back to /dev/tty when stdin is piped, so alignment works even in pipes.

Behavior

  • Inline text: Behaves like echo — no padding, no wrapping
  • File input: Uses all styling options from /c/ directives
  • Piped stdin: Processes piped content with current flags

About

A terminal text display tool with optional styling, typewriter effects, and alignment.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages