{"id":26126,"library":"puml2c4","title":"puml2c4","description":"puml2c4 is a PlantUML C4 to LikeC4 transpiler (v0.2.0, early stage, pre-1.0). It converts existing PlantUML C4 diagrams into the LikeC4 DSL format, enabling interactive visualizations with drill-down and auto-layout. Supports persons, systems, containers, components, boundaries, deployment nodes, and relationships with standard PlantUML C4 syntax. Unlike manual conversion, puml2c4 automates the migration of PlantUML-based architecture diagrams to LikeC4 without rewriting. Currently supports Node.js >=18 and is distributed as an npm package with TypeScript type declarations. Release cadence is irregular; users should expect breaking changes until 1.0.","status":"active","version":"0.2.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","plantuml","c4","c4-model","likec4","architecture","diagram","transpiler","converter","typescript"],"install":[{"cmd":"npm install puml2c4","lang":"bash","label":"npm"},{"cmd":"yarn add puml2c4","lang":"bash","label":"yarn"},{"cmd":"pnpm add puml2c4","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"puml2c4 is a CLI tool, not a library. Use via npx or global install.","wrong":"import puml2c4 from 'puml2c4'","symbol":"puml2c4","correct":"npx puml2c4 convert <input> -o <output>"}],"quickstart":{"code":"mkdir -p diagrams out\ncat > diagrams/sample.puml << 'EOF'\n@startuml\n!include C4_Context.puml\nPerson(user, \"User\", \"A customer\")\nSystem(app, \"Application\", \"Main system\")\nSystem_Ext(email, \"Email Service\")\nRel(user, app, \"Uses\", \"HTTPS\")\nRel(app, email, \"Sends notifications\", \"SMTP\")\n@enduml\nEOF\nnpx -y puml2c4@0.2.0 convert diagrams/ -o out/context.c4","lang":"bash","description":"Converts a directory of PlantUML C4 files to LikeC4 format using npx."},"warnings":[{"fix":"Pin version in CI scripts: 'npx puml2c4@0.2.0'","message":"v0.2.0 is pre-1.0; breaking changes may occur without major version bump.","severity":"deprecated","affected_versions":"0.x"},{"fix":"Use 'mkdir -p <dir>' before running convert.","message":"Output directory must exist; tool does not create intermediate directories automatically.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Manually adjust layout in LikeC4 after conversion.","message":"Some PlantUML C4 features like 'Lay_D' or 'Layout_LeftRight' are not supported.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Use child_process.exec() if integration needed, but not officially supported.","message":"Tool is meant for CLI use; there is no JavaScript API exported.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Create the output directory before running: mkdir -p out/","cause":"Output directory does not exist.","error":"Error: ENOENT: no such file or directory, open '<path>/<file>.c4'"},{"fix":"Simplify the diagram to only supported elements (see README). Remove unsupported macros like Lay_D.","cause":"Input file contains unsupported PlantUML C4 syntax or syntax error.","error":"Error: Unexpected token '}' ..."},{"fix":"Use npx puml2c4 or npm install -g puml2c4 then puml2c4.","cause":"Using import/require instead of CLI npx or global install.","error":"Error: Cannot find module 'puml2c4'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}