Zing Forum

Reading

amdv: A Lightweight Markdown Preview Tool Built for AI Agent Workflows

amdv is a Markdown previewer built on Tauri, designed specifically for AI Agent human-machine collaboration scenarios. It supports real-time refresh, interactive approval, and theme switching, enabling instant visual presentation of plan documents generated by Agents.

MarkdownTauriAI AgentClaude Code预览工具人机协作RustTypeScript
Published 2026-04-19 09:45Recent activity 2026-04-19 09:51Estimated read 7 min
amdv: A Lightweight Markdown Preview Tool Built for AI Agent Workflows
1

Section 01

amdv: Introduction to the Lightweight Markdown Preview Tool for AI Agent Workflows

amdv is a Markdown previewer built on Tauri, designed specifically for AI Agent human-machine collaboration scenarios. It corely addresses the discontinuity issues of traditional Markdown viewing methods, supporting real-time refresh, interactive approval, and theme switching. It enables instant visual presentation of plan documents generated by Agents, facilitating an efficient human-machine collaboration loop.

2

Section 02

Document Visualization Needs and Pain Points in the Agent Era

As AI programming assistants like Claude Code and Cursor enter mainstream development workflows, an interaction model where Agents generate content and humans review and confirm has formed. Markdown has become the preferred format for Agents to output plans, documents, and reports. However, traditional methods have obvious discontinuities: plain text reading makes it hard to quickly grasp hierarchical structures; opening in a browser requires starting a local server or relying on online services; and the lack of instant preview feedback for generated plan documents interrupts the Agent workflow. amdv is exactly the tool created to fill this gap.

3

Section 03

Tauri Architecture: Advantages of Integrating Rust and Web Frontend

amdv chooses Tauri as its technical foundation, which has significant advantages over Electron: extremely low resource consumption (installation package is usually a few MB, runtime memory usage is much lower than Electron); native performance (Rust backend handles file IO and system calls with millisecond-level response latency); and secure sandbox (strict content security policy is enabled by default, so previewing Markdown containing script tags does not threaten the system).

4

Section 04

Core Features: Seamless Connection Between Generation and Preview

  • Basic Preview Mode: Quickly start preview via CLI command amdv ./plan.md. Due to Tauri's lightweight nature, the startup time is usually less than one second;
  • Interactive Approval Mode: The -i parameter launches an interactive interface, providing Accept/Reject buttons and a comment input box, enabling the collaboration loop of Agent proposal → human review → decision → Agent adjustment;
  • Real-time Refresh Mechanism: Listens to source file changes and automatically re-renders without manual restart, suitable for iterative plan revisions.
5

Section 05

Theme System: Personalized Reading Experience

amdv has 7 built-in preset themes (default-light, default-dark, purple/blue/green/red, red-light), and configurations are persistently stored in ~/.config/amdv/config.json. CLI commands support viewing available themes (--list-themes) and setting themes (--set-theme), and also provide an extension guide for CSS custom themes.

6

Section 06

Installation Methods and Claude Code Integration

  • Developer Installation: After cloning the repository, execute pnpm install to install dependencies, pnpm tauri dev to start development mode, and pnpm build to generate a production build;
  • End-user Installation: pnpm install:app automatically detects the system and completes installation;
  • Claude Code Integration: Copy skill/using-amdv to the Claude skill directory. Agents can automatically call the preview in scenarios like generating architecture designs or project plans.
7

Section 07

Layered Testing Ensures Tool Reliability

amdv adopts a layered testing architecture: unit tests verify the correctness of pure logic and data conversion; component tests isolate UI behaviors; integration tests verify process integrity; Rust tests cover CLI and backend logic; E2E tests simulate end-to-end operation based on Playwright. The layered strategy balances quick feedback for daily development and final guarantee before release.

8

Section 08

Typical Scenarios and Conclusion

Typical Usage Scenarios: 1. Code refactoring plan review (interactive preview for decision-making); 2. Multi-solution comparison (side-by-side preview for selection); 3. Instant document preview (real-time refresh for iterative modifications). Open Source and Conclusion: amdv is fully open source under the MIT license, focusing on key links in Agent workflows and filling gaps in the ecosystem. It is a practical component worth adding to the toolbox for AI programming assistant users.