CI and automation
CI should answer two questions: is the source valid, and does the committed SVG match it? Keep the CLI local to the project so every developer and runner uses the same version.
Install locally
Section titled “Install locally”pnpm add --save-dev @ministryplace/flowmark-cli{ "scripts": { "diagrams:check": "flowmark check docs/architecture.flowmark", "diagrams:format": "flowmark format docs/architecture.flowmark --write", "diagrams:build": "flowmark render docs/architecture.flowmark --output docs/architecture.svg --theme light" }}Validate source
Section titled “Validate source”pnpm flowmark check docs/architecture.flowmarkWarnings and errors are written to stderr. The command exits non-zero when it finds an error. Add
--json when another tool will consume diagnostics.
Verify generated files
Section titled “Verify generated files”Render, then ask Git whether the committed output changed:
pnpm run diagrams:buildgit diff --exit-code -- docs/architecture.svgThis catches source changes whose generated image was not committed and renderer changes that need visual review.
GitHub Actions example
Section titled “GitHub Actions example”name: Diagrams
on: pull_request: push: branches: [main]
jobs: diagrams: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: node-version-file: package.json cache: pnpm - run: pnpm install --frozen-lockfile - run: pnpm run diagrams:check - run: pnpm run diagrams:build - run: git diff --exit-code -- docsUse your repository’s normal Node version source rather than copying a version into several workflow files.
Work with any editor
Section titled “Work with any editor”Flowmark files are text, so syntax-aware editor support is helpful but not required. The
first-party VS Code extension provides the full language service, live preview,
SVG export, and rendered Markdown fences in VS Code and compatible derivatives. Other editors can
run flowmark lsp --stdio through a standard LSP client.
Keep flowmark check in CI even when every contributor uses an editor extension, and do not make a
global CLI installation part of the team setup.
The complete command and flag contract is in the CLI reference.