ascii-guard
A minimal-dependency Python linter for detecting and fixing misaligned ASCII art boxes in documentation
Decision gist · record as of 2026-08-14
Yes. The package solves a real problem (AI-generated ASCII art misalignment) with minimal supply-chain risk, zero dependencies on modern Python, active maintenance, and a stable API. No known vulnerabilities. Install if you maintain documentation with ASCII diagrams or generate them programmatically.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; Python 3.10 requires tomli as a runtime dependency (automatically installed).
- Low friction: pure wheel install with one optional runtime dependency (tomli) only for Python 3.10; Python 3.11+ requires no external dependencies.
- Active maintenance with recent commits and stable production status.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required but no copyleft obligations.
last release 2026-02-12 (183 days) · last repo commit 2026-08-10 · 26 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 125,238 downloads/mo, #11,830 on PyPI
Alternatives
Verify before relying
# Install
pip install ascii-guard
# CLI: lint a file
ascii-guard lint README.md
# CLI: auto-fix with preview
ascii-guard fix --dry-run README.md
# Python API
from ascii_guard import lint_file
result = lint_file("README.md")
if result.has_errors:
for error in result.errors:
print(f"Line {error.line + 1}: {error.message}")- Whether the package handles all edge cases in nested or overlapping ASCII box structures beyond the documented flowchart examples
- Performance characteristics on large documentation files with hundreds of boxes
What it is and what it does
ascii-guard is a linter and auto-fixer for ASCII art boxes commonly found in documentation. It detects misalignments where box borders (drawn with Unicode box-drawing characters like ─, │, ┌, ┐, └, ┘) are off by 1–2 characters, which is a frequent artifact in AI-generated diagrams. The tool validates vertical alignment of │ characters, horizontal alignment of ─ characters, corner correctness, width consistency across top/middle/bottom borders, and content fit within boxes.
It runs as both a CLI tool (lint and fix modes, with dry-run preview) and a Python library with functions like lint_file(), fix_file(), detect_boxes(), and validate_box(). The package has minimal dependencies—zero for Python 3.11+, one (tomli) for Python 3.10—and is built on the standard library, making it lightweight and fast to install and run.
Use it for
- Validate ASCII flowcharts and diagrams in markdown documentation before publishing to catch subtle alignment errors introduced by AI tools
- Auto-fix misaligned boxes in bulk across a documentation directory using the CLI or Python API in a CI/CD pipeline
- Integrate into a documentation build process to enforce consistent ASCII art formatting without manual review
- Show intentionally broken boxes in tutorials or before/after examples using ignore markers to skip validation on specific blocks
- Detect and report all ASCII boxes in a file programmatically for custom processing or metrics collection
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a real problem (AI-generated ASCII art misalignment) with minimal supply-chain risk, zero dependencies on modern Python, active maintenance, and a stable API. No known vulnerabilities. Install if you maintain documentation with ASCII diagrams or generate them programmatically.
Install
ascii-guard on PyPI
Before you install
Low friction: pure wheel install with one optional runtime dependency (tomli) only for Python 3.10; Python 3.11+ requires no external dependencies. Active maintenance with recent commits and stable production status.
Requires Python 3.10 or later; Python 3.10 requires tomli as a runtime dependency (automatically installed).
License in practice
Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required but no copyleft obligations.
Quickstart
# Install
pip install ascii-guard
# CLI: lint a file
ascii-guard lint README.md
# CLI: auto-fix with preview
ascii-guard fix --dry-run README.md
# Python API
from ascii_guard import lint_file
result = lint_file("README.md")
if result.has_errors:
for error in result.errors:
print(f"Line {error.line + 1}: {error.message}")
Verify before relying
- Whether the package handles all edge cases in nested or overlapping ASCII box structures beyond the documented flowchart examples
- Performance characteristics on large documentation files with hundreds of boxes
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetomli |
| Maintenance | Actively maintained 183 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 125,238 / month, #11,830 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Quality AssuranceTopic :: Text Processing |
Evidence: ascii_guard-2.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ascii art box alignment checker”
- ascii-guardDetects and fixes misaligned ASCII art boxes in documentation by…
- asciichartpyRenders line charts as ASCII art in the console using box-drawing…
- texttableCreates formatted ASCII tables for console output with support for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also asciichartpy · asciitree · art · ascii-magic · pyfiglet · asciidag · rich-pyfiglet · texttable · fold-to-ascii · skillsaw