Spanda

Spanda Language Reference

Complete reference for the Spanda language (.sd): reserved words, triggers, std.* packages, global functions, built-in methods, and the spanda CLI.

Structured like JavaDoc (hierarchical packages and types) and man pages (NAME / SYNOPSIS / DESCRIPTION / OPTIONS for CLI commands).

Generated by spanda reference / scripts/generate_spanda_reference.py. Signatures come from the type checker (spanda-core).

See also: spanda-language.md (tutorial-style guide), standard-library.md (stdlib overview), spanda-type-system.md (type rules).

Contents

Keywords

Reserved words recognized by the Spanda lexer. Identifiers cannot reuse these names.

Modules and visibility

Types and generics

Robot graph

Triggers and tasks

Control flow

Safety and verification

Reliability and realtime

Hardware and deploy

Other reserved words

Triggers

Unified reactive handlers on robots and agents. See triggers.md.

Form Syntax Fires when
Event on event_name { ... } Named event is emitted
Message on message topic_name { ... } Message received on topic
Timer every 100 ms { ... } Periodic wall-clock interval
Condition when condition { ... } Boolean expression becomes true
State on entered StateName { ... } State machine enters state
State on exited StateName { ... } State machine exits state
Safety on safety event_name { ... } Safety subsystem event
Hardware on hardware event_name { ... } HAL / hardware event
AI on ai event_name { ... } AI runtime event
Twin on twin event_name { ... } Digital twin event
Log match on log matches /pattern/ { ... } Log line matches regex
Message match on message field matches /pattern/ { ... } Topic field matches regex

Standard library (std.*)

Import with import std.robotics; (or any namespace below). Types resolve with or without the std.<module>. prefix.

std.actuators

Actuator types: motors, servos, grippers.

Types

std.ai

AI models, prompts, completions, reasoning traces.

Types

std.audit

Audit logs, provenance, mission records.

Types

std.bluetooth

Standard library namespace.

Types

std.cellular

Standard library namespace.

Types

std.collections

Containers: arrays, maps, sets, queues.

Types

std.communication

Topics, services, actions, events, bus.

Types

std.connectivity

Standard library namespace.

Types

std.core

Foundation types: results, options, errors.

Types

std.crypto

Hashing and signature primitives.

Types

std.environment

Standard library namespace.

Types

std.fusion

Standard library namespace.

Types

std.geofence

Standard library namespace.

Types

std.hardware

Deploy targets and compatibility reports.

Types

std.hri

Human–robot interaction: commands, intent, approval.

Types

std.io

File and stream abstractions.

Types

std.log

Structured logging.

Types

std.maintenance

Standard library namespace.

Types

std.manipulation

Standard library namespace.

Types

std.math

Scalar math types.

Types

std.navigation

Standard library namespace.

Types

std.network

Transport, QoS, endpoints, discovery.

Types

std.positioning

Standard library namespace.

Types

std.result

Error-handling types.

Types

std.robotics

Robot graph: motion, agents, goals, safe actions.

Types

std.safety

Risk, hazards, constraints, emergency stop.

Types

std.security

Identity, permissions, signatures, trust.

Types

std.sensors

Sensor payload types (LiDAR, camera, IMU, …).

Types

std.sim

Simulation worlds, scenarios, replay buffers.

Types

std.slam

Standard library namespace.

Types

std.spatial

Geometry: poses, transforms, paths, trajectories.

Types

std.time

Time, duration, timestamps, and intervals.

Types

std.twin

Digital twin state and telemetry.

Types

std.units

Physical units: distance, velocity, mass, temperature, and more.

Types

std.wifi

Standard library namespace.

Types

Global functions

Top-level functions available in every Spanda program.

assert

fn assert() -> Void

Assert a condition at runtime (test / verify blocks).

channel

fn channel() -> Channel

Create an async channel for task communication.

deserialize

fn deserialize(format: String) -> Void

Deserialize a value from string (format parameter).

goal

