Most beginners do not need a project on the first day. A prompt and a .fr file are enough. Projects matter when you want repeatable files, libraries, firmware builds, or native extension code.
Project Shape
Create a folder and initialize it:
mkdir my-sketch
cd my-sketch
frothy init
That creates:
frothy.toml
main.fr
.gitignore
libs/
A minimal manifest looks like:
name = "blink"
board = "esp32_devkit_v1"
esp32_devkit_v1 is the board identifier Frothy currently uses for the development ESP32 shape.
Build And Flash
frothy build
frothy flash esp32_devkit_v1 --port /dev/cu.usbserial-0001
Do not flash after every small change. The ordinary loop is connect, edit, inspect, revise.
Libraries
name = "stage-lights"
board = "esp32_devkit_v1"
[deps]
servo = { git = "https://github.com/nikokozak/frothy-servo", rev = "2f40b97c8ab32ca604ee4e685acc23cc129da9ea" }
blink = { path = "libs/blink" }
A dependency is either git, with rev set to a commit SHA or branch set to
a branch name, or path, pointing at a local directory relative to the project.
frothy build resolves dependencies, fetches git dependencies, and compiles
them in. frothy fetch pre-fetches git dependencies without building.
Native Extensions
name = "neopixel"
version = "0.1.0"
boards = ["esp32_devkit_v1"]
[extension]
sources = ["native/neopixel.c"]
[[natives]]
name = "neopixel.show"
arity = 1
c_function = "fr_lib_neopixel_show"
This is not dynamic plugin loading. The C files are compiled into the firmware build, and the generated native table gives Frothy named words that call those C functions.
Generated build files live under .frothy/build/.... Treat them as derived state, not source you edit by hand.