HN
Today

Show HN: SmallDocs - Markdown without the frustrations

SmallDocs introduces a clever CLI and webapp for previewing and sharing Markdown files with a privacy-first, client-side approach using URL fragments. This innovative solution resonated with HN for its technical elegance in handling sensitive data and the author's rapid iteration, which included implementing a privacy-focused short URL feature. It's a compelling tool for developers seeking efficient and secure Markdown workflows, especially those involving AI agents.

40
Score
22
Comments
#16
Highest Rank
3h
on Front Page
First Seen
Apr 16, 5:00 AM
Last Seen
Apr 19, 12:00 AM
Rank Over Time
161623

The Lowdown

SmallDocs (SDocs) is an open-source command-line interface (CLI) and companion web application designed to simplify the previewing and sharing of Markdown files while prioritizing user privacy. Developed in response to the growing prevalence of Markdown in command-line and AI agent workflows, SDocs aims to address common frustrations associated with reading, previewing, and securely sharing .md content.

  • Privacy-Centric Sharing: SDocs embeds the entire Markdown document content, compressed and base64-encoded, directly into the URL fragment (the part after '#'). This ensures that the document's content is never sent to the server, remaining client-side and fully private.
  • Instant Preview & Sharing: A simple sdoc path/to/file.md command instantly opens the rendered Markdown in a browser, ready for preview or immediate sharing.
  • Advanced Styling & Features: The tool supports rich styling and charting capabilities through YAML Front Matter, allowing users to customize appearance and embed visual data. These styles travel with the shared URL.
  • AI Agent Integration: SDocs is particularly useful for workflows involving AI agents, facilitating the sharing of debugging reports and structured output from large language models.
  • Optional Short URLs: Recognizing the potential for long fragment URLs, the author quickly implemented a privacy-focused short URL feature. This encrypts the document client-side, sends the encrypted blob to the server, and keeps the decryption key in the URL fragment.

By cleverly leveraging URL fragments for privacy and offering robust rendering features, SDocs positions itself as a valuable utility for developers seeking a more efficient and secure way to handle Markdown content in modern development environments, especially those incorporating AI.

The Gossip

Fragmented Privacy and Lengthy URLs

A central discussion revolved around the innovative use of URL fragments to ensure privacy by keeping Markdown content client-side. While lauded for privacy, this technique led to concerns about excessively long URLs. The author swiftly addressed this by implementing a "privacy-focused optional shorter URLs" feature, which encrypts content on the client, stores the encrypted blob on the server, and keeps the decryption key solely in the URL fragment. Debate ensued regarding the true provability of client-side privacy, with users questioning JavaScript's access and the author exploring potential "agent review" solutions.

Markdown's Modern Maneuvers

Commenters highlighted various practical applications for SDocs, from simplifying the conversion and display of long texts to enabling "branded" markdown for client-facing content. A key interest lay in its utility for AI agent workflows, particularly for sharing debugging reports and extracting structured output. The discussion also touched on the potential for token reduction in AI contexts and the possibility of extending the fragment-based, privacy-first approach to other file formats like CSVs, hinting at a broader future for client-side web applications.

Naming Nuances & Project Peril

A minor but pertinent point of discussion emerged around the project's name, "SmallDocs" or "SDocs." A commenter warned the author about the existence of a commercial company with a very similar name (sdocs.com), suggesting potential trademark or naming conflicts. The author acknowledged this concern, recognizing the common challenge of securing unique project names in a crowded digital landscape.