fn goal(text: String) -> Goal

Create an agent goal from text.

peer_send

fn peer_send(peer: String, topic: String, value: Void) -> Void

Publish to a peer robot over the fleet bus.

pose

fn pose(theta: Number(rad), x: Number(m), y: Number(m), z: Number(m)) -> Pose

Construct a Pose from coordinates (optional z).

recall

fn recall(key: String) -> Memory

Recall a value from agent memory by key.

recv

fn recv() -> Void

Receive a value from a channel.

recv_agent

fn recv_agent() -> Void

Receive a message from another agent.

send

fn send() -> Void

Send a value on a channel.

send_agent

fn send_agent(to: String, value: Void) -> Void

Send a message to another agent.

serialize

fn serialize(format: String) -> String

Serialize a value to string (format parameter).

trajectory

fn trajectory(from: Pose, steps: Number(none), to: Pose) -> Path

Interpolate a path between two poses.

transform

fn transform(from: String, pose: Pose, to: String) -> Transform

Transform a pose between coordinate frames.

velocity

fn velocity(angular: Number(rad/s), linear: Number(m/s)) -> Velocity

Construct a Velocity from linear and angular components.

Robot methods

Methods on the implicit robot receiver inside behavior blocks.

robot.connectivity_link() -> String

Built-in method.

robot.identity

robot.identity() -> RobotIdentity

Robot identity for signing and audit.

robot.in_geofence

robot.in_geofence(String) -> Bool

Built-in method.

robot.in_zone

robot.in_zone(String) -> Bool

True when the robot is inside a named zone.

robot.pose

robot.pose() -> Pose

Current robot pose.

robot.sim_identity

robot.sim_identity() -> SimIdentity

Built-in method.

robot.velocity

robot.velocity() -> Velocity

Current robot velocity.

Type methods

Built-in methods on sensor, actuator, AI, safety, and twin types. Actuator/sensor instances use the type declared in the robot graph.

AdafruitBH1750

calibrate

adafruitbh1750.calibrate() -> Void

Built-in method.

read

adafruitbh1750.read() -> Number(lux)

Built-in method.

AdafruitVEML6075

calibrate

adafruitveml6075.calibrate() -> Void

Built-in method.

read

adafruitveml6075.read() -> Number(uvi)

Built-in method.

AdafruitVL53L0X

calibrate

adafruitvl53l0x.calibrate() -> Void

Built-in method.

read

adafruitvl53l0x.read() -> Number(m)

Built-in method.

Agent

plan

agent.plan() -> Void

Built-in method.

AtlasPH

calibrate

atlasph.calibrate() -> Void

Built-in method.

read

atlasph.read() -> Number(pH)

Built-in method.

AtlasSalinity

calibrate

atlassalinity.calibrate() -> Void

Built-in method.

read

atlassalinity.read() -> Number(ppt)

Built-in method.

BoschBME280

calibrate

boschbme280.calibrate() -> Void

Built-in method.

read

boschbme280.read() -> Number(rh)

Built-in method.

BoschBMP388

calibrate

boschbmp388.calibrate() -> Void

Built-in method.

read

boschbmp388.read() -> Number(m)

Built-in method.

BoschBNO055

calibrate

boschbno055.calibrate() -> Void

Built-in method.

read

boschbno055.read() -> IMUReading

Built-in method.

Camera

analyze

camera.analyze() -> Detection

Built-in method.

frame

camera.frame() -> CameraFrame

Built-in method.

read

camera.read() -> CameraFrame

Read latest sensor data.

DfrobotTurbidity

calibrate

dfrobotturbidity.calibrate() -> Void

Built-in method.

read

dfrobotturbidity.read() -> Number(NTU)

Built-in method.

DifferentialDrive

drive

differentialdrive.drive(angular: Number(rad/s), linear: Number(m/s)) -> Void

Drive with linear and angular velocity.

execute

differentialdrive.execute(SafeAction) -> Void

Execute a safety-validated action.

