Skip to content

Your First Project

This guide follows the real new-project workflow end to end: scaffold a project, resolve the standard library, check the model, and build it to a standards format. Every command below is implemented in the current CLI.

deal init creates a project directory with a starter model and a deal.toml manifest:

Terminal window
deal init my-project
deal init: project 'my-project' created in ./my-project/
Next: cd my-project && deal install

It writes the following layout:

  • Directorymy-project/
    • deal.toml project manifest
    • .gitignore
    • Directorypackages/
      • starter.deal definitions (part, port, requirement)
    • Directorymodel/
      • starter.dealx composition + traceability
    • Directorysimulations/
    • Directorytest/data/
    • Directorydocs/
[project]
name = "my-project"
version = "0.1.0"
schema = "deal/0.1"
marking = "Unclassified"
description = "A DEAL project"
[workspace]
packages = ["packages/*"]
[dependencies]
deal-std = { git = "https://github.com/deal-lang/deal-stdlib", tag = "v0.4.0" }

deal-std is the standard library — SI and imperial units, base types, and standard math — resolved from the deal-stdlib repository.

packages/starter.deal holds the definitions:

package starter;
part def StarterPart {}
port def StarterPort {}
requirement def REQ_001 {
verification {
accepts: [analysis];
}
}

model/starter.dealx composes them and records traceability:

package model;
[<system StarterSystem>]
[<StarterPart as="part" />]
[</system>]
[<traceability>]
[<satisfy requirement="REQ_001" by="StarterSystem" method="analysis">]
[</satisfy>]
[</traceability>]
Terminal window
cd my-project
deal install
Downloading deal-std v0.4.0 from https://github.com/deal-lang/deal-stdlib...
deal install: 1 dependency resolved, deal.lock updated

This clones the git dependency into .deal/deps/ and writes a SHA-pinned deal.lock.

deal check parses every source, resolves imports, and runs semantic and dimensional analysis. It exits 0 when there are no error-severity diagnostics:

Terminal window
deal check

Point it at specific files or a directory to narrow the scope (deal check packages/starter.deal). Add --verify to evaluate requirement criteria against captured evidence, or --simulations to validate deal.sims.toml bindings.

Generate SysML v2 JSON for import into Cameo and other SysML v2 API tooling:

Terminal window
deal build --target sysml-v2 --output build/system.sysml.json

Generate a ReqIF archive for IBM DOORS and other requirements tools:

Terminal window
deal build --target reqif --output build/requirements.reqifz

Add --validate to run offline schema validation on the generated output before it leaves your machine.

You now have a working project and a build. Continue to Core Concepts to learn the building blocks — definitions, compositions, requirements, traceability, and units — behind the starter model.