hil-cli

The HIL command-line tool. Build, simulate, flash, and manage projects.

Usage

hil-cli <command> [options]

Run hil-cli --help to see all available commands.


hil-cli simulate

Run a LISP program headlessly, no hardware, no serial port, no simulator. The fastest way to test your code. Add --hw to run the same script against the built-in virtual board — full wire protocol, emulated ADC, events and compressed frames, nothing to brick.

hil-cli simulate examples/01-getting-started/hello-world.hil
hil-cli simulate --hw blink.hil  ; with emulated ATmega328P

Options:

FlagDescription
-port noneDefault. Headless mode, no serial port
--hwAttach the built-in virtual board (also: HIL_PORT=virtual or HIL_HW=1)
(BOARD-STATS)LISP macro: print emulated-node counters (frames/acks/reads/events)
-fuzz NRun N random iterations for stress testing

Interactive emulation: HIL_PORT=virtual hil-cli run main.hil — same REPL you'd use on real hardware.

→ Open the Virtual Lab — a visual Arduino Uno in your browser: live pin glow, clickable inputs, analog sliders, serial monitor, and game-engine time control (0.05× slow-mo to 100× fast-forward).


hil-cli run

Run a LISP program interactively with the host serial monitor. Sends code to a real Arduino over serial.

hil-cli run examples/01-getting-started/blink.hil

Options:

FlagDescription
-port COM3Serial port to connect to
-baud 115200Baud rate (default: 115200)

hil-cli build

Transpile LISP to Arduino C and compile a .hex firmware artifact.

hil-cli build examples/08-projects/thermostat.hil

Options:

FlagDescription
-o output.hexOutput path for .hex file
-board unoTarget board: uno, nano, mega

hil-cli crumb

Generate a CRUMB circuit simulator project from LISP code. Transpiles to Arduino C and creates a .cru file.

hil-cli crumb examples/08-projects/thermostat.hil --open

Options:

FlagDescription
--openAuto-open in CRUMB simulator
-o file.cruOutput path for .cru file

hil-cli init

Scaffold a new HIL project with directory structure, templates, and VS Code configuration.

hil-cli init my-robot-project

Creates:

  • main.hil – starter program
  • lib/ – library directory
  • tests/ – test directory
  • .vscode/ – VS Code tasks and settings

hil-cli transpile

Convert LISP to Arduino C source code without compiling.

hil-cli transpile main.hil -o main.ino

hil-cli lint

Check LISP source for common errors without running it.

hil-cli lint main.hil

hil-cli install-vscode

Install the HIL VS Code extension with syntax highlighting and snippets.

hil-cli install-vscode

hil-cli ports

Scan and list available serial ports.

hil-cli ports

hil-cli firmware info

Show connected Arduino board information.

hil-cli firmware info

hil-cli firmware build

Compile TinyGo firmware for ATmega328P.

hil-cli firmware build

hil-cli firmware flash

Flash firmware to Arduino via avrdude.

hil-cli firmware flash

Supports Arduino Uno, Nano, and Mega. Auto-detects board type and serial port.