follow

differentialdrive.follow(path: Path) -> Void

Follow a trajectory path.

stop

differentialdrive.stop() -> Void

Stop all motion.

DroneRotors

hover

dronerotors.hover() -> Void

Built-in method.

set_thrust

dronerotors.set_thrust(thrust: Number(none)) -> Void

Built-in method.

GqGMC

calibrate

gqgmc.calibrate() -> Void

Built-in method.

read

gqgmc.read() -> Void

Built-in method.

HokuyoUST10

calibrate

hokuyoust10.calibrate() -> Void

Built-in method.

read

hokuyoust10.read() -> Scan

Built-in method.

HokuyoUTM30

calibrate

hokuyoutm30.calibrate() -> Void

Built-in method.

read

hokuyoutm30.read() -> Scan

Built-in method.

IntelRealSenseD435

calibrate

intelrealsensed435.calibrate() -> Void

Built-in method.

read

intelrealsensed435.read() -> Scan

Built-in method.

IntelRealSenseD455

calibrate

intelrealsensed455.calibrate() -> Void

Built-in method.

read

intelrealsensed455.read() -> Scan

Built-in method.

LLM

reason

llm.reason(goal: Goal, input: Scan, prompt: String) -> ActionProposal

Run LLM reasoning over sensor input and goal.

summarize

llm.summarize(input: Scan) -> Completion

Summarize sensor input.

Lidar

nearest_distance

lidar.nearest_distance() -> Number(m)

Built-in method.

read

lidar.read() -> Scan

Read latest sensor data.

OusterOS1

calibrate

ousteros1.calibrate() -> Void

Built-in method.

read

ousteros1.read() -> Scan

Built-in method.

PlantowerPMS5003

calibrate

plantowerpms5003.calibrate() -> Void

Built-in method.

read

plantowerpms5003.read() -> Number(ug/m3)

Built-in method.

RoboticArm

grip

roboticarm.grip() -> Void

Built-in method.

move_to

roboticarm.move_to(x: Number(m), y: Number(m), z: Number(m)) -> Void

Built-in method.

release

roboticarm.release() -> Void

Built-in method.

Safety

validate

safety.validate(ActionProposal) -> SafeAction

Validate an action proposal; returns a safe action.

SparkfunEC

calibrate

sparkfunec.calibrate() -> Void

Built-in method.

read

sparkfunec.read() -> Number(uS/cm)

Built-in method.

SparkfunLSM9DS1

calibrate

sparkfunlsm9ds1.calibrate() -> Void

Built-in method.

read

sparkfunlsm9ds1.read() -> IMUReading

Built-in method.

Twin

frame_count

twin.frame_count() -> Number(none)

Built-in method.

mirror

twin.mirror(field: String) -> Pose

Mirror a field from the digital twin.

pose

twin.pose() -> Pose

Built-in method.

replay

twin.replay(field: String, index: Number(none)) -> Pose

Replay twin state at an index.

velocity

twin.velocity() -> Velocity

Built-in method.

UbloxNEOM8N

calibrate

ubloxneom8n.calibrate() -> Void

Built-in method.

read

ubloxneom8n.read() -> Void

Built-in method.

VegetronixSoil

calibrate

vegetronixsoil.calibrate() -> Void

Built-in method.

read

vegetronixsoil.read() -> Number(%VWC)

Built-in method.

VelodyneVLP16

calibrate

velodynevlp16.calibrate() -> Void

Built-in method.

read

velodynevlp16.read() -> Scan

Built-in method.

VelodyneVLP32

calibrate

velodynevlp32.calibrate() -> Void

Built-in method.

read

velodynevlp32.read() -> Scan

Built-in method.

VisionModel

detect

visionmodel.detect(CameraFrame) -> Detection

Built-in method.

WaveshareUWMF

calibrate

waveshareuwmf.calibrate() -> Void

Built-in method.

read

waveshareuwmf.read() -> Number(m)

Built-in method.

