Getting Started

Installation

The quickest way is the install script, which fetches a prebuilt binary:

curl -fsSL https://raw.githubusercontent.com/leinonen/golisp-language/main/install.sh | sh

Or build from source — GoLisp requires Go 1.25.5 or later:

go install github.com/leinonen/golisp-language/cmd/glisp@latest

Verify it works:

glisp version

Hello, World

Create a file named hello.glsp:

(ns main)

(defn main [] -> void
  (println "Hello, World!"))

Run it:

glisp run hello.glsp

Build a binary:

glisp build hello.glsp
./hello

The Compiler Commands

CommandWhat it does
glisp run file.glspCompile and run, no output files
glisp run --watch file.glspRe-run on every save
glisp file.glspRun directly (also works via a #!/usr/bin/env glisp shebang)
glisp build file.glspCompile to a binary
glisp build dir/Compile all .glsp files in a directory
glisp fmt file.glspFormat in-place
glisp compile file.glspEmit the generated .go file
glisp print file.glspPrint generated Go to stdout
glisp macroexpand file.glspPrint the file with macros expanded
glisp test file.glspRun test blocks
glisp doc [name]Show documentation for a built-in

Project Layout

Single-file programs need no setup — just a .glsp file with (ns main) and a main function.

For multi-file projects, create a directory:

myapp/
  main.glsp
  handlers.glsp
  models.glsp

Build the whole directory:

glisp build myapp/

For projects with external dependencies, add a glisp.mod file (see Modules).