Skip to main content
Live UtilityCLI & Tooling2025

Papyrus CLI

Instant terminal-based article & documentation reader with dark theme

Tech Stack:TypeScriptNode.jsInkCheerioCommander
01 / Problem Statement

What needed to be solved

Reading documentation and tech articles often involves dealing with popups, auto-playing video ads, and bloated navigation headers that break focus.

02 / Technical Approach

How I engineered the solution

Built a CLI binary that fetches web pages, parses raw HTML content, strips unnecessary layout noise, and renders formatted markdown directly into your terminal.

03 / System Architecture

Core components & data flow

  • Commander.js CLI argument parsing pipeline
  • Cheerio & Turndown HTML content extraction engine
  • Ink React-based terminal rendering component layout
04 / The Hardest Technical Part

The bottleneck & breakthrough

Preserving syntax highlighting for code snippets embedded inside nested HTML pre tags across various terminal color themes.

05 / Development Process & Iterations

Engineering chronology & pivots

Initial Approach

Initially relied on simple regex HTML stripping. This broke code block formatting, merged text paragraphs together, and stripped essential technical code snippets.

Architectural Pivot

Adopted a structural AST pipeline using Cheerio DOM parsing combined with Turndown markdown conversion, preserving clean hierarchy and code blocks.

Technical Breakthrough

Implemented Ink React components to render ANSI terminal text with responsive terminal window width wrapping and dark mode syntax highlighting.

06 / Key Takeaways

What I Learned

Terminal layout primitives, ANSI color space escaping, and DOM sanitization techniques.

07 / Outcome

Measurable Result

Delivers instant distraction-free terminal reading in under 200ms per article fetch.

Need high-performance web systems built?

I craft custom full-stack web platforms, local-first architectures, and accessible design systems. Let's discuss your project.

Rana Aryan Logo
Rana Aryan

Personal portfolio & digital notebook hosted at ranaaryan.online

© 2026 Rana Aryan. Built with Next.js & Tailwind.