YdlidarG4

calibrate

ydlidarg4.calibrate() -> Void

Built-in method.

read

ydlidarg4.read() -> Scan

Built-in method.

YdlidarX4

calibrate

ydlidarx4.calibrate() -> Void

Built-in method.

read

ydlidarx4.read() -> Scan

Built-in method.

Object properties

Fields on structured runtime values returned by sensors and AI.

Detection

Field Type
confidence Number(none)
label String
nearest_distance Number(m)

FusedObservation

Field Type
count Number(none)
pose Pose

IMUReading

Field Type
pitch Number(rad)
roll Number(rad)
yaw Number(rad)

Scan properties

Fields on LiDAR Scan values.

Field Type
nearest_distance Number(m)

Hardware sensor libraries

Vendor sensor drivers registered in the runtime. Each sensor type exposes read() and calibrate() unless noted otherwise.

Adafruit

adafruit.vl53l0x — vl53l0x v1.0.0

Adafruit VL53L0X time-of-flight distance sensor

Sensor type Model Interfaces
AdafruitVL53L0X VL53L0X i2c

adafruit.veml6075 — veml6075 v1.0.0

Adafruit VEML6075 UV index sensor

Sensor type Model Interfaces
AdafruitVEML6075 VEML6075 i2c

adafruit.bh1750 — bh1750 v1.0.0

Adafruit BH1750 digital light sensor

Sensor type Model Interfaces
AdafruitBH1750 BH1750 i2c

Atlas

atlas.ph — ph v1.0.0

Atlas Scientific pH sensor

Sensor type Model Interfaces
AtlasPH pH uart

atlas.salinity — salinity v1.0.0

Atlas Scientific salinity sensor

Sensor type Model Interfaces
AtlasSalinity Salinity uart

Bosch

bosch.bno055 — bno055 v1.0.0

Bosch BNO055 9-DOF absolute orientation IMU

Sensor type Model Interfaces
BoschBNO055 BNO055 i2c, uart

bosch.bmp388 — bmp388 v1.0.0

Bosch BMP388 barometric pressure sensor

Sensor type Model Interfaces
BoschBMP388 BMP388 i2c, spi

bosch.bme280 — bme280 v1.0.0

Bosch BME280 environmental sensor (humidity, pressure, temperature)

Sensor type Model Interfaces
BoschBME280 BME280 i2c, spi

DFRobot

dfrobot.turbidity — turbidity v1.0.0

DFRobot turbidity sensor

Sensor type Model Interfaces
DfrobotTurbidity Turbidity uart, gpio

GQ

gq.gmc — gmc v1.0.0

GQ GMC geiger counter

Sensor type Model Interfaces
GqGMC GMC uart, usb

Hokuyo

hokuyo.utm30 — utm30 v1.0.0

Hokuyo UTM-30LX-EW outdoor LiDAR

Sensor type Model Interfaces
HokuyoUTM30 UTM-30LX-EW ethernet

hokuyo.ust10 — ust10 v1.0.0

Hokuyo UST-10LX 2D LiDAR

Sensor type Model Interfaces
HokuyoUST10 UST-10LX ethernet, uart

Intel

intel.realsense — realsense v1.0.0

Intel RealSense depth cameras

Sensor type Model Interfaces
IntelRealSenseD435 D435 usb
IntelRealSenseD455 D455 usb

Ouster

ouster.os1 — os1 v1.0.0

Ouster OS1 digital LiDAR sensor

Sensor type Model Interfaces
OusterOS1 OS1 ethernet

Plantower

plantower.pms5003 — pms5003 v1.0.0

Plantower PMS5003 particulate matter sensor

Sensor type Model Interfaces
PlantowerPMS5003 PMS5003 uart

SparkFun

sparkfun.ec — ec v1.0.0

SparkFun conductivity sensor

Sensor type Model Interfaces
SparkfunEC EC uart, gpio

sparkfun.lsm9ds1 — lsm9ds1 v1.0.0

SparkFun LSM9DS1 9-DOF IMU breakout

Sensor type Model Interfaces
SparkfunLSM9DS1 LSM9DS1 i2c, spi

Vegetronix

vegetronix.soil — soil v1.0.0

Vegetronix soil moisture sensor

Sensor type Model Interfaces
VegetronixSoil Soil gpio, uart

Velodyne

velodyne.vlp16 — vlp16 v1.0.0

Velodyne VLP-16 3D LiDAR puck

Sensor type Model Interfaces
VelodyneVLP16 VLP-16 ethernet, usb

velodyne.vlp32 — vlp32 v1.0.0

Velodyne VLP-32C ultra puck

Sensor type Model Interfaces
VelodyneVLP32 VLP-32C ethernet

Waveshare

waveshare.uwmf — uwmf v1.0.0

Waveshare ultrasonic distance module

Sensor type Model Interfaces
WaveshareUWMF UWMF gpio, uart

YDLIDAR

ydlidar.g4 — g4 v1.0.0

YDLIDAR G4 2D LiDAR

Sensor type Model Interfaces
YdlidarG4 G4 uart, usb

ydlidar.x4 — x4 v1.0.0

YDLIDAR X4 2D LiDAR

Sensor type Model Interfaces
YdlidarX4 X4 uart, usb

u-blox

ublox.neo_m8n — neo_m8n v1.0.0

u-blox NEO-M8N multi-GNSS receiver (UART NMEA)

Sensor type Model Interfaces
UbloxNEOM8N NEO-M8N uart

CLI reference (man pages)

Manual-page style reference for the spanda command-line tool. Individual pages also live under man/.

spanda(1)

NAME

spanda — Spanda autonomous systems platform toolchain

SYNOPSIS

spanda <command> [options] [arguments]

DESCRIPTION

The Spanda CLI drives the autonomous systems platform: check, verify, simulate, replay, fleet, and document .sd programs.

COMMANDS

Package commands: init, build, test, add, remove, install, publish, registry search, registry info. See packages.md.

spanda-check(1)

NAME

check — Type-check and parse a Spanda program or project.

SYNOPSIS

spanda check [--json] [<file.sd> | --project]

DESCRIPTION

Type-check and parse a Spanda program or project.

OPTIONS

--json — machine-readable diagnostics --readiness-json — readiness + recovery + continuity policy hints --project — check all modules in the current project

EXAMPLES

spanda check examples/rover.sd
spanda check --project

EXIT STATUS

0 on success; 1 on parse, type, or lint errors.

FILES

spanda.toml — project manifest when using --project

SEE ALSO

spanda-verify(1), spanda-run(1), spanda-continuity(1)

spanda-verify(1)

NAME

verify — Verify hardware compatibility and safety constraints for a deploy target.

SYNOPSIS

spanda verify [--json] [--target <profile>] [--all-targets] [--simulate] <file.sd>

DESCRIPTION

Verify hardware compatibility and safety constraints for a deploy target.

OPTIONS

--target — hardware profile name --all-targets — compatibility matrix --simulate — include simulator checks --json — JSON report

EXAMPLES

spanda verify robot.sd --target RoverV1
spanda verify robot.sd --all-targets --simulate

EXIT STATUS

0 when compatible; 1 on verification failures or errors.

FILES

Hardware profile definitions in the program or hardware/ package paths.

SEE ALSO

spanda-check(1), spanda-run(1)

spanda-run(1)

NAME

run — Execute a Spanda program on the interpreter backend.

SYNOPSIS

spanda run [--json] [--verbose] [--trace-*] [--record] <file.sd>

DESCRIPTION

Execute a Spanda program on the interpreter backend.

OPTIONS

--trace-scheduler, --trace-tasks, --trace-triggers, --trace-events — scheduler telemetry --trace-realtime, --metrics-json — realtime metrics --record — write mission trace

EXAMPLES

spanda run examples/rover.sd
spanda run robot.sd --trace-realtime --metrics-json

