Part 2 of Goose lang and Flisk.sh 101. The Flisk CLI stays closed.
Goose is a whole-program compiler. It writes one C file and can run that C inside its own process through TinyCC. There is no package manager step and no go.mod.
Prebuilt compilers are on the releases page. Unpack one and put that directory on PATH. The compiler finds its standard library beside itself. Build cache goes under ~/.goose, or GOOSE_HOME if you set it.
On macOS, a downloaded archive will not run until you clear quarantine on the unpacked directory:
xattr -dr com.apple.quarantine /path/to/unpacked-goose
Check you got the language, not the agent:
which goose
goose 2>&1 | head -n 20
You want a compiler that accepts a .goose file. If the help text is about LLM providers, rename or remove that binary from PATH and open a new shell.
Linux, before the first run:
sudo apt-get install -y libc6-dev
macOS:
xcode-select --install
goose build also needs a C compiler: gcc or clang on Linux and macOS, Visual Studio 2022 or clang on Windows. Threads cannot use the in-process TinyCC path. This part has no threads, so goose hello.goose is enough.
mkdir -p ~/src/goose-flisk-101 && cd ~/src/goose-flisk-101
hello.goose:
fn main() {
print("hello, goose");
}
Run it in-process. No verb, or goose run, does the same thing. goose check only typechecks.
goose hello.goose
goose check hello.goose
Expected:
hello, goose
print takes any number of arguments, renders each, and writes one line. There is no format string.
fn main() {
print("answer=", 42, " ratio=", 0.75, " yes=", 3 > 2);
}
The compiler is already called goose. Name the program something else or the next part will call the compiler by accident.
goose build -o ./total hello.goose
./total
goose build --dry-run hello.goose prints the C compile it would run. goose toolchain says which C compiler it found. Intermediates live under ~/.goose.
If goose build cannot find a C compiler, stop and install one. Do not switch to the AI-agent Goose to "fix the build."
The release archive includes a VS Code extension. With the compiler on PATH:
code --install-extension vscode/goose-language.vsix
goose lsp is the language server: diagnostics, hover, go to definition, completion, rename. Skip this if you are in a hurry. The terminal loop above is the 101.
It did not listen on a port. It did not read PORT. It did not answer GET /health. Flisk cannot route a process that exits after one print. That is fine. Part 3 stays in the language. Part 4 starts a real HTTP service in a language Flisk already knows.
Official tour, when you want the long version: docs/tutorial.md in the Goose repo, and samples/01_tour.goose.