Show HN: Open-source CLI that records your terminal into lightweight SVG demos

2 taoh 0 8/19/2025, 4:15:28 PM github.com ↗
Hi, HN!

Our team has been working on a suite of tools that help developers to better document their work. We released an open source tool [DeepGuide CLI](https://github.com/DeepGuide-Ai/dg) that records terminal and automatically convert it to SVG which can be copied and pasted, and allow search engine to index.

Why dg?

* Demo GIFs and Videos are large. dg replaces them with animated SVG, up to 50–100× smaller than equivalent GIFs, ensuring your README docs stays lightweight and fresh. * Demos aren’t just illustrative; they’re re‑run and validated in github CI, so if something breaks, the PR fails. * Works across any Node.js 18+ environment: macOS, Linux, and Windows (via WSL). We tried to use bun to build it into a binary program, but it was flakey due to the reliance on foundational programs. * Open source: Built on solid and awesome OSS foundations like asciinema, node‑pty, and termsvg, all with permissive licenses.

It's easy to use:

```bash # Install via npm (recommended): sudo npm install -g @deepguide-ai/dg

# Or run without installing: npx @deepguide-ai/dg init ```

Once installed, you can just run `dg capture` which will start a pty that allows you to run any terminal programs. After exiting, the recording will automatically be converted to a SVG in your local folder. It streamlines the process of downloading asciinema, installing it, recording your workflow, and converting the cast to SVG into a single command.

Moreover, the recordings were saved into CI action folder. You can easily add them to your Github actions to re-run the workflow as part of CI.

If you’re tired of outdated CLI screenshots or bloated GIFs, dg might be just the tool for you — lightweight, automatic, and CI-friendly.

Do you think such tool is useful? Do you think it would help console devs to better document their work? Or is it useful to record CLI tools such as Claude Code or Gemini CLI sessions and share with others as SVGs? Would love your feedback, issues, or PRs!

Comments (0)

No comments yet