Skip to content

Installation & CLI ​

The Dale CLI and SDK packages are published to nuget.org under the Vion.* package prefix. The Dale SDK source is available on GitHub at VION-IoT/dale-sdk.

Prerequisites ​

Install ​

bash
dotnet tool install -g Vion.Dale.Cli

Verify the installation:

bash
dale --version
# dale <version> - Vion IoT

Commands ​

dale new — Scaffold a Project ​

Creates a new logic block library with DevHost and test projects, a worked Thermostat block, a topology, and a scenario. Quick Start shows the generated tree.

bash
dale new MyLibrary

Use --no-interactive to skip prompts (useful in CI):

bash
dale new MyLibrary --no-interactive

dale build — Build ​

Builds the project and all dependencies.

bash
dale build

Unrecognized options forward to dotnet build. Pass a build configuration this way:

bash
dale build -c Release

dale test — Run Tests ​

Runs unit tests using the Dale TestKit.

bash
dale test
# Passed!  - Failed: 0, Passed: 4, Skipped: 0, Total: 4

Unrecognized options forward to dotnet test. Filter to a subset of tests this way:

bash
dale test --filter Name~Foo

dale dev — Local Development ​

Starts the DevHost with a web UI for live testing.

bash
dale dev
# DevHost Web UI running at http://localhost:5000

The DevHost takes port 5000, or the next free port when 5000 is taken, and prints the address it bound.

The DevHost lets you inspect and modify property values, simulate inputs, and debug logic block behavior — all in your browser.

Options:

FlagDescription
--headlessRun without opening a browser. Serves the control API and prints a JSON readiness line on stdout — for tools, CI, and agents.
--steppedBoot in deterministic stepping mode (a controllable virtual clock) so Scenarios step exactly instead of waiting on the wall clock.
--export-config <file>Boot the wired network, write its configuration as JSON to <file>, and exit — the data source for dale scenario validate and dale scenario schema. See Scenarios.
--export-topology <file>Boot the wired network, write it as a *.topology.json dev profile to <file>, and exit — the migration path from a C# preset to a topology file.
--preset <name>Pass <name> as the DevHost app's first program argument (args[0]) to select a consumer-defined preset. Combines with --export-config / --export-topology to export a non-default preset.

Extra arguments after -- forward to the DevHost app:

bash
dale dev -- my-preset

dale list — Introspect Project ​

Shows all logic blocks, contracts, properties, and measuring points.

bash
dale list
text
  Project: MyDemo (v0.0.1)
  SDK: Vion.Dale.Sdk <version>

┌ HelloWorld ─────────────────┐
│ Properties │ Greeting       │
│ Measuring  │ TimesGreeted   │
└─────────────────────────────┘

┌ SmartLedController ──────────────────────────────────────────┐
│ Contracts  │ Button (DigitalInput), LED (DigitalOutput)      │
│ Properties │ Mode, LedEnabled, BlinkIntervalSeconds          │
│ Measuring  │ ButtonPressed, TotalBlinks, ButtonPressCount    │
│ Interfaces │ IToggleable                                     │
└──────────────────────────────────────────────────────────────┘

Use --output json for machine-readable output (useful for CI/CD and AI agents):

bash
dale list --output json
json
{
  "packageId": "MyDemo",
  "version": "0.0.1",
  "sdkVersion": "<version>",
  "logicBlocks": [
    {
      "name": "HelloWorld",
      "fullName": "MyDemo.LogicBlocks.HelloWorld",
      "interfaces": [],
      "contracts": [],
      "services": [{
        "name": "HelloWorld",
        "includedWhen": null,
        "properties": [{ "name": "Greeting", "type": "string" }],
        "measuringPoints": [{ "name": "TimesGreeted", "type": "int32" }]
      }]
    }
  ]
}

type is the schema type label — string, int32, double, boolean, an enum or struct name, X[] for arrays, with a ? suffix when nullable — not the CLR type name. includedWhen carries the service's [IncludedWhen] predicate, or null when the service is ungated; see Instantiation Parameters & Inclusion Gates.

The fullName and name values are the introspection identifiers the VION Cloud uses as translation keys — this is the reliable way to read them before a rename. See Translations.

dale scenario — Scenario Files ​

Runs, validates, and scaffolds *.scenario.json checks against the DevHost.

bash
dale scenario validate

The verbs run, validate, schema, scaffold, and open are documented in Scenarios.

dale topology — Topology Files ​

Validates *.topology.json files and writes their editor schema, with no DevHost running.

bash
dale topology validate

The verbs validate and schema are documented in Scenarios.

dale add — Code Generation ​

Add elements to a logic block without writing boilerplate. Run these commands from inside the logic block project folder, or from a solution root where exactly one project references the Dale SDK; otherwise pass --project <path>.

Add a Logic Block ​

bash
dale add logicblock TemperatureController --name "Temperature Controller" --icon temp-cold-line
# ✔ Added logicblock TemperatureController to MyLibrary

Options:

FlagDescription
--nameHuman-readable name, emitted as [LogicBlock(Name = "…")] (defaults to the class name)
--iconIcon identifier, emitted as [LogicBlock(Icon = "…")] (a Remixicon name without the ri- prefix)

Add a Property ​

bash
dale add serviceproperty TargetTemp --type double --to TemperatureController
# ✔ Added [ServiceProperty] double TargetTemp (private set) to TemperatureController

Options:

FlagDescription
-t, --type (required)C# type (double, string, bool, etc.)
--toTarget logic block (auto-detected if only one exists)
--setter <private|public>Setter visibility (default: private)
--default-nameDisplay name for the property (emitted as [ServiceProperty(Title = "…")])
--persistentAdd [Persistent] attribute
--group[Presentation] group — a PropertyGroup name or raw key
--importance[Presentation] importance — Primary, Secondary, Normal, or Hidden
--decimals[Presentation] numeric display precision
--format[Presentation] date/duration/numeric format token

Supplying any of --group, --importance, --decimals, or --format emits a [Presentation(...)] attribute alongside [ServiceProperty].

Add a Measuring Point ​

bash
dale add measuringpoint CurrentTemp --type double --to TemperatureController
# ✔ Added [ServiceMeasuringPoint] double CurrentTemp to TemperatureController

dale add measuringpoint TotalEnergy --type double --to TemperatureController --persistent
# ✔ Added [ServiceMeasuringPoint][Persistent] double TotalEnergy to TemperatureController

Options:

FlagDescription
-t, --type (required)C# type (double, string, bool, etc.)
--toTarget logic block (auto-detected if only one exists)
--default-nameDisplay name for the measuring point (emitted as [ServiceMeasuringPoint(Title = "…")])
--persistentAdd [Persistent] attribute (measuring points are not persistent by default)
--kindTime-series shape — Measurement, Total, or TotalIncreasing, emitted as [ServiceMeasuringPoint(Kind = MeasuringPointKind.…)]
--group[Presentation] group — a PropertyGroup name or raw key
--importance[Presentation] importance — Primary, Secondary, Normal, or Hidden
--decimals[Presentation] numeric display precision
--format[Presentation] date/duration/numeric format token

Measuring points are always generated with private set; — there is no --setter flag. --kind adds a using Vion.Dale.Sdk.Core; for MeasuringPointKind automatically.

Add a Timer ​

bash
dale add timer CheckInterval --interval 5 --to TemperatureController
# ✔ Added [Timer(5)] CheckInterval to TemperatureController

Options:

FlagDescription
-i, --interval (required)Timer interval in seconds (must be > 0)
--toTarget logic block (auto-detected if only one exists)

dale pack — Package ​

Creates a NuGet package (.nupkg) for distribution.

bash
dale pack

Options:

FlagDescription
--version <version>Override the package version, e.g. from a tag or CI.

dale upload — Publish to Cloud ​

Packages and uploads the library to VION Cloud in one step.

bash
dale upload

Requires authentication via dale login first. For CI/CD, use service account credentials:

bash
dale upload --client-id $CLIENT_ID --client-secret $CLIENT_SECRET

Options:

FlagDescription
--client-idKeycloak client ID (for CI)
--client-secretKeycloak client secret (for CI)
--release-notesRelease notes for this version
--release-notes-fileFile holding the release notes for this version (Markdown); an empty file sends none
-e, --environmentTarget environment (overrides stored config)
--integrator-idIntegrator ID (overrides stored config)
--version <version>Override the package version, e.g. from a tag or CI.
--skip-duplicateTreat 409 Conflict (version already exists) as success — safe for CI re-runs

dale login / dale logout / dale whoami — Authentication ​

bash
dale login                          # Opens browser for Keycloak OAuth
dale login --environment test       # Default: the stored environment, else production
dale whoami                         # Show current identity
dale logout                         # Clear stored credentials

dale config — Configuration ​

bash
dale config show                            # Show current config
dale config set-environment production      # Switch environment
dale config set-integrator                  # Select active integrator

set-integrator fetches the current user's integrator memberships from the cloud, selects the only one or prompts to pick one, and takes --integrator-id <id> to select without prompting. Run dale login first.

set-environment accepts the following options:

FlagDescription
<name> (argument)Environment name. production and test are built in. Anything else is treated as a custom environment.
--auth-urlCustom auth base URL (required for custom environments).
--api-urlCustom API base URL (required for custom environments).
-f, --forceSkip the confirmation prompt that warns when switching environments clears the active integrator.

Custom environments:

bash
dale config set-environment custom \
  --auth-url https://auth.example.com/realms/vion \
  --api-url https://api.example.com

Global Options ​

All commands support these options:

OptionDescription
--output <json|table>Output format. json suppresses human-readable output and emits structured JSON — ideal for CI/CD pipelines and AI coding agents.
--project <path>Path to a specific .csproj file. Auto-detected if omitted.
--verboseShow detailed diagnostic output.