Something went wrong. Try again.
A small command line app to create pretty unicode/ascii tables.
Something went wrong. Try again.
Rust 100%
README.md
Table #
A small command line app to create pretty unicode/ascii tables.
Usage #
Basic Usage #
Rows are introduced with --row.
$ table --row "column 1" "column 2" "column 3" --row a b c --row c d "and e"
┌──────────┬──────────┬──────────┐
│ column 1 │ column 2 │ column 3 │
├──────────┼──────────┼──────────┤
│ a │ b │ c │
├──────────┼──────────┼──────────┤
│ c │ d │ and e │
└──────────┴──────────┴──────────┘
Headers #
Use --header for a header row:
$ table --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
┌──────────┬──────────┬──────────┐
│ column 1 │ column 2 │ column 3 │
╞══════════╪══════════╪══════════╡
│ a │ b │ c │
├──────────┼──────────┼──────────┤
│ c │ d │ and e │
└──────────┴──────────┴──────────┘
Multi-line cells #
Multi-line cells work fine (text is not auto-wrapped):
$ table --header "column 1" "column 2" "column 3" --row a "Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo
consequat." c --row c d "and e"
┌──────────┬─────────────────────────────────────────┬──────────┐
│ column 1 │ column 2 │ column 3 │
╞══════════╪═════════════════════════════════════════╪══════════╡
│ a │ Lorem ipsum dolor sit amet, consectetur │ c │
│ │ adipiscing elit, sed do eiusmod tempor │ │
│ │ incididunt ut labore et dolore magna │ │
│ │ aliqua. Ut enim ad minim veniam, quis │ │
│ │ nostrud exercitation ullamco laboris │ │
│ │ nisi ut aliquip ex ea commodo │ │
│ │ consequat. │ │
├──────────┼─────────────────────────────────────────┼──────────┤
│ c │ d │ and e │
└──────────┴─────────────────────────────────────────┴──────────┘
Table Styles #
Table style can be set with the --style option. Note that different styles will look better or worse depending on the font.
--style=unicode (Default) #
$ table --style=unicode --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
┌──────────┬──────────┬──────────┐
│ column 1 │ column 2 │ column 3 │
╞══════════╪══════════╪══════════╡
│ a │ b │ c │
├──────────┼──────────┼──────────┤
│ c │ d │ and e │
└──────────┴──────────┴──────────┘
--style=round #
$ table --style=round --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
╭──────────┬──────────┬──────────╮
│ column 1 │ column 2 │ column 3 │
╞══════════╪══════════╪══════════╡
│ a │ b │ c │
├──────────┼──────────┼──────────┤
│ c │ d │ and e │
╰──────────┴──────────┴──────────╯
--style=double #
$ table --style=double --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
╔══════════╦══════════╦══════════╗
║ column 1 ║ column 2 ║ column 3 ║
╠══════════╬══════════╬══════════╣
║ a ║ b ║ c ║
╠══════════╬══════════╬══════════╣
║ c ║ d ║ and e ║
╚══════════╩══════════╩══════════╝
--style=double-frame #
$ table --style=double-frame --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
╔══════════╤══════════╤══════════╗
║ column 1 │ column 2 │ column 3 ║
╠══════════╪══════════╪══════════╣
║ a │ b │ c ║
╟──────────┼──────────┼──────────╢
║ c │ d │ and e ║
╚══════════╧══════════╧══════════╝
--style=wide #
$ table --style=wide --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
┏━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┓
┃ column 1 ┃ column 2 ┃ column 3 ┃
┣━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━┫
┃ a ┃ b ┃ c ┃
┣━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━┫
┃ c ┃ d ┃ and e ┃
┗━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┛
--style=wide-frame #
$ table --style=wide-frame --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
┏━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓
┃ column 1 │ column 2 │ column 3 ┃
┣━━━━━━━━━━┿━━━━━━━━━━┿━━━━━━━━━━┫
┃ a │ b │ c ┃
┠──────────┼──────────┼──────────┨
┃ c │ d │ and e ┃
┗━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛
--style=wide-header #
$ table --style=wide-header --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
┌──────────┬──────────┬──────────┐
│ column 1 │ column 2 │ column 3 │
┝━━━━━━━━━━┿━━━━━━━━━━┿━━━━━━━━━━┥
│ a │ b │ c │
├──────────┼──────────┼──────────┤
│ c │ d │ and e │
└──────────┴──────────┴──────────┘
--style=block #
$ table --style=block --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
▛▀▀▀▀▀▀▀▀▀▀▛▀▀▀▀▀▀▀▀▀▀▛▀▀▀▀▀▀▀▀▀▀▜
▌ column 1 ▌ column 2 ▌ column 3 ▐
▙▄▄▄▄▄▄▄▄▄▄▙▄▄▄▄▄▄▄▄▄▄▙▄▄▄▄▄▄▄▄▄▄▟
▌ a ▌ b ▌ c ▐
▙▄▄▄▄▄▄▄▄▄▄▙▄▄▄▄▄▄▄▄▄▄▙▄▄▄▄▄▄▄▄▄▄▟
▌ c ▌ d ▌ and e ▐
▙▄▄▄▄▄▄▄▄▄▄▙▄▄▄▄▄▄▄▄▄▄▙▄▄▄▄▄▄▄▄▄▄▟
--style=braile #
$ table --style=braile --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
⡖⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⡖⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⡖⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⢲
⡇ column 1 ⡇ column 2 ⡇ column 3 ⢸
⡷⠶⠶⠶⠶⠶⠶⠶⠶⠶⠶⡷⠶⠶⠶⠶⠶⠶⠶⠶⠶⠶⡷⠶⠶⠶⠶⠶⠶⠶⠶⠶⠶⢾
⡇ a ⡇ b ⡇ c ⢸
⡗⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⡗⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⡗⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⢺
⡇ c ⡇ d ⡇ and e ⢸
⠓⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠓⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠓⠒⠒⠒⠒⠒⠒⠒⠒⠒⠒⠚
--style=ascii #
$ table --style=ascii --header "column 1" "column 2" "column 3" --row a b c --row c d "and e"
+----------+----------+----------+
| column 1 | column 2 | column 3 |
+================================+
| a | b | c |
|----------+----------+----------|
| c | d | and e |
+----------+----------+----------+
Development #
Table is written in Rust. To compile, clone from git and
cargo build
Copyright and License #
Copyright © 2026 David Caldwell david@porkrind.org
License: GPLv3