Skip to content
Beskid The Beskid Book

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

beskid doc

Emit API documentation (api.json v4 + index.md) for a resolved Beskid program.

beskid doc

Resolves a Beskid entrypoint (optional file path plus project flags), parses and resolves the program (including multi-file assembly when --project is used), and writes API documentation artifacts to disk.

ArgumentDescription
[INPUT]Optional .bd path (with --project resolution)
--projectProject directory or Project.proj path
--targetTarget name from the manifest
--workspace-memberWorkspace member when resolving via Workspace.proj
--frozenRequire lockfile match; forbid updates
--lockedRequire an existing lockfile
--outOutput directory (default doc-out); receives api.json and index.md

The root object includes:

  • schemaVersion: integer 4 (consumers must gate on this field; 3 remains supported without v4-only fields).
  • navigationModel: "graph-v1" when resolution succeeded — build navigation from parentId / memberIds only, not from splitting qualifiedName.
  • generator, source, items: metadata and a flat list of all resolved API symbols (documented or not).

Each item includes location, visibility, kind, names, graph ids, and compiler-derived signature, typeAnnotation fields (fieldType, returnType, parameters), plus optional documentation:

  • docMarkdown (optional): rendered Markdown for hovers and human-facing docs (same template the LSP uses for rich text).
  • doc (optional, object): structured fields: summaryMarkdown, returnsMarkdown, arguments, enumVariants, typeParameters. Derived from the same parse tree as docMarkdown.

See the api.json contract in the platform specification for normative field definitions.

Older consumers that only understand schema version 2 should treat unknown schemaVersion values as unsupported and fall back to Markdown-only fields when present.

Human-oriented index page generated alongside api.json for browsing in repositories or static doc hosts.

When run as part of packaging, artifacts are written under <sourceRoot>/.beskid/docs/ (for example .beskid/docs/api.json). The beskid pckg pack command copies those paths into the archive and records a documentation pointer in the embedded package.json so registries can open api.json without path heuristics.

Terminal window
beskid doc --project path/to/Project.proj --out doc-out

← Back to CLI command reference