LikeC4
$ likec4 Official Low RiskLikeC4 (likec4) compiles .c4 architecture-as-code models into interactive diagrams, structured JSON layout models (likec4 export json), Draw.io files, and PNGs. Agents can validate .c4 syntax with likec4 validate and inspect computed architecture views programmatically via likec4 export json -o model.json.
npm install likec4 Validating .c4 architecture DSL models and exporting structured JSON graphs via likec4 export json runs directly in the repository with zero MCP friction.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports zero-write likec4 validate, structured likec4 export json --pretty (with --skip-layout), and clean CLI subcommands.
likec4 validatefor syntax checks andlikec4 export jsonfor structured output- Consistent
--helpand non-interactive flags
Offline local DSL compiler writing only to -o / --outdir.
- Zero network credentials or remote uploads during export
Easy npm / npx install, though likec4 export png requires Playwright/Chromium while json/drawio work out of the box.
- Node.js package; PNG export requires Playwright browser binaries
Modern C4 DSL with json, png, drawio, and markdown exports plus Graphviz WASM or native dot layout.
- Multi-format C4 export including Draw.io and JSON
Official LikeC4 project (likec4/likec4) actively developed under MIT.
- Active releases on GitHub
Clear CLI reference at likec4.dev/tooling/cli/.
- Official CLI docs at likec4.dev/tooling/cli/
Security, Auth & Guardrails
None required; evaluates local .c4 architecture workspaces offline.
100% free, offline, and open-source (MIT).
# LikeC4 Agent Rules - Always run `npx likec4 validate` after editing `.c4` files before exporting diagrams. - Prefer `likec4 export json` (pass `--skip-layout` if Graphviz/WASM layout is unneeded) or `export drawio` when Playwright is unavailable for PNG. - Do not invoke `likec4 start` synchronously without backgrounding.
Agent-Ready Command Recipes
Safe Read-Only Queries
npx likec4 validate
Parses and validates all .c4 files in the workspace without generating output artifacts.
Controlled Writes & Previews
npx likec4 export json -o likec4-model.json --pretty
Writes the parsed C4 model and computed view layouts to likec4-model.json.
npx likec4 export png -o ./diagrams
Renders each C4 view into PNG files under ./diagrams.
Strengths for Agents
- + Clean
likec4 validatesyntax checking andlikec4 export jsonfor agent inspection of C4 models. - + Exports to
png,jpg,drawio,markdown, andjsonfrom a single.c4source of truth.
Caveats & Pitfalls
- ! Raster
png/jpgexport requires Playwright/Chromium; usejsonordrawioin minimal headless containers. - ! Launching
likec4 startblocks as a dev server.