Documentation menu

Start

Build and output

Understand the generated artifact bundle, its structure, and how to keep generated state out of version control.

Build a repository

The path argument selects the repository root. The compiler runs three default passes: repository intelligence, TypeScript/JavaScript frontend (semantic analysis via the TypeScript Compiler API), and OpenAPI frontend for API specs.

TERMINAL
pnpm exec ontoly build .

Build flags

Control build behavior with flags. Use --json for machine-readable output in CI, --no-cache to force a full rebuild, and --workers to control parallelism.

TERMINAL
ontoly build . --json
ontoly build . --no-cache
ontoly build . --workers 4
ontoly build . --no-html
ontoly build --remote https://github.com/org/repo

Artifact bundle

The build produces an ontoly-output directory with a layered artifact structure. Core facts (nodes, relationships) are separated from derived artifacts (reports, communities, indexes) so consumers depend on the narrowest stable contract.

  • SoftwareGraph.json — nodes and relationships
  • diagnostics.json — explainable warnings and failures
  • statistics.json — graph and compiler measurements
  • indexes.json — deterministic lookup indexes
  • semantic-model.json — TypeScript/JavaScript semantic analysis
  • coverage.json and quality.json — trust metrics
  • reports/ — architecture, API, dependency, framework reports
  • nodes/ and relationships/ — per-type sliced artifacts
  • communities/ — detected module communities
  • html/ — interactive graph and architecture explorers

Determinism

Identical source, configuration, and Ontoly version produce an identical graph with the same FNV-1a content hash. Use the hash as a regression signal in CI — if the code hasn't changed, the hash shouldn't change.

Version control

Add ontoly-output to .gitignore for most projects. The graph is fully reproducible from source. Keep it checked in only if you need to diff graph changes across commits without rebuilding.

TERMINAL
echo 'ontoly-output/' >> .gitignore