Skip to content

Installation

Kiwi runs on Linux, macOS and Windows, on x64 and arm64. Each release has a prebuilt, self-contained binary for every platform, so you don’t need .NET to run it.

Linux and macOS:

Terminal window
curl -sSL https://raw.githubusercontent.com/fuseraft/kiwi/main/install.sh | bash

Windows (PowerShell):

Terminal window
irm https://raw.githubusercontent.com/fuseraft/kiwi/main/install.ps1 | iex

The installer downloads the latest release for your platform, checks it against the release’s SHA-256 checksums, installs the binary and the standard library, and adds kiwi to your PATH. Open a new terminal and check that it worked:

Terminal window
kiwi --version

Pass options to change where and how Kiwi is installed. With the one-line install, put them after bash -s --:

Terminal window
curl -sSL https://raw.githubusercontent.com/fuseraft/kiwi/main/install.sh | bash -s -- --version=1.8.0
OptionEffect
--userInstall for the current user in ~/.kiwi (the default).
--systemInstall system-wide in /opt/kiwi and link /usr/local/bin/kiwi. Needs sudo.
--prefix=PATHInstall into a directory of your choice.
--version=X.Y.ZInstall that release instead of the latest.
--sourceBuild from source instead of downloading a release. Needs the .NET 10 SDK.
--url=URLDownload a binary from a URL, with the standard library from the main branch.
--use-existingInstall the binary already in ./bin/ instead of building.
--updateRemove the current install and install the latest version.
--uninstallRemove Kiwi.

install.ps1 takes the same options in PowerShell form: -System, -Prefix PATH, -Version X.Y.Z, -Source, -Update, -Uninstall.

Terminal window
./install.sh --system
./install.sh --prefix=/usr/local
./install.sh --uninstall

If the latest release has no binary for your platform, the installer builds Kiwi from source when the .NET 10 SDK is installed. For an older release without one, pass --source with --version. A download that doesn’t match its checksum, or a binary that can’t start on your system, is never installed, and an existing install is left as it was.

Each release has an archive for each platform, and a SHA256SUMS file to check them against:

PlatformArchive
Linux x64kiwi-linux-x64.tar.gz
Linux arm64kiwi-linux-arm64.tar.gz
macOS Apple siliconkiwi-osx-arm64.tar.gz
macOS Intelkiwi-osx-x64.tar.gz
Windows x64kiwi-win-x64.zip

Each archive holds a kiwi directory with bin/ and lib/. Unpack it anywhere and run kiwi/bin/kiwi:

Terminal window
curl -sSLO https://github.com/fuseraft/kiwi/releases/latest/download/kiwi-linux-x64.tar.gz
tar -xzf kiwi-linux-x64.tar.gz
./kiwi/bin/kiwi --version

The Linux binaries need glibc 2.34 or later, as on Ubuntu 22.04, Debian 12 and RHEL 9 or newer, and the ICU library (libicu), which most distributions install by default. Alpine and other musl-based distributions aren’t supported.

Terminal window
git clone https://github.com/fuseraft/kiwi.git
cd kiwi
./build.sh

build.sh detects your platform, tries an ahead-of-time (AOT) native build, and falls back to a trimmed self-contained build if AOT is not available. Either way the result is ./bin/kiwi. To target a specific platform, pass a runtime identifier: linux-x64, linux-arm64, osx-x64, osx-arm64 or win-x64.

Terminal window
./build.sh linux-arm64

On Windows, use build.ps1 instead.

To run kiwi from anywhere without the installer, link the binary onto your PATH:

Terminal window
mkdir -p ~/bin
ln -sf "$(pwd)/bin/kiwi" ~/bin/kiwi

The test suite is written in Kiwi. Run it after building to make sure everything works:

Terminal window
./bin/kiwi tests/test

It exits with 0 when every test passes.

The repository includes a Dockerfile that builds Kiwi and packages it with the standard library:

Terminal window
docker build -t kiwi .
docker run --rm -v "$(pwd)":/scripts kiwi /scripts/hello.kiwi
docker run --rm -it kiwi # start the REPL

The Kiwi extension for Visual Studio Code adds syntax highlighting and snippets. Install it from the Quick Open prompt (Ctrl+P):

ext install fuseraft.kiwi-lang

Zest is Kiwi’s package manager. It installs packages from GitHub with semver constraints and a lock file:

Terminal window
zest install owner/repo

Take the tour for a quick look at the whole language.