Fix broken ASCII diagrams → perfect Unicode box-drawing.
cat rough.txt | bx fix
+----------+ +----------+ ┌──────────┐ ┌─────┐
| Frontend |----->| API | │ Frontend │───▶│ API │
+----------+ +----------+ └──────────┘ └─────┘
| │
v ▼
+---------+ ┌──────┐
| Auth | │ Auth │
+---------+ └──────┘
go install github.com/justEstif/bx@latestmise use -g go:github.com/justEstif/bx@latest
mise reshimgit clone https://github.com/justEstif/bx.git
cd bx && go build -o bx .# Fix from stdin
cat rough.txt | bx fix
# Fix a file
bx fix diagram.txt
# Choose style: single (default), rounded, double, bold
echo '...' | bx fix --style rounded
# Fix diagrams inside markdown code blocks
bx fix --markdown README.mdsingle (default) rounded double bold
┌──────┐ ╭──────╮ ╔══════╗ ┏━━━━━━┓
│ Auth │ │ Auth │ ║ Auth ║ ┃ Auth ┃
└──────┘ ╰──────╯ ╚══════╝ ┗━━━━━━┛
- Parse — detect boxes, connections, and labels from rough ASCII/Unicode input
- Snap — align to a clean grid, preserving spatial layout
- Render — redraw with perfect Unicode box-drawing characters
Tolerates misaligned corners, overflowing labels, broken edges, and mixed ASCII/Unicode input.
MIT