cd /news/developer-tools/goose-lang-101-install-the-compiler-… · home › topics › developer-tools › article
[ARTICLE · art-155631] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Goose Lang 101: Install the Compiler and Print One Line

A developer walkthrough shows how to install the Goose whole-program compiler from its prebuilt release archives and run a one-line program without a package manager or go.mod. The compiler emits a single C file and can execute it in-process via TinyCC, with `goose build` requiring a separate system C compiler and `goose lsp` providing language-server features. The guide warns that the compiler shares its name with the AI-agent Goose, so users should verify `which goose` points to the compiler.

by read2 min views2 publishedOct 22, 2026

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.

── more in #developer-tools 4 stories · sorted by recency
── more on @goose 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/goose-lang-101-insta…] indexed:0 read:2min 2026-10-22 · —