Docs / Agents and API

Command line

Check, render and verify diagrams on your own machine, with no account and no network.

On this page

The volley command line tool runs Volley's parser and renderer on your own machine. It needs no account and no network, and it is not metered.

Install

The tool lives in the Volley repository and runs on Node 24 or later, with no build step:

bash
node bin/volley.ts check flow.volley

From the repository you can also run it with npm run volley -- <command>, link it as a volley command with npm link, or run it in Docker with docker compose run --rm cli <command> <file>. It is not published to npm.

Every command reads a file, or standard input when the file is -:

bash
cat flow.volley | node bin/volley.ts check -

PNG images exported from Volley work as input too, because they carry their source.

Commands

CommandDoes
check <file>Lists problems as file:line:column: severity: message, or says ok with the number of lanes
describe <file>Prints the diagram as Markdown, payloads included
json <file>Prints the parsed diagram as JSON
svg <file>Prints an SVG image
url <file>Prints a share link that carries the diagram
har <file>Converts a HAR recording into Volley source
verify <diagram> <har>Checks a diagram against a recording
helpPrints usage

check

bash
node bin/volley.ts check flow.volley

Exits with 1 when there is an error. Warnings do not fail the check, so it is safe to use in CI and in pre-commit hooks.

describe and json

Both print their output even when the diagram has errors, and exit with 1 if it does.

svg

bash
node bin/volley.ts svg flow.volley --theme dark --payloads > flow.svg
OptionEffect
--theme light or --theme darkThe appearance. Light is the default.
--payloadsDraw payloads under their messages
--no-badgeLeave out the "Made with Volley" badge

url

bash
node bin/volley.ts url flow.volley

Prints a share link like https://volley.sh/#src=.... Use --base <url> to point it at another Volley address.

har

bash
node bin/volley.ts har checkout.har --host api.example.com --title "Checkout" > checkout.volley

Converts a recording the same way the editor's HAR import does, with the same redaction, and with no limit on the number of requests.

OptionEffect
--host <text>Keep only requests whose host contains the text
--title <text>The diagram's title
--headersInclude the request line and useful headers in payloads
--allKeep static assets such as images and scripts

Exits with 1 when no requests match.

verify

bash
node bin/volley.ts verify checkout.volley checkout.har

Runs a drift check and prints a report with one line per checked step.

OptionEffect
--strictAlso fail when the recording has requests the diagram does not mention
--jsonPrint the full report as JSON, as the HTTP API returns it
--host <text>Check only requests to hosts containing the text
--allInclude static assets
Exit codeMeaning
0The diagram matches the recording
1The diagram has drifted, or with --strict, the recording has undocumented requests
2The check could not run: a missing argument, an unreadable file, or errors in the diagram

Suggested

↑↓ moveEnter openEsc close

Keyboard shortcuts

/ or Ctrl+KSearch the docs
↑ ↓Move through search results
EnterOpen the highlighted result
Ctrl+EnterOpen the result in a new tab
[ and ]Previous and next page
g then hDocs home
tBack to the top of the page
?Show these shortcuts
EscClose a dialog

The editor has its own shortcuts. See Keyboard shortcuts.