Documentation
Getting started
At the end of this page, you will have a project that prints “Hello, Iris!”
Please note that this guide is intended for existing users of the PureScript programming language. If you are new to PureScript, it is highly recommended to go through the official documentation as well as the PureScript book.
Try it in your browser#
The playground is the easiest way to try out Iris. You can write code, create files, and experience the language server without having to install anything on your local machine. Additionally, it also supports both console output and rendering simple single-page applications via Halogen or React.
Before you begin#
Install Iris#
The easiest way to install Iris is via the official installer. The installer downloads the latest stable release from GitHub. Audit the source code yourself, or ask your agent to do so before installation!
If GitHub CLI (gh) is installed, the installer uses it to verify attestation of the release before installation. Additional documentation for the installer can be found in the installation page.
curl -fsSL https://iris-lang.com/install.sh | shOnce installed, you can check the current version:
iris --versioniris 0.1.18The installer does not modify system or shell configuration. The installation locations are as follows:
~/.local/binfor macOS and Linux%LOCALAPPDATA%\Iris\binfor Windows
Iris also comes with a tool for self-updates, you can run iris self update which upgrades the binary in place, downloading the same releases as the installer above.
iris self updateCreate and run a project#
You are now ready to create and run a project. First, create a new directory and run iris new inside of it. You should see the following output:
mkdir hello-iriscd hello-irisiris newCreated package `hello-iris` with package set 81.6.0.
Run `iris build` to get started.Use iris run to build and run the package. The first build usually downloads packages and writes spago.lock first, then it runs Main.main with Node.js.
iris runReading Spago workspace configuration...
✓ Selecting package to build: hello-iris
Downloading dependencies...
No lockfile found, generating it...
Lockfile written to spago.lock. Please commit this file.
🍝Next, change the greeting in src/Main.purs to “Hello, Iris!”. You know what to do next.
module Main where import Prelude import Effect (Effect)import Effect.Console (log) main :: Effect Unitmain = do log "Hello, Iris!"iris runReading Spago workspace configuration...
✓ Selecting package to build: hello-iris
Downloading dependencies...
Hello, Iris!Congratulations! You've successfully created and run your first Iris build. Up next, setting up your coding agent or code editor.