Getting Started
This page walks you from a fresh machine to a working multi-function ilo program. For install options on every platform, see Install.
Install
Section titled “Install”The fastest path on macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/ilo-lang/ilo/main/install.sh | shVerify it works:
ilo 'dbl x:n>n;*x 2' 5# 10If you use Claude Code, run /plugin marketplace add ilo-lang/ilo then /plugin install ilo-lang/ilo and your agent picks up ilo automatically. See Install for npm, Windows, source builds, and other agents.
Your first program
Section titled “Your first program”Create hello.ilo:
greet name:t > t +"hello " nameRun it:
ilo hello.ilo greet "world"# hello worldThat’s a complete ilo program. Here is what each part means:
| Part | Meaning |
|---|---|
greet | function name |
name:t | parameter name, type text |
> t | returns text |
+"hello " name | body: concatenate two strings (prefix +) |
Now try numbers. Create math.ilo:
add a:n b:n > n -- n = number, t = text + a b -- prefix: + a b means a + bilo math.ilo add 3 4# 7Inline mode
Section titled “Inline mode”You can also run ilo without a file. Semicolons replace newlines and indentation:
ilo 'add a:n b:n>n;+a b' 3 4# 7This is the form AI agents use, same language, just compressed to one line. See the CLI Reference for more.
Multiple functions
Section titled “Multiple functions”ilo programs can contain multiple functions. Each function is a named declaration separated by a newline (in files) or a space (inline):
Save this as math.ilo:
dbl x:n>n;*x 2inc x:n>n;+x 1sq x:n>n;*x xSelecting a function from the CLI
Section titled “Selecting a function from the CLI”When a program has multiple functions, name the one you want to run after the filename:
ilo math.ilo dbl 5# 10
ilo math.ilo sq 5# 25If you omit the function name, ilo runs the first one:
ilo math.ilo 5# 10 (runs dbl, the first function)Inline programs work the same way:
ilo 'dbl x:n>n;*x 2 sq x:n>n;*x x' dbl 5# 10
ilo 'dbl x:n>n;*x 2 sq x:n>n;*x x' sq 5# 25Functions can call each other
Section titled “Functions can call each other”Functions in the same program can reference each other:
dbl x:n > n -- double a number *x 2 -- multiply x by 2
quad x:n > n -- quadruple a number dbl(dbl x) -- double x, then double againilo 'dbl x:n>n;*x 2 quad x:n>n;dbl(dbl x)' quad 3# 12For splitting functions across files, see Imports.
Where to next
Section titled “Where to next”- Manifesto for the why
- Real-World Examples for end-to-end programs
- Reference for the full language spec
- Builtins for the stdlib