Getting Started
Get Sigil running in under five minutes.
Try It in Your Browser
Want to experiment before installing? Try Sigil in your browser—no installation required.
Download
Download the latest release for your platform from the Sigil package server:
# Download the latest Linux release
curl -LO https://pkg.usesigil.org/dl/latest/sigil-linux-amd64
# Check it against the published checksums
curl -sL https://pkg.usesigil.org/dl/latest/SHA256SUMS | grep ' sigil-linux-amd64$' | sha256sum -c -
# Make it executable
chmod +x sigil-linux-amd64Replace sigil-linux-amd64 with the file for your platform:
| Platform | File |
|---|---|
| Linux x86_64 | sigil-linux-amd64 |
Linux x86_64, fully static (for systems without /lib64, such as Guix or NixOS) | sigil-linux-amd64-static |
| Linux ARM64 | sigil-linux-arm64 |
| macOS Apple Silicon | sigil-macos-arm64 |
| macOS Intel | sigil-macos-amd64 |
| Windows x86_64 | sigil-windows-amd64.exe |
| FreeBSD x86_64 | sigil-freebsd-amd64 |
| OpenBSD x86_64 | sigil-openbsd-amd64 |
| OpenBSD ARM64 | sigil-openbsd-arm64 |
| NetBSD x86_64 | sigil-netbsd-amd64 |
| Android ARM64 | sigil-android-arm64 |
To pin a specific release, use its version in place of latest, for example https://pkg.usesigil.org/dl/v0.23.3/sigil-linux-amd64.
Try It Out
Before installing, you can experiment with the downloaded binary directly:
# Start the REPL
./sigil-linux-amd64 repl
# Evaluate an expression
./sigil-linux-amd64 eval '(+ 1 2 3)'
# Run a file
./sigil-linux-amd64 eval -f hello.sglIn the REPL, try some expressions:
> (+ 1 2 3)
6
> (define (square x) (* x x))
> (map square '(1 2 3 4 5))
(1 4 9 16 25)
> (import (sigil json))
> (json->string '((name . "Alice") (age . 30)))
"{\"name\":\"Alice\",\"age\":30}"Press Ctrl+D or type in ,q to exit.
Install
Once you're ready to install Sigil permanently:
./sigil-linux-amd64 cli installThis creates ~/.sigil with the following structure:
~/.sigil/ ├── bin/ │ └── sigil # Version-switching wrapper script ├── versions/ │ └── 0.1.0/ │ └── sigil # The actual binary ├── apps/ # Installed applications ├── cache/ # Downloaded files └── current # Currently active version
Add Sigil to your PATH by adding this to your shell config (~/.bashrc, ~/.zshrc, ~/.kshrc, or ~/.profile):
eval "$(~/.sigil/bin/sigil cli env)"Or manually add the path:
export PATH="$HOME/.sigil/bin:$PATH"Then restart your shell or source your config file.
You can now delete the downloaded binary - Sigil is installed at ~/.sigil/bin/sigil.
Upgrade
Check for and download new versions:
sigil cli upgradeThis downloads the latest release from the Sigil package registry, after checking its signatures and the binary's hash, but doesn't activate it automatically. If the registry is unavailable, verification fails, or the requested release or platform is missing, the command explains the error and stops without installing anything. Release downloads require the verified registry. To switch:
sigil cli use 0.23.3Other CLI Management Commands
sigil cli versions # List installed versions
sigil cli use 0.1.0 # Switch to a specific version
sigil cli prune # Remove old versions (keeps current)
sigil cli env # Print shell configurationSee CLI Management for full documentation.
Your First Program
Create a file called hello.sgl:
;; hello.sgl - Your first Sigil program
(define (greet name)
(println "Hello, ~a!" name))
(greet "World")
(greet "Sigil")Run it:
sigil eval -f hello.sglUsing Libraries
Sigil code is organized into libraries using a directory structure that matches the module name. Let's create a simple library.
First, create a lib/ directory and add lib/mylib.sgl:
;; lib/mylib.sgl
(define-library (mylib)
(export greet say-goodbye)
(begin
(define (greet name)
(string-append "Hello, " name "!"))
(define (say-goodbye name)
(string-append "Goodbye, " name "!"))))Now create main.sgl in your project root:
;; main.sgl
(import (mylib))
(println "~a" (greet "Alice"))Run it with the -L flag to add your library directory to the load path:
sigil eval -L lib -f main.sglFor nested modules like (myproject utils), create lib/myproject/utils.sgl.
Standard Library
Sigil includes libraries for common tasks:
| Module | Description |
|---|---|
(sigil io) | File I/O and ports |
(sigil fs) | Filesystem operations |
(sigil path) | Path manipulation |
(sigil string) | String utilities |
(sigil json) | JSON parsing and generation |
(sigil process) | Process spawning |
(sigil socket) | TCP/UDP networking |
(sigil http) | HTTP server |
(sigil time) | Date and time |
(sigil test) | Testing framework |
(sigil channels) | CSP-style channels |
(sigil coroutines) | Generators and coroutines |
Building from Source
There are two ways to build Sigil from source:
Option 1: Using an existing Sigil installation
If you already have Sigil installed, you can build the latest version directly:
git clone https://git.usesigil.org/sigil/sigil.git
cd sigil
sigil build sigil-cli --config release
./build/release/bin/sigil cli installOption 2: Bootstrap build
If you don't have Sigil installed, bootstrap from scratch:
git clone https://git.usesigil.org/sigil/sigil.git
cd sigil
make CC=gcc
./build/boot/bin/sigil build sigil-cli --config release
./build/release/bin/sigil cli installThe bootstrap build creates a minimal CLI at ./build/boot/bin/sigil, which is then used to build the release CLI.
For the smoothest experience, use GNU Guix:
guix shell -m manifest.scm
make CC=gcc
./build/boot/bin/sigil build sigil-cli --config releaseBuilding on OpenBSD
OpenBSD is fully supported. Use gmake (GNU Make) instead of the default BSD make:
pkg_add gmake
git clone https://git.usesigil.org/sigil/sigil.git
cd sigil
gmake CC=cc
./build/boot/bin/sigil build sigil-cli --config release
./build/release/bin/sigil cli install