Skip to content

z1-0/boxsay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boxsay

CI Release License: MIT

A command-line tool that wraps text in decorative boxes, similar to cowsay but with multiple box styles.

Features

  • 10+ box styles (classic, rounded, heavy, double, dotted, dashed, ascii, star, hash, diamond, bubble)
  • Customizable padding and margin
  • Pipe support for chaining commands
  • Unicode/CJK character support
  • Zero dependencies, single binary

Installation

Binary (recommended)

curl -fsSL https://raw.githubusercontent.com/z1-0/boxsay/main/scripts/install.sh | sh

Install to a custom location:

curl -fsSL https://raw.githubusercontent.com/z1-0/boxsay/main/scripts/install.sh | PREFIX=~/.local sh

Uninstall

curl -fsSL https://raw.githubusercontent.com/z1-0/boxsay/main/scripts/install.sh | sh -s -- uninstall

Build from source

Requires Zig 0.15+

git clone https://github.com/z1-0/boxsay.git
cd boxsay
zig build -Doptimize=ReleaseFast
cp zig-out/bin/boxsay ~/.local/bin/

Usage

Basic

boxsay "Hello, World!"
┌───────────────┐
│               │
│ Hello, World! │
│               │
└───────────────┘

Styles

boxsay --list
Available styles:
  classic    - Classic square corners
  rounded    - Rounded corners
  heavy      - Heavy/bold lines
  double     - Double lines
  dotted     - Dotted lines
  dashed     - Dashed lines
  ascii      - ASCII only
  star       - Star characters
  hash       - Hash/pound characters
  diamond    - Diamond corners
  bubble     - Bubble corners

Examples:

classic

boxsay -s classic "classic"
┌─────────┐
│         │
│ classic │
│         │
└─────────┘

rounded

boxsay -s rounded "rounded"
╭─────────╮
│         │
│ rounded │
│         │
╰─────────╯

heavy

boxsay -s heavy "heavy"
┏━━━━━━━┓
┃       ┃
┃ heavy ┃
┃       ┃
┗━━━━━━━┛

double

boxsay -s double "double"
╔════════╗
║        ║
║ double ║
║        ║
╚════════╝

dotted

boxsay -s dotted "dotted"
┌╌╌╌╌╌╌╌╌┐
╎        ╎
╎ dotted ╎
╎        ╎
└╌╌╌╌╌╌╌╌┘

dashed

boxsay -s dashed "dashed"
┌┄┄┄┄┄┄┄┄┐
┆        ┆
┆ dashed ┆
┆        ┆
└┄┄┄┄┄┄┄┄┘

ascii

boxsay -s ascii "ascii"
+--------+
|        |
|  ascii |
|        |
+--------+

star

boxsay -s star "star"
************
*          *
*   star   *
*          *
************

hash

boxsay -s hash "hash"
############
#          #
#   hash   #
#          #
############

diamond

boxsay -s diamond "diamond"
◆───────────◆
│           │
│  diamond  │
│           │
◆───────────◆

bubble

boxsay -s bubble "bubble"
⸢──────────⸣
│          │
│  bubble  │
│          │
⸤──────────⸥

Padding & Margin

boxsay -p 0 "No padding"
┌──────────┐
│No padding│
└──────────┘
boxsay -m 2 "With margin"
  ┌───────────────┐
  │               │
  │  With margin  │
  │               │
  └───────────────┘

Pipe input

echo "From pipe" | boxsay -s double
╔═════════════╗
║             ║
║  From pipe  ║
║             ║
╚═════════════╝
date | boxsay -s rounded
╭─────────────────╮
│                 │
│ Mon Feb 23 2026 │
│                 │
╰─────────────────╯

Multiline

boxsay "Line 1
Line 2
Line 3"
┌────────┐
│        │
│ Line 1 │
│ Line 2 │
│ Line 3 │
│        │
└────────┘

Options

boxsay [options] [text]

Options:
  -s, --style <name>    Box style (default: classic)
  -p, --padding <n>     Inner padding (default: 1)
  -m, --margin <n>      Outer margin (default: 0)
  -l, --list            List all available styles
  -h, --help            Show help message
  -v, --version         Show version number

About

A command-line tool that wraps text in decorative boxes like cowsay

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors