Apex 0.1.100 - image rendering in terminal
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  images show up as actual graphics instead of only link-style text.
What actually draws the image
Apex does not embed a rasterizer. It looks for an external viewer on your PATH, in this order:
imgcat(iTerm2-style inline images)- chafa
- viu
- catimg
The 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.
Remote 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.
Flags and metadata
--no-terminal-imagesturns inline rendering off entirely (always link-style).--terminal-image-width Nsets the maximum width in character cells (default 50). This is separate from--width, which wraps prose.
You can also set terminal.inline_images / terminal_inline_images and terminal.image_width / terminal_image_width in metadata or config.
Installing the viewers (macOS)
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:
# Optional: pick one or more (Apex uses the first available on PATH) brew install chafa viu catimg
On Linux, use your distro packages or the projects’ install notes; the same binary names apply.
Other stuff
Since 0.1.95 , this line of releases also landed a bunch of other work. Highlights:
- CSV/TSV includes with custom delimiters (
{delimiter=X}or{;}) across iA Writer, Marked, and MultiMarkdown include styles. - Metadata handling improved: mode-aware extraction, better MultiMarkdown / Unified / Kramdown behavior, and standalone HTML now emits generic metadata as proper
<meta name="...">tags. - MultiMarkdown includes and transclusions accept embedded delimiter overrides without breaking on braces in paths.
- Swift tooling:
ApexCexposes the C API for SwiftPM, collision fixes forapex_*symbols, andNSString.defaultApexOptions()for plugins that need low-level options. - HTML output shape:
--to xhtmlserializes void elements in XML style (<br />, self-closingmeta/link, and so on).--to strict-xhtmlgoes further for full documents: with--standaloneit adds polyglot XHTML scaffolding (XML declaration, XHTML namespace,application/xhtml+xmlmetadata). Use one or the other; they target different strictness levels. - Homebrew formula updates for recent releases.
If you want the full blow-by-blow, see the project changelog on GitHub.
Like or share this post on Mastodon, Bluesky, or Twitter.
BrettTerpstra.com is supported by readers like you. Click here if you'd like to help out.
Find Brett on Mastodon, Bluesky, GitHub, and everywhere else.
Discussion in the ATmosphere