Skip to main content
Monogrid ensures every line in a Unicode box drawing has the same visual width — accounting for CJK characters (2 columns), emoji (2 columns), combining marks (0 width), and ASCII (1 column). The width tables are Q.E.D verified across xterm.js, Alacritty, and Ghostty. Published contract: monogrid 0.2.1, OpenCLIs build 2026-05-23-201214. The executing binary, registry, and public CDN metadata agree on this release. The published dispatcher has six operational roots: check, fix, qed, structure, report, and --mcp-schema (mcp-schema alias), plus help/version aliases and implicit file checking. Current source adds docs as a seventh root, but that source-ahead command is not in the public build above.

Quick Start

Monogrid is a standalone native binary with no Python runtime dependency.

Installation

Install the current public payload through OpenCLIs:

Commands

Passing files without a command is an implicit check.

Embedded Docs and MCP Boundary

The MCP schema contains exactly four commands: check, qed, structure, and report. It excludes fix, docs, help, and version. Monogrid also has no native --json result mode; typed MCP-to-CLI calls therefore return text. A schema entry proves argument mapping, not that a file passes alignment checks. Use monogrid help or this page for embedded guidance on the public build; monogrid docs becomes valid only after a later payload includes the current source dispatcher.

Published Platforms

All five artifacts expose the same file-oriented command parser. Shell glob expansion is still owned by the host shell, not by Monogrid itself.

check — Inspect Without Modifying

Implicit check: monogrid file.md works without the check keyword. Exit code 0 if no issues, 1 if issues found.

fix — Auto-Fix with Loop

Repeats check-fix cycles until 0 issues or max iterations reached.
This command modifies files in place.

qed — Q.E.D Deep Verification

Character-by-character width analysis. For each box:
  • Calculates visual width of every line
  • Lists every non-ASCII character with its Unicode codepoint and width
  • Groups by category (COMBINING, BMP_WIDE, HIGH_WIDE, DEFAULT)
  • Verifies recalculated width matches expected
Only meaningful after all issues are fixed.

structure — Structural Analysis

Detects inner boxes that overflow outer box boundaries. Shows left/right margins for each nested box. Cannot be auto-fixed — requires manual redesign.

report — Compact File Survey

One-line-per-file summary sorted by issue count. Useful for surveying large documentation sets before batch fixing.

Workflow


What It Checks

Monogrid enforces 9 alignment rules: Rules 1 and 6 are auto-fixable. All other rules require manual correction because they need semantic understanding of the diagram.

Width Rules

CodexMono renders characters at these widths:
Common mistake: ⚠ (U+26A0) is width 1, not 2. But ⚡ (U+26A1) is width 2. These are only 1 codepoint apart but have different widths. Monogrid’s tables handle this correctly.

Self-Verification

Monogrid’s own --help output passes monogrid check with 0 issues:

Origin

Monogrid began as the native Rust port of check-boxes.py v5.7. Its Unicode width tables were verified through ASURA research across xterm.js, Alacritty, and Ghostty; current release truth is owned by the Rust payload and its tests, not by historical source line counts.

Relationships