Skip to content

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.

The fastest path on macOS or Linux:

Shell
curl -fsSL https://raw.githubusercontent.com/ilo-lang/ilo/main/install.sh | sh

Verify it works:

Shell
ilo 'dbl x:n>n;*x 2' 5
# 10

If 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.

Create hello.ilo:

ilo
greet name:t > t
+"hello " name

Run it:

Shell
ilo hello.ilo greet "world"
# hello world

That’s a complete ilo program. Here is what each part means:

PartMeaning
greetfunction name
name:tparameter name, type text
> treturns text
+"hello " namebody: concatenate two strings (prefix +)

Now try numbers. Create math.ilo:

ilo
add a:n b:n > n -- n = number, t = text
+ a b -- prefix: + a b means a + b
Shell
ilo math.ilo add 3 4
# 7

You can also run ilo without a file. Semicolons replace newlines and indentation:

Shell
ilo 'add a:n b:n>n;+a b' 3 4
# 7

This is the form AI agents use, same language, just compressed to one line. See the CLI Reference for more.

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:

ilo
dbl x:n>n;*x 2
inc x:n>n;+x 1
sq x:n>n;*x x

When a program has multiple functions, name the one you want to run after the filename:

Shell
ilo math.ilo dbl 5
# 10
ilo math.ilo sq 5
# 25

If you omit the function name, ilo runs the first one:

Shell
ilo math.ilo 5
# 10 (runs dbl, the first function)

Inline programs work the same way:

Shell
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
# 25

Functions in the same program can reference each other:

ilo
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 again
Shell
ilo 'dbl x:n>n;*x 2 quad x:n>n;dbl(dbl x)' quad 3
# 12

For splitting functions across files, see Imports.