{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreihszaukkjuvr57w5heicgjtfsohlqjxauilwbj7ktoxucjoacavzm",
    "uri": "at://did:plc:t4aigbwuwix7x3q42qzjc6mn/app.bsky.feed.post/3mhuebtd63ya2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreiarvja3nxyesd2ra34odtnibzd4b4qbhg4btcjt2gtkl3pgke3mla"
    },
    "mimeType": "image/jpeg",
    "size": 22024
  },
  "path": "/link/535/17305149/apex-0-dot-1-100-image-rendering-in-terminal",
  "publishedAt": "2026-03-24T13:00:00.000Z",
  "site": "https://brett.trpstra.net",
  "tags": [
    "render Markdown to the terminal",
    "chafa",
    "viu",
    "catimg",
    "project changelog on GitHub",
    "on Mastodon",
    "Bluesky",
    "Twitter",
    "Click here if you'd like to help out.",
    "Mastodon",
    "GitHub",
    "everywhere else"
  ],
  "textContent": "Apex can render Markdown to the terminal (`-t terminal` or `-t terminal256`) with ANSI colors and themes. As of 0.1.100, it can also _draw images inline_ when stdout is a real TTY: your `![alt](path-or-url)` images show up as actual graphics instead of only link-style text.\n\n### What actually draws the image\n\nApex does not embed a rasterizer. It looks for an external viewer on your `PATH`, in this order:\n\n  1. **`imgcat`** (iTerm2-style inline images)\n  2. **chafa**\n  3. **viu**\n  4. **catimg**\n\n\n\nThe first one that exists wins. If none are found, or something fails, or you are piping output (not a TTY), you get the same **link-style** fallback as a normal terminal link: styled alt text plus the URL in parentheses.\n\nRemote **`http://`** and **`https://`** images are downloaded with **`curl`** (temp file under `TMPDIR` or `/tmp`, then deleted). There is a size cap and timeout so runaway downloads do not blow up your session.\n\n### Flags and metadata\n\n  * **`--no-terminal-images`** turns inline rendering off entirely (always link-style).\n  * **`--terminal-image-width N`** sets the maximum width in **character cells** (default 50). This is separate from **`--width`** , which wraps prose.\n\n\n\nYou can also set **`terminal.inline_images`** / **`terminal_inline_images`** and **`terminal.image_width`** / **`terminal_image_width`** in metadata or config.\n\n### Installing the viewers (macOS)\n\n**iTerm2** ships **`imgcat`** on your `PATH` when you use its utilities, so you may already have the first choice. The others are a quick Homebrew install:\n\n\n    # Optional: pick one or more (Apex uses the first available on PATH) brew install chafa viu catimg\n\nOn Linux, use your distro packages or the projects’ install notes; the same binary names apply.\n\n### Other stuff\n\nSince **0.1.95** , this line of releases also landed a bunch of other work. Highlights:\n\n  * **CSV/TSV includes** with custom **delimiters** (`{delimiter=X}` or `{;}`) across iA Writer, Marked, and MultiMarkdown include styles.\n  * **Metadata** handling improved: mode-aware extraction, better MultiMarkdown / Unified / Kramdown behavior, and **standalone HTML** now emits generic metadata as proper `<meta name=\"...\">` tags.\n  * **MultiMarkdown** includes and transclusions accept embedded delimiter overrides without breaking on braces in paths.\n  * **Swift** tooling: **`ApexC`** exposes the C API for SwiftPM, collision fixes for `apex_*` symbols, and **`NSString.defaultApexOptions()`** for plugins that need low-level options.\n  * **HTML output shape:** **`--to xhtml`** serializes void elements in XML style (`<br />`, self-closing `meta`/`link`, and so on). **`--to strict-xhtml`** goes further for full documents: with **`--standalone`** it adds polyglot XHTML scaffolding (XML declaration, XHTML namespace, `application/xhtml+xml` metadata). Use one or the other; they target different strictness levels.\n  * **Homebrew** formula updates for recent releases.\n\n\n\nIf you want the full blow-by-blow, see the project changelog on GitHub.\n\nLike or share this post on Mastodon, Bluesky, or Twitter.\n\n* * *\n\nBrettTerpstra.com is supported by readers like you. Click here if you'd like to help out.\n\nFind Brett on Mastodon, Bluesky, GitHub, and everywhere else.",
  "title": "Apex 0.1.100 - image rendering in terminal",
  "updatedAt": "2026-03-24T13:00:00.000Z"
}