{"id":18923,"library":"wavedrom-cli","title":"wavedrom-cli","description":"WaveDrom command-line interface for converting digital timing diagrams defined in JSON5/JS object notation into SVG or PNG images. Current stable version is 3.2.0, requiring Node.js >=12 (recommended v14+). It supports rendering signal groupings and outputs SVG natively; PNG export uses the native SVG renderer. Unmaintained for some time (last significant release v0.3.x), with breaking changes from prior versions that relied on PhantomJS. Key differentiator: enables programmatic and CI-based generation of timing diagrams without a browser.","status":"maintenance","version":"3.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/wavedrom/cli","tags":["javascript","WaveDrom"],"install":[{"cmd":"npm install wavedrom-cli","lang":"bash","label":"npm"},{"cmd":"yarn add wavedrom-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add wavedrom-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This is a CLI tool, not a library. Use npx or global install.","wrong":"npx wavedrom-cli -i input.js -s output.png","symbol":"none (CLI only)","correct":"npx wavedrom-cli -i input.json5 -s output.svg"}],"quickstart":{"code":"mkdir wavedrom-example && cd wavedrom-example\ncat > timing.json5 << 'EOF'\n{\n  signal: [\n    { name: \"clk\", wave: \"p.....|\" },\n    { name: \"data\", wave: \"x...345x|\" },\n    { name: \"addr\", wave: \"x...2x|\" }\n  ]\n}\nEOF\nnpx wavedrom-cli -i timing.json5 -s timing.svg","lang":"typescript","description":"Create a timing diagram from a JSON5 source file and export to SVG using wavedrom-cli."},"warnings":[{"fix":"Upgrade Node.js to v14 or later. Use nvm or similar.","message":"Node.js version: v14+ required. Lower versions may fail with SyntaxError or missing features.","severity":"gotcha","affected_versions":"<3.0.0"},{"fix":"Uninstall PhantomJS and use the npm package directly.","message":"PhantomJS-based versions (<=0.2.0) are completely different and incompatible with the current CLI. Do not mix.","severity":"breaking","affected_versions":"<=0.2.0"},{"fix":"Pipe SVG output to Inkscape: `wavedrom-cli -i input.json5 | inkscape -p --export-filename=output.png`","message":"The --png option uses native SVG-to-PNG conversion which may produce low-quality output. Consider using Inkscape for PNG export.","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Install globally with `npm i -g wavedrom-cli` or use `npx wavedrom-cli`.","cause":"Global install not found or npx not used.","error":"Error: Cannot find module 'wavedrom-cli'"},{"fix":"Use valid JSON5 (e.g., keys unquoted allowed, but no trailing commas).","cause":"JSON5 file contains JavaScript syntax that is not valid JSON5.","error":"SyntaxError: Unexpected token '.'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}