Skip to main content

raggedy

Fix ragged right edges in LLM-generated ASCII/Unicode box diagrams.

LLMs consistently generate ASCII box diagrams with inconsistent right borders — missing corners, short rules, content lines without closing borders. raggedy autodetects these diagrams inside markdown fenced code blocks and fixes them.

Install & Run

# Run directly with uvx (no install needed)
uvx raggedy file.md

# Or install with pip/uv
pip install raggedy
raggedy file.md

Usage

raggedy [OPTIONS] FILE [FILE...]

Options:
  -b, --backup      Create .bak backup before editing
  --check           Exit 1 if changes needed (no modification; for CI)
  --diff            Show diff without modifying
  -h, --help        Show help

What It Fixes

Given a markdown file containing:

```
┌──────────────────┐
│ Header           │
├──────────────────┤
│ Row 1
│ Row 2 is longer content
│ Short
└──────────────────┘
```

Running raggedy file.md produces:

```
┌────────────────────────┐
│ Header                 │
├────────────────────────┤
│ Row 1                  │
│ Row 2 is longer content│
│ Short                  │
└────────────────────────┘
```

Supports both Unicode (┌│├└) and ASCII (+|-) box-drawing styles.

CI Usage

Use --check in CI to enforce clean diagrams:

raggedy --check docs/**/*.md

Local Development

When running raggedy from the working tree via uvx, use --no-cache so the latest local code is rebuilt and executed:

uvx --from . --no-cache raggedy -b mantissa.md

AGENTS/Skills Usage

If you drive raggedy via an AGENTS.md entry or a skills file, use uvx to run the local working tree explicitly. Example prompt:

Issue `uvx raggedy <file>` to fix ragged diagram edges in markdown.

See the full example in skills.md.

Metadata

Release files for raggedy 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for raggedy 0.1.2
File Size Uploaded Provenance
raggedy-0.1.2.tar.gz 18.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for raggedy 0.1.2
File Interpreter ABI Platform
raggedy-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 26.2 kB

Release files / raggedy-0.1.2.tar.gz

Download URL raggedy-0.1.2.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fde179532ff0000891f32f2a3052d0a64014b51daa522efcfc38b63223c02152
BLAKE2b-256 checksum
How to use checksums
ce8bf20deb365d61b216c08afab454606106d7df24a487f2bd84533ef71eab04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / raggedy-0.1.2-py3-none-any.whl

Download URL raggedy-0.1.2-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
609a9e40066a48702278d0e4e90b5934f7249a066cb0914f2324a1b9ccd7474e
BLAKE2b-256 checksum
How to use checksums
31061605a07e189af590e1e3212513b6926ae87d1f8047733a27295b0f3a61e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for raggedy 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page