EXIT STATUS

0 on successful execution; 1 on runtime or compile errors.

FILES

Mission traces when using --record (default: mission.trace).

SEE ALSO

spanda-sim(1), spanda-replay(1)

spanda-sim(1)

NAME

sim — Run a program in the built-in simulator with optional trace recording.

SYNOPSIS

spanda sim [--json] [--replay] [--wall-clock] [--record] [--trace-*] <file.sd>

DESCRIPTION

Run a program in the built-in simulator with optional trace recording.

OPTIONS

--replay — replay mode --wall-clock — real-time pacing --record — mission trace output

EXAMPLES

spanda sim examples/rover.sd --record
spanda sim robot.sd --wall-clock

EXIT STATUS

0 on successful simulation; 1 on errors.

FILES

Mission traces when using --record.

SEE ALSO

spanda-run(1), spanda-replay(1)

spanda-replay(1)

NAME

replay — Replay or deterministically verify a recorded mission trace.

SYNOPSIS

spanda replay <mission.trace> [--from T+mm:ss] [--deterministic] [--playback]

DESCRIPTION

Replay or deterministically verify a recorded mission trace.

OPTIONS

--from — start offset --deterministic — verify reproducibility --playback — frame-by-frame playback

EXAMPLES

spanda replay mission.trace --deterministic
spanda replay mission.trace --playback --from T+00:30

EXIT STATUS

0 when replay succeeds or deterministic check passes; 1 otherwise.

FILES

Input mission trace file (.trace).

SEE ALSO

spanda-sim(1), spanda-run(1)

spanda-test(1)

NAME

test — Run in-language test blocks and package test suites for a Spanda project.

SYNOPSIS

spanda test [--project <dir>]

DESCRIPTION

Run in-language test blocks and package test suites for a Spanda project.

OPTIONS

--project — project root (default: current directory)

EXAMPLES

spanda test
spanda test --project examples/rover

EXIT STATUS

0 when all tests pass; 1 on failures.

FILES

spanda.toml, spanda.lock, project .sd sources.

SEE ALSO

spanda-check(1), spanda-package(1)

spanda-readiness(1)

NAME

readiness — Evaluate operational readiness: health, safety, fleet, and deployment gates.

SYNOPSIS

spanda readiness [--json] [--readiness-json] <file.sd>

DESCRIPTION

Evaluate operational readiness: health, safety, fleet, and deployment gates.

OPTIONS

--json / --readiness-json — structured readiness report

EXAMPLES

spanda readiness robot.sd --readiness-json

EXIT STATUS

0 when ready; 1 when blocking issues are found.

FILES

Readiness reports may reference spanda.toml safety metadata.

SEE ALSO

spanda-verify(1), spanda-assure(1)

spanda-assure(1)

NAME

assure — Run assurance workflows: anomaly coverage, prognostics, and assurance cases.

SYNOPSIS

spanda assure [--json] <file.sd>

DESCRIPTION

Run assurance workflows: anomaly coverage, prognostics, and assurance cases.

OPTIONS

--json — machine-readable assurance report

EXAMPLES

spanda assure robot.sd --json

EXIT STATUS

0 when assurance checks pass; 1 on gaps or violations.

FILES

Assurance metadata in program declarations.

SEE ALSO

spanda-readiness(1), spanda-diagnose(1)

spanda-diagnose(1)

NAME

diagnose — Diagnose failures from static analysis and optional mission traces.

SYNOPSIS

spanda diagnose [--json] <file.sd> [<mission.trace>]

DESCRIPTION

Diagnose failures from static analysis and optional mission traces.

OPTIONS

--json — structured diagnosis report

EXAMPLES

spanda diagnose robot.sd
spanda diagnose robot.sd mission.trace

EXIT STATUS

0 when diagnosis completes; 1 on errors.

FILES

Optional mission trace input.

SEE ALSO

spanda-assure(1), spanda-heal(1)

spanda-heal(1)

