Skip to main content
Version: v5.7.0

opschain docs export

Included from Basic tier

Write every embedded page to a directory as raw markdown (front matter included where a page carries it), preserving the slug tree (cli/…, resources/…, getting-started/…) as subdirectories — for intranets, printing, or feeding a docs site:

opschain docs export
exported 31 reference pages (the set embedded in opschain 1.2.3) to /work/demo/opschain-reference
FlagMeaning
-o, --output <dir>Directory to write the pages to (created if missing; a relative path resolves against the working directory). Default opschain-reference.
--internalAlso write audience-internal pages (audience: internal front matter — engineering evidence pages). Excluded by default, like every user-facing surface.
--siteAlso write the publishable statics for a per-release docs site: an index.html shell linking every exported page, and under api/ both OpenAPI documents (openapi.yaml, openapi-v2.yaml, stamped with this binary's build identity) with their rendered HTML references (v1.html, v2.html — the same self-contained pages the server serves at /api/docs/api-reference). Output is deterministic: two runs of the same binary are byte-identical, so release-to-release diffs stay reviewable.

Entitlement-gated pages (entitlement: packs:<name> front matter) are always exported — the page's front matter carries the requirement.

Sample outputs that show a release version are written with this binary's own version (the same substitution every rendered docs surface applies), so an exported set always describes the build that exported it — with --internal included.

With --site the export directory is the complete markdown + static set for one release of docs.opschain.io:

opschain-reference/
index.html the shell page linking everything below
api/openapi.yaml the v1 OpenAPI document (stamped)
api/openapi-v2.yaml the v2 OpenAPI document (stamped)
api/v1.html the rendered v1 API reference with sample payloads
api/v2.html the rendered v2 API reference with sample payloads
<slug>.md … the markdown pages, exactly as without --site

Note the local -o/--output names the directory, shadowing the global output-format flag — the command's only output is its summary line, so there is no format to select.

Exit codes: 0 on success, 1 when a file cannot be written, 2 for a stray argument.

See also​

  • opschain docs cli/learn-export — the same escape hatch for the runbooks.