Skip to content

Your First Program

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’s what each part means:

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

Now try something with 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.