NAME

heal — Execute self-healing and recovery policies declared in the program.

SYNOPSIS

spanda heal [--json] <file.sd>

DESCRIPTION

Execute self-healing and recovery policies declared in the program.

OPTIONS

--json — recovery report

EXAMPLES

spanda heal robot.sd --json

EXIT STATUS

0 when recovery succeeds; 1 on unrecoverable faults.

FILES

Recovery policies in .sd source.

SEE ALSO

spanda-diagnose(1), spanda-recovery(1)

spanda-continuity(1)

NAME

continuity — Mission continuity, takeover, delegation, and succession planning.

SYNOPSIS

spanda continuity|takeover|delegate|succession <file.sd> [options]

DESCRIPTION

Mission continuity, takeover, delegation, and succession planning.

OPTIONS

--failed <name> — failed robot or entity --progress <pct> — mission progress percent --trigger <kind> — continuity trigger (e.g. robot_failed) --successor / --to <name> — designated successor for takeover/delegate --scope fleet|swarm|robot — succession scope --json / --markdown / --html — report format

EXAMPLES

spanda continuity examples/showcase/continuity/warehouse.sd --failed ScannerAlpha --progress 72
spanda takeover examples/showcase/takeover/patrol.sd --failed RoverA
spanda delegate examples/showcase/delegation/survey.sd --failed SurveyBot --to RelayBot
spanda succession examples/showcase/fleet_succession/delivery.sd --scope fleet
spanda demo continuity

EXIT STATUS

0 when planning succeeds; 1 on validation or safety gate failures.

FILES

continuity_policy and mission_plan declarations in .sd source.

SEE ALSO

spanda-recovery(1), spanda-fleet(1), mission-continuity.md

spanda-fleet(1)

NAME

fleet — Run a multi-robot fleet program with peer communication.

SYNOPSIS

spanda fleet run [--json] [--trace-*] <file.sd>

DESCRIPTION

Run a multi-robot fleet program with peer communication.

OPTIONS

Same trace flags as spanda run.

EXAMPLES

spanda fleet run examples/communication/multi_robot_fleet.sd

EXIT STATUS

0 on successful fleet run; 1 on errors.

FILES

Fleet mesh state when using remote agents.

SEE ALSO

spanda-run(1)

spanda-package(1)

NAME

package — Manage Spanda packages: manifests, dependencies, builds, and registry operations.

SYNOPSIS

spanda <init|build|test|add|remove|install|publish|registry> [options]

DESCRIPTION

Manage Spanda packages: manifests, dependencies, builds, and registry operations.

OPTIONS

See spanda init, build, test, add, remove, install, publish, registry search, registry info.

EXAMPLES

spanda init my-robot
spanda add std.robotics
spanda publish

EXIT STATUS

0 on success; 1 on manifest, lockfile, or registry errors.

FILES

spanda.toml, spanda.lock, packages/ registry mirror.

SEE ALSO

spanda-check(1), spanda-test(1)

spanda-trace(1)

NAME

trace — Record scheduler, task, trigger, and event traces from a program run.

SYNOPSIS

spanda trace [--json] [--out <file>] <file.sd>

DESCRIPTION

Record scheduler, task, trigger, and event traces from a program run.

OPTIONS

--out — trace output path --json — structured trace summary

EXAMPLES

spanda trace robot.sd --out mission.trace

EXIT STATUS

0 on success; 1 on runtime errors.

FILES

Output trace file (.trace).

SEE ALSO

spanda-replay(1), spanda-run(1)

spanda-security(1)

NAME

security — Validate security policies, identities, and audit configuration.

SYNOPSIS

spanda security <check|audit> [--json] <file.sd>

DESCRIPTION

Validate security policies, identities, and audit configuration.

OPTIONS

check — static security validation audit — audit log review --json — machine-readable report

EXAMPLES

spanda security check robot.sd --json
spanda security audit robot.sd

EXIT STATUS

0 when policies pass; 1 on violations.

FILES

Security metadata in program and spanda.toml when present.

SEE ALSO

spanda-verify(1), spanda-readiness(1)

spanda-fmt(1)

NAME

fmt — Format Spanda source to canonical style.

SYNOPSIS

spanda fmt [--json] <file.sd>

DESCRIPTION

Format Spanda source to canonical style.

OPTIONS

--json — report whether the file changed

EXAMPLES

spanda fmt examples/rover.sd

EXIT STATUS

0 on success; 1 on parse errors.

FILES

In-place .sd source file.

SEE ALSO

spanda-check(1)

spanda-lint(1)

NAME

lint — Run linter rules beyond parse/type checking.

SYNOPSIS

spanda lint [--json] <file.sd>

DESCRIPTION

Run linter rules beyond parse/type checking.

OPTIONS

--json — structured lint report

EXAMPLES

spanda lint robot.sd

EXIT STATUS

0 when no lint issues; 1 when issues are found.

FILES

Input .sd source file.

SEE ALSO

spanda-check(1)

spanda-doc(1)

NAME

doc — Generate JavaDoc-style API docs for .sd modules (markdown or HTML).

SYNOPSIS

spanda doc [--json] [--html] [--out <file>] <file.sd|dir/>

DESCRIPTION

Generate JavaDoc-style API docs for .sd modules (markdown or HTML).

OPTIONS

--out — write output file or directory --html — emit HTML instead of markdown --json — wrap output in JSON

EXAMPLES

spanda doc module.sd --out module-api.md
spanda doc --html examples/

EXIT STATUS

0 on success; 1 on lex/parse errors.

FILES

Output docs under --out or stdout.

SEE ALSO

spanda-reference(1), spanda-man(1)

spanda-man(1)

NAME

man — Display man-page style documentation for Spanda CLI commands.

SYNOPSIS

spanda man [<command>] [--roff]

DESCRIPTION

Display man-page style documentation for Spanda CLI commands.

OPTIONS

--roff — emit roff for Unix man viewers No argument — list available pages

EXAMPLES

spanda man
spanda man verify
spanda man run --roff

EXIT STATUS

0 on success; 1 when the command page is not found.

FILES

Man pages are generated from compiler metadata into docs/man/.

SEE ALSO

spanda-reference(1), spanda-doc(1)

spanda-reference(1)

NAME

reference — Emit the full Spanda language reference and optional man pages.

SYNOPSIS

spanda reference [--json] [--out <file.md>] [--man-dir <dir>]

DESCRIPTION

Emit the full Spanda language reference and optional man pages.

OPTIONS

--out — write reference markdown --man-dir — write man pages --json — wrap markdown in JSON

EXAMPLES

spanda reference --out docs/spanda-reference.md --man-dir docs/man

EXIT STATUS

0 on success.

FILES

docs/spanda-reference.md, docs/man/ when generating.

SEE ALSO

spanda-doc(1), spanda-man(1)

spanda-codegen(1)

NAME

codegen — Generate deployable artifacts from a Spanda program.

SYNOPSIS

spanda codegen [--target native|wasm|esp32] [--out <file>] <file.sd>

DESCRIPTION

Generate deployable artifacts from a Spanda program.

OPTIONS

--target — output format

EXAMPLES

spanda codegen --target wasm robot.sd --out robot.wasm

EXIT STATUS

0 on success; 1 on codegen errors.

FILES

Generated artifact at --out.

SEE ALSO

spanda-deploy(1), spanda-compile-native(1)

spanda-debug(1)

NAME

debug — Start an interactive debug session.

SYNOPSIS

spanda debug [--break <line>] <file.sd>

DESCRIPTION

Start an interactive debug session.

OPTIONS

--break — initial breakpoint line

EXAMPLES

spanda debug robot.sd --break 42

EXIT STATUS

0 on clean exit; 1 on errors.

FILES

Debug session uses source .sd file.

SEE ALSO

spanda-run(1)