New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mermaid-js/mermaid-cli

Package Overview
Dependencies
Maintainers
0
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mermaid-js/mermaid-cli

Command-line interface for mermaid

  • 11.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
110K
decreased by-3.97%
Maintainers
0
Weekly downloads
 
Created

What is @mermaid-js/mermaid-cli?

@mermaid-js/mermaid-cli is a command-line interface tool for generating diagrams and flowcharts from Mermaid code. It allows users to convert Mermaid syntax into various graphical formats such as SVG, PNG, and PDF, making it useful for documentation, presentations, and visualizations.

What are @mermaid-js/mermaid-cli's main functionalities?

Generate SVG from Mermaid code

This command takes a Mermaid definition file (input.mmd) and generates an SVG file (output.svg) from it. SVG is a widely used vector graphic format that can be easily embedded in web pages.

npx mmdc -i input.mmd -o output.svg

Generate PNG from Mermaid code

This command converts a Mermaid definition file (input.mmd) into a PNG image (output.png). PNG is a popular raster graphic format suitable for various applications.

npx mmdc -i input.mmd -o output.png

Generate PDF from Mermaid code

This command converts a Mermaid definition file (input.mmd) into a PDF document (output.pdf). PDF is a versatile document format that is widely used for sharing and printing.

npx mmdc -i input.mmd -o output.pdf

Specify theme for the diagram

This command generates an SVG file (output.svg) from a Mermaid definition file (input.mmd) and applies the 'forest' theme to the diagram. Themes can be used to customize the appearance of the diagrams.

npx mmdc -i input.mmd -o output.svg -t forest

Watch mode for live updates

This command enables watch mode, which monitors the input Mermaid file (input.mmd) for changes and automatically regenerates the output SVG file (output.svg) whenever the input file is modified. This is useful for live editing and previewing.

npx mmdc -i input.mmd -o output.svg -w

Other packages similar to @mermaid-js/mermaid-cli

FAQs

Package last updated on 03 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc