
cli-anything-mermaid
Command-line interface for Mermaid Live Editor - Create, edit, and render Mermaid diagrams via stateful project files and mermaid.ink renderer URLs. Designed for AI agents and power users who need to generate flowcharts, sequence diagrams, and other visualizations without a GUI.
- Installs
- 521
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/hkuds/cli-anything --skill cli-anything-mermaid- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads cli-anything-mermaid automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
cli-anything-mermaid
Create, edit, and render Mermaid diagrams via stateful project files and the mermaid.ink renderer. Designed for AI agents and power users who need to generate flowcharts, sequence diagrams, and other visualizations without a GUI.
Installation
This CLI is installed as part of the cli-anything-mermaid package:
pip install cli-anything-mermaid
Prerequisites:
- Python 3.10+
- No external software required (rendering uses mermaid.ink cloud service)
Usage
Basic Commands
# Show help
cli-anything-mermaid --help
# Start interactive REPL mode
cli-anything-mermaid
# Create a new project
cli-anything-mermaid project new -o diagram.json
# Run with JSON output (for agent consumption)
cli-anything-mermaid --json project info
REPL Mode
When invoked without a subcommand, the CLI enters an interactive REPL session:
cli-anything-mermaid
# Enter commands interactively with tab-completion and history
Command Groups
Project
Project lifecycle commands.
| Command | Description |
|---|---|
new | Create a new Mermaid project with optional sample preset and theme |
open | Open an existing Mermaid project file |
save | Save the current project to a file |
info | Show current project information |
samples | List available sample diagram presets |
Diagram
Diagram source manipulation commands.
| Command | Description |
|---|---|
set | Replace the Mermaid source text (inline or from file) |
show | Print the current Mermaid source code |
Export
Render and share commands.
| Command | Description |
|---|---|
render | Render the diagram to SVG or PNG via mermaid.ink |
share | Generate a Mermaid Live Editor URL for sharing |
Session
Session state commands.
| Command | Description |
|---|---|
status | Show current session state |
undo | Undo the last diagram source change |
redo | Redo the last undone change |
Examples
Create and Render a Flowchart
# Create a project with flowchart sample
cli-anything-mermaid project new --sample flowchart -o flow.json
# Replace diagram source
cli-anything-mermaid --project flow.json diagram set --text "graph TD; A-->B; B-->C;"
# Render to SVG
cli-anything-mermaid --project flow.json export render output.svg --format svg
Create a Sequence Diagram
# Create project with sequence sample
cli-anything-mermaid project new --sample sequence -o seq.json
# Set diagram from file
cli-anything-mermaid --project seq.json diagram set --file my_diagram.mmd
# Render to PNG
cli-anything-mermaid --project seq.json export render output.png --format png
Share a Diagram
# Generate an editable Mermaid Live URL
cli-anything-mermaid --project flow.json export share --mode edit
# Generate a view-only URL
cli-anything-mermaid --project flow.json export share --mode view
Interactive REPL Session
cli-anything-mermaid
# new flowchart
# set graph TD; A-->B; B-->C;
# render output.svg
# share
# quit
State Management
The CLI maintains session state with:
- Undo/Redo: Revert or replay diagram source changes
- Project persistence: Save/load project state as JSON
- Session tracking: Track modifications and changes
Output Formats
All commands support dual output modes:
- Human-readable (default): Tables, colors, formatted text
- Machine-readable (
--jsonflag): Structured JSON for agent consumption
# Human output
cli-anything-mermaid project info
# JSON output for agents
cli-anything-mermaid --json project info
For AI Agents
When using this CLI programmatically:
- Always use
--jsonflag for parseable output - Check return codes - 0 for success, non-zero for errors
- Parse stderr for error messages on failure
- Use absolute paths for all file operations
- Verify outputs exist after render operations
More Information
- Full documentation: See README.md in the package
- Test coverage: See TEST.md in the package
- Methodology: See HARNESS.md in the cli-anything-plugin
Version
1.0.0
FAQ
What does the cli-anything-mermaid skill do?
Command-line interface for Mermaid Live Editor - Create, edit, and render Mermaid diagrams via stateful project files and mermaid.ink renderer URLs. Designed for AI agents and power users who need to generate flowcharts, sequence diagrams, and other visualizations without a GUI.
How do I install cli-anything-mermaid?
Run npx skills add https://github.com/hkuds/cli-anything --skill cli-anything-mermaid in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/cli-anything-mermaid/ (personal) or .claude/skills/cli-anything-mermaid/ (project).
Which AI agents can use cli-anything-mermaid?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is cli-anything-mermaid safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains cli-anything-mermaid?
It is published by hkuds in hkuds/cli-anything. It has 521 recorded installs.
More from hkuds/cli-anything
cli-hub-meta-skill
hkuds/cli-anything
Discover agent-native CLIs for professional software. Access the live catalog to find tools for creative workflows, productivity, AI, and more.
cli-anything
hkuds/cli-anything
Use when the user wants Codex to build, refine, test, validate, or list CLI-Anything harnesses for GUI applications or source repositories. Adapts the full CLI-Anything methodology to Codex without changing the generated Python harness format.
cli-anything-blender
hkuds/cli-anything
Command-line interface for Blender - A stateful command-line interface for 3D scene editing, following the same patterns as the GIMP CLI ...
cli-anything-obsidian
hkuds/cli-anything
Command-line interface for Obsidian — Knowledge management and note-taking via Obsidian Local REST API. Designed for AI agents and power users who need to manage notes, search the vault, and execute commands without the GUI.
cli-anything-notebooklm
hkuds/cli-anything
Experimental NotebookLM harness for listing notebooks, managing sources, asking questions, generating artifacts, and downloading outputs through an installed notebooklm CLI.
cli-anything-libreoffice
hkuds/cli-anything
Command-line interface for Libreoffice - A stateful command-line interface for document editing, producing real ODF files (ZIP archives with ...
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.