Back to index
spanda commandFast path — download a prebuilt binary from GitHub Releases. See installation.md.
From source (if you cloned the repo):
npm install
npm run build:rust
export PATH="$PWD/target/release:$PATH"
Sanity check:
spanda check examples/hello_world.sd
You should see a green check or “no type errors”. If not, fix PATH or use
./target/release/spanda.
Open examples/basics/01_minimal_robot.sd:
robot TutorialBot {
actuator wheels: DifferentialDrive;
behavior greet() {
wheels.stop();
}
}
That’s a complete Spanda program: a robot, one actuator, one behavior.
spanda check examples/basics/01_minimal_robot.sd
spanda run examples/basics/01_minimal_robot.sd
| Command | Plain English |
|---|---|
check |
“Does this program type-check?” |
run |
“Run it in simulation.” |
No robot hardware required.
Open examples/basics/02_sensors_and_safety.sd and run:
spanda run examples/basics/02_sensors_and_safety.sd
Now the robot has a lidar, safety rules, and a loop that reacts to distance. This is what most real programs look like — just a bit more code.
spanda init my_rover
cd my_rover
Edit src/main.sd, then:
spanda check src/main.sd
spanda run src/main.sd
spanda check works on an examplespanda run works on an examplerobot, sensor, actuator, safety, and behavior mean (see next chapter)Next: Anatomy of a robot program · Deeper dive: Spanda 101 Lesson 1