Publishing destinations

Plain-Text Tables for CLI Documentation

Written and reviewed by the md2text maintainer. Parser-specific guidance is checked against the automated regression suite.

Command-line interfaces often need to show structured information without HTML or Markdown. A CLI help screen might list flags. A build tool might print output formats. A deployment script might summarize checks. Plain-text tables are a practical way to keep that information readable.

The challenge is that terminal output has constraints. Lines wrap. Fonts vary. Some environments support Unicode; others are safer with ASCII. Good CLI tables are short, predictable, and easy to scan.

Use tables for reference data

Tables are useful when each row has the same shape:

CLI contentUseful columns
FlagsFlag, default, description
CommandsCommand, purpose, example
ChecksCheck, status, duration
FormatsFormat, output, best use
Environment variablesName, required, description

Avoid tables for step-by-step tutorials. Numbered lists are usually better for workflows.

Keep descriptions short

CLI output wraps quickly. This table is too wide:

+----------+---------+--------------------------------------------------+
| Flag     | Default | Description                                      |
+----------+---------+--------------------------------------------------+
| --watch  | false   | Rebuild the project every time a file changes... |
+----------+---------+--------------------------------------------------+

A better version uses short descriptions and explains detail below:

+----------+---------+-------------------------+
| Flag     | Default | Description             |
+----------+---------+-------------------------+
| --watch  | false   | Rebuild on changes      |
+----------+---------+-------------------------+
| --strict | true    | Fail on invalid input   |
+----------+---------+-------------------------+

If a flag needs more explanation, add a paragraph after the table.

Choose ASCII when compatibility matters

ASCII grid tables are safe in most terminals:

+----------+---------+-----------------------+
| Flag     | Default | Description           |
+----------+---------+-----------------------+
| --out    | dist    | Output directory      |
+----------+---------+-----------------------+
| --format | grid    | Text table style      |
+----------+---------+-----------------------+

Use ASCII when output may be copied into logs, CI systems, older terminals, or plain-text reports.

Choose Unicode when the terminal supports it

Unicode tables look cleaner:

┌──────────┬─────────┬──────────────────┐
│ Flag     │ Default │ Description      │
├──────────┼─────────┼──────────────────┤
│ --out    │ dist    │ Output directory │
├──────────┼─────────┼──────────────────┤
│ --format │ grid    │ Text table style │
└──────────┴─────────┴──────────────────┘

Use Unicode for modern developer-facing tools when you control the environment or provide a fallback.

Align values intentionally

Right-align numbers and durations:

+----------+----------+
| Step     | Duration |
+----------+----------+
| install  |     12s  |
+----------+----------+
| build    |     42s  |
+----------+----------+
| deploy   |      8s  |
+----------+----------+

Center alignment is useful for short statuses:

+----------+--------+
| Check    | Result |
+----------+--------+
| lint     |  pass  |
+----------+--------+
| tests    |  pass  |
+----------+--------+
| deploy   | review |
+----------+--------+

Most descriptive text should stay left aligned.

Provide a copy-friendly version in docs

If your documentation page explains CLI output, include a plain-text version readers can copy. Markdown tables are fine for the web page itself, but a CLI user may need the exact terminal-friendly shape.

For example:

```text
+----------+---------+------------------+
| Flag     | Default | Description      |
+----------+---------+------------------+
| --out    | dist    | Output directory |
+----------+---------+------------------+
```

Use a fenced text code block so Markdown renderers preserve spacing.

Test in a narrow terminal

Before publishing CLI docs, test the table at a narrower width. Many users work in split panes, remote shells, or embedded terminals. If a table wraps at common widths, reduce the columns or shorten the descriptions.

Checklist:

CheckGoal
80-column previewAvoid unexpected wrapping
Monospaced renderingPreserve alignment
ASCII fallbackSupport older environments
Short descriptionsKeep the table scannable
Code fence in docsPreserve spaces when copied

Final thought

Plain-text tables are at their best when they are modest. Use them for compact reference data, choose the style that fits the terminal, and keep the content short enough to survive real command-line widths.

Try the table examples from this guide

Open an allowlisted example in the converter or copy the source and output locally. The Markdown text is not placed in the URL.

Unicode output

Example key: cli-format-reference

Try this table in the converter

Markdown source


										| Flag | Default | Description |
|---|---:|---|
| --out | dist | Output directory |
| --format | grid | Text table style |
									

Text output


										┌──────────┬─────────┬──────────────────┐
│ Flag     │ Default │ Description      │
├──────────┼─────────┼──────────────────┤
│ --out    │    dist │ Output directory │
├──────────┼─────────┼──────────────────┤
│ --format │    grid │ Text table style │
└──────────┴─────────┴──────────────────┘
									

Convert your own table

Paste a Markdown table into the converter and choose ASCII grid, Unicode box, or Simple text output. Conversion runs locally in your browser.

Convert a Markdown table