Skip to content
You are reading v0.8.0. Read the latest stable guide

CLI reference ​

These commands describe Doc42 0.8.0. Run doc42 <command> --help for all options.

CommandPurposeAccess
doc42 list <model>Find document views; --json includes metadataFree
doc42 check <model>Validate model and documents; --json reports diagnosticsFree
doc42 build <model>Generate a PDF, or all documents with --allActive Doc42 access
doc42 ir <model>Inspect the document IR as JSONActive Doc42 access
doc42 loginValidate and save an API token from hidden input or stdinOnline
doc42 logoutRemove the saved token and cached licensesLocal
doc42 licenseReport token source, license status and expiryUses cache or online exchange
doc42 template listList built-in layoutsFree
doc42 template export <name> <dir>Copy a layout for customizationFree

Model and output options ​

  • <model> is a .sysml file or directory; default is the current directory.
  • Repeat --library-path <directory> for project libraries.
  • --workspace-root <directory> widens the workspace boundary for a single-file input.
  • --cache-dir <directory> selects the model cache, separate from the license cache.
  • --doc <qualified-name> selects a document for check, build or ir.
  • --all builds every document; it conflicts with --doc.
  • --out <directory> chooses the PDF directory (default out).
  • --template <name-or-directory> overrides the document layout for build.
  • --draft renders explicitly labeled draft output; errors still cause failure.
  • --min-text-size <pt> and --strict control figure readability checks.

Exit codes ​

0 means success; 1 means validation errors; 2 means command, authentication, loading, selection, output or rendering failure. A rendered draft is not a release artifact. See automation for JSON diagnostics and manifests.

Models and documents stay local. License retrieval and refresh require online access.