Documentation

Host scripts & REPL

Evaluate pure Walnut on your Mac without building an iOS app.

CommandBehavior
walnut run <file.walnut>Typecheck, compile, run main, print the result
walnut replInteractive expressions; ↑↓ history in ~/.walnut/repl_history
:helpList REPL commands
:type <expr>Typecheck only
:load <path>Load a .walnut module into the session
:reloadRe-read loaded files from disk
:quit / :qExit

iOS apps still use walnut simulator / walnut device — the REPL does not host UIKit, Cmd, or Sub.

Script vs app main

Only script programs run on the host: a value-producing main, not Walnut.sandbox / Walnut.element. App programs print a hint to use the simulator instead.

Requirements

Homebrew installs llvm with the walnut formula. If you built the CLI yourself, install LLVM (brew install llvm) or set LLVM_HOME.