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
- .NET 10 SDK or later
Install
dotnet tool install -g Vion.Dale.CliVerify the installation:
dale --version
# dale 1.0.0 - Vion IoTCommands
dale new — Scaffold a Project
Creates a new logic block library with DevHost and test projects.
dale new MyLibraryOutput:
✔ Created MyLibrary
MyLibrary/MyLibrary.csproj (logic block library)
MyLibrary/MyLibrary.DevHost.csproj (local DevHost with web UI)
MyLibrary/MyLibrary.Test.csproj (tests)
Next steps:
cd MyLibrary
dale build
dale test
dale dev (web UI at localhost:5000)Use --no-interactive to skip prompts (useful in CI):
dale new MyLibrary --no-interactivedale build — Build
Builds the project and all dependencies.
dale builddale test — Run Tests
Runs unit tests using the Dale TestKit.
dale test
# Passed! - Failed: 0, Passed: 4, Skipped: 0, Total: 4dale dev — Local Development
Starts the DevHost with a web UI for live testing.
dale dev
# Web UI at http://localhost:5000The DevHost lets you inspect and modify property values, simulate inputs, and debug logic block behavior — all in your browser.
dale list — Introspect Project
Shows all logic blocks, contracts, properties, and measuring points.
dale list Project: MyDemo (v0.0.1)
SDK: Vion.Dale.Sdk 1.0.0
┌ HelloWorld ─────────────────┐
│ Properties │ Greeting │
│ Measuring │ TimesGreeted │
└─────────────────────────────┘
┌ SmartLedController ──────────────────────────────────────────┐
│ Contracts │ Button (DigitalInput), LED (DigitalOutput) │
│ Properties │ Mode, LedEnabled, BlinkIntervalSeconds │
│ Measuring │ ButtonPressed, TotalBlinks, ButtonPressCount │
└──────────────────────────────────────────────────────────────┘Use --output json for machine-readable output (useful for CI/CD and AI agents):
dale list --output json{
"packageId": "MyDemo",
"version": "0.0.1",
"sdkVersion": "1.0.0",
"logicBlocks": [
{
"name": "HelloWorld",
"contracts": [],
"services": [{
"properties": [{ "name": "Greeting", "type": "System.String" }],
"measuringPoints": [{ "name": "TimesGreeted", "type": "System.Int32" }]
}]
}
]
}dale add — Code Generation
Add elements to a logic block without writing boilerplate. Run these commands from inside the logic block project folder, or pass --project <path> to target it explicitly — unlike dale new, dale build, and dale test, dale add cannot auto-detect the right project from the solution root when multiple csproj files exist.
Add a Logic Block
dale add logicblock TemperatureController --name "Temperature Controller" --icon temp-cold-line
# ✔ Added logicblock TemperatureController to MyLibraryOptions:
| Flag | Description |
|---|---|
--name | Human-readable name, emitted as [LogicBlock(Name = "…")] (defaults to the class name) |
--icon | Icon identifier, emitted as [LogicBlock(Icon = "…")] (a Remixicon name without the ri- prefix) |
Add a Property
dale add serviceproperty TargetTemp --type double --to TemperatureController
# ✔ Added [ServiceProperty] double TargetTemp (private set) to TemperatureControllerOptions:
| Flag | Description |
|---|---|
-t, --type (required) | C# type (double, string, bool, etc.) |
--to | Target logic block (auto-detected if only one exists) |
--setter <private|public> | Setter visibility (default: private) |
--default-name | Display name for the property (emitted as [ServiceProperty(Title = "…")]) |
--persistent | Add [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
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 TemperatureControllerOptions:
| Flag | Description |
|---|---|
-t, --type (required) | C# type (double, string, bool, etc.) |
--to | Target logic block (auto-detected if only one exists) |
--default-name | Display name for the measuring point (emitted as [ServiceMeasuringPoint(Title = "…")]) |
--persistent | Add [Persistent] attribute (measuring points are not persistent by default) |
--kind | Time-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
dale add timer CheckInterval --interval 5 --to TemperatureController
# ✔ Added [Timer(5)] CheckInterval to TemperatureControllerOptions:
| Flag | Description |
|---|---|
-i, --interval (required) | Timer interval in seconds (must be > 0) |
--to | Target logic block (auto-detected if only one exists) |
dale pack — Package
Creates a NuGet package (.nupkg) for distribution.
dale packdale upload — Publish to Cloud
Packages and uploads the library to VION Cloud in one step.
dale uploadRequires authentication via dale login first. For CI/CD, use service account credentials:
dale upload --client-id $CLIENT_ID --client-secret $CLIENT_SECRETOptions:
| Flag | Description |
|---|---|
--client-id | Keycloak client ID (for CI) |
--client-secret | Keycloak client secret (for CI) |
--release-notes | Release notes for this version |
--environment | Target environment (overrides stored config) |
--integrator-id | Integrator ID (overrides stored config) |
--skip-duplicate | Treat 409 Conflict (version already exists) as success — safe for CI re-runs |
dale login / dale logout / dale whoami — Authentication
dale login # Opens browser for Keycloak OAuth
dale login --environment production # Target a specific environment
dale whoami # Show current identity
dale logout # Clear stored credentialsdale config — Configuration
dale config show # Show current config
dale config set-environment production # Switch environment
dale config set-integrator # Select active integrator (interactive)set-integrator fetches the current user's integrator memberships from the cloud and prompts to pick one. There are no flags — run dale login first.
set-environment accepts the following options:
| Flag | Description |
|---|---|
<name> (argument) | Environment name. production and test are built in. Anything else is treated as a custom environment. |
--auth-url | Custom auth base URL (required for custom environments). |
--api-url | Custom API base URL (required for custom environments). |
-f, --force | Skip the confirmation prompt that warns when switching environments clears the active integrator. |
Custom environments:
dale config set-environment custom \
--auth-url https://auth.example.com/realms/vion \
--api-url https://api.example.comProject Structure
dale new creates three projects:
MyLibrary/
├── MyLibrary/ # Logic block library (netstandard2.1)
│ ├── MyLibrary.csproj
│ ├── DependencyInjection.cs # Service registration
│ ├── HelloWorld.cs # Example logic block
│ └── SmartLedController.cs # Example with I/O contracts
├── MyLibrary.DevHost/ # DevHost (net10.0)
│ └── MyLibrary.DevHost.csproj
└── MyLibrary.Test/ # Unit tests (net10.0)
└── MyLibrary.Test.csprojGlobal Options
All commands support these options:
| Option | Description |
|---|---|
--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. |
--verbose | Show detailed diagnostic output. |