boxes
Draw boxes around text in terminal
TLDR
Draw a box around a string
Remove a box from a string
Specify the box design
Specify the box size (in columns by lines)
Align the box text [h]orizonally (at [l]eft, [c]enter or [r]ight)
Align the box text [v]ertically (at [t]op, [c]enter or [b]ottom)
[j]ustify the box text (at [l]eft, [c]enter or [r]ight)
SYNOPSIS
boxes [-d box_type] [-a align] [-i indent] [-l line_length] [-n number] [-p padding] [-s style] [-t title] [-v]
PARAMETERS
-d box_type
Specifies the type of box to draw. Use boxes -l to see the available types.
-a align
Sets the alignment of the text within the box. Supported values are 'c' (center), 'l' (left), and 'r' (right).
-i indent
Sets the indentation of the text inside the box. The value is the number of spaces to indent.
-l line_length
Specifies the maximum line length of the text inside the box. Text will be wrapped to fit this length.
-n number
Sets the number of boxes to draw around the text (nested boxes).
-p padding
Specifies the padding around the text inside the box. The value is the number of spaces to use as padding.
-s style
Chooses a specific style (variant) of a box type.
-t title
Adds a title to the top of the box.
-v
Prints version information and exits.
DESCRIPTION
The boxes command is a utility for drawing various ASCII art boxes around text input. It reads input from standard input and outputs the input enclosed within a user-specified box design to standard output. It offers a wide range of pre-defined box styles, including solid lines, dashed lines, shaded borders, and even more whimsical designs. Users can customize the box style by specifying the type of box they want to use and control the margins and padding around the enclosed text. This makes it a handy tool for adding visual emphasis to terminal output, creating decorative banners, or formatting text for scripts or configuration files.
Boxes can be used to highlight messages in scripts, generate fancy log file entries, or just add a bit of visual flair to your terminal work. The simplicity of its input and output makes it easy to integrate into existing workflows using pipes and redirection.
LISTING BOX TYPES
Running boxes -l displays a list of all available box types. This is essential to determine which box style you wish to use with the -d option.
EXAMPLES
Example usage:
boxes -d dog < input.txt
Draws a "dog" themed box around the contents of input.txt.
echo "Hello World" | boxes -d invenom
Draws "Hello World" inside an 'invenom' box.