SmallDocs: 마크다운 파일의 공유 및 미리보기 경험 혁신
요약
SmallDocs는 CLI와 웹 앱을 결합하여 마크다운(.md) 파일을 즉각적이고 100% 프라이빗하게 미리 보고 공유할 수 있게 해주는 도구입니다. 특히 AI 에이전트가 생성하는 민감한 코드베이스, 로그 등의 정보를 안전하게 다루기 위해 설계되었습니다. 핵심은 URL의 '프래그먼트(fragment)'를 사용하여 데이터를 클라이언트 측에서만 처리하고 서버는 내용을 전혀 알지 못하도록 하는 점입니다. 이를 통해 마크다운 파일의 스타일링 및 렌더링 기능을 확장하여, 단순한 문서 공유를 넘어 복잡한 데이터 시각화까지 지원합니다.
핵심 포인트
- SmallDocs는 `sdoc path/to/file.md` 명령어로 로컬 MD 파일을 브라우저에서 즉시 미리 보고 URL을 생성할 수 있습니다.
- 데이터 프라이버시를 위해, 마크다운 콘텐츠는 URL의 '프래그먼트'에 Base64로 압축되어 포함되며 서버 전송 시 제외됩니다.
- 사용자는 YAML Front Matter를 통해 커스텀 스타일(예: 폰트 패밀리, 기본 글꼴 크기)을 추가하여 공유된 문서의 디자인까지 제어할 수 있습니다.
- 이 도구는 AI 에이전트가 생성하는 디버깅 보고서나 실행 가능한 코드 블록 등 민감한 정보를 안전하게 공유하는 데 특히 유용합니다.
Show HN: SmallDocs – Markdown without the frustrations
Hi HN, I’d like to introduce you to SmallDocs (
https://sdocs.dev). SDocs is a CLI + webapp to instantly and 100% privately elegantly preview and share markdown files. (Code:
https://github.com/espressoplease/SDocs)
The more we work with command line based agents the more .md files are part of our daily lives. Their output is great for agents to produce, but a little bit frustrating for humans: Markdown files are slightly annoying to read/preview and fiddly to share/receive. SDocs was built to resolve these pain points.
If you sdoc path/to/file.md (after npm i -g sdocs-dev) it instantly opens in the browser for you to preview (with our hopefully-nice-to-look-at default styling) and you can immediately share the url.
The .md files our agents produce contain some of the most sensitive information we have (about codebases, unresolved bugs, production logs, etc.). For this reason 100% privacy is an essential component of SDocs.
To achieve this SDoc urls contain your markdown document's content in compressed base64 in the url fragment (the bit after the #):
https://sdocs.dev/#md=GzcFAMT...(this is the contents of your document)...
The cool thing about the url fragment is that it is never sent to the server (see https://developer.mozilla.org/en-US/docs/Web/URI/Reference/F...: "The fragment is not sent to the server when the URI is requested; it is processed by the client").
The sdocs.dev webapp is purely a client side decoding and rendering engine for the content stored in the url fragment. This means the contents of your document stays with you and those you choose to share it with, the SDocs server doesn't access it. (Feel free to inspect/get your agent to inspect our code to confirm this!)
Because .md files might play a big role in the future of work, SDocs wants to push the boundaries of styling and rendering interesting content in markdown files. There is much more to do, but to start with you can add complex styling and render charts visually. The SDocs root (which renders sdoc.md with our default styles) has pictures and links to some adventurous examples. sdoc schema and sdoc charts provides detailed information for you or your agent about how how make the most of SDocs formatting.
If you share a SDocs URL, your styles travel with it because they are added as YAML Front Matter - https://jekyllrb.com/docs/front-matter/ - to the markdown file. E.g.:
styles:
fontFamily: Lora
baseFontSize: 17
...
At work, we've been putting this project to the test. My team and I have found SDocs to be particularly useful for sharing agent debugging reports and getting easily copyable content out of Claude (e.g. a series of bash commands that need to be ran).
To encourage our agents to use SDocs we add a few lines about them in our root "agent files" (e.g. ~/.claude/CLAUDE.md or ~/.codex/AGENTS.md). When you use the cli for the first time there is an optional setup phase to do this for you.
I'm of course very interested in feedback and open to pull requests if you want to add features to SDocs.
Thank you for taking a look!
AI 자동 생성 콘텐츠
본 콘텐츠는 HN Claude Code Search의 원문을 AI가 자동으로 요약·번역·분석한 것입니다. 원 저작권은 원저작자에게 있으며, 정확한 내용은 반드시 원문을 확인해 주세요.
원문 바로가기