iyi

A friendly, fast programming language for people and their agents.

iyi is a compiled programming language written for two readers: the person editing the code and the agent editing it beside them. One rule serves both. A module builds against its dependencies' declarations, never their bodies, so:

  • a build reads less
  • a program carries less
  • a model reads an interface instead of a repository
The iyi mascot: a smiling red heart with yellow gloves, waving
one line changed in one of 30 modules7,207 linesreal speed · fastest of 3 sessions
app/greeter.iyi
module app/greeter

pub def polite(name : String) : String
  "Dear #{name}, welcome."▍
end
declaration · what consumers read · unchangedbody · the edit
$ build
Same compiler, Crystal's rulesreads every body again
1.17 sbuilt
iyireads 29 declarations, 1 body
0.13 sbuilt

About 9x less, on the line you just changed.8.06x to 9.00x across 3 published sessions · the measurement

iyi is done. Crystal's rules are still reading bodies that did not change.

Edit one line, build. Both lanes start at the same moment.

Module names and the edit are illustrative. The two durations are the measured ones, from the same compiler binary under each set of rules, by a generator that refuses to start the clock until both print the same total.

What iyi is for

Four things, and they are one design decision seen from four sides.

Try iyi

It reads like Crystal or Ruby, and builds like a systems language. This is the first program of the tour, and the output beside it is what the compiler's build of it printed.

Run it in the playground →
samples/tour/hello.iyi3 lines
# Your first iyi program.

puts "Hello Türkiye!"
Hello Türkiye!

Agent experience (AX)

A model reads the interface, not the repository.

A module compiles against its dependencies' declarations, never their bodies. That one rule is why a module's interface is a file, and why iyi mod context can hand an agent the exact surface of every import with no body in it and no repository behind it.

The loop, recorded →
  • Grounding is one command.iyi mod context --json prints the surface an edit is allowed to know.
  • The verdict is data.iyi check -f json answers with the file, the line, the span and the exact replacement when the compiler knows the fix, and iyi fix applies it.
  • The servers are in the binary.iyi lsp for an editor and iyi mcp for a harness, both over stdio.
same task, both armsmeasured on webapp.iyi, calc.iyi
Reading the sourcesevery body the edit depends on
100%of the sources' size
With iyiiyi mod context: declarations only
52–59%of the sources' size

Same fix. 31–43% fewer prompt tokens, for no fewer rounds.The recorded session →

Same four verbs in both lanes. Watch what each one has to read.

A replay of the measured result; the code in the lanes is illustrative. Rounds to green were the model's, tied three times and lost three. How it was measured.

Coming from Crystal?

iyi runs your Crystal code today.

iyi's compiler is Crystal's compiler. Your .cr files build unchanged, and iyi build --crystal gives an iyi program Crystal's standard library, require, and the shards you already depend on. Blocks, union types, nil-safety and macros are all here.

The listing is a Kemal server written as an iyi module, and the console under it is that server answering. What iyi adds is one rule about where things may be written, and the compiler teaches it as you go.

site.iyiquoted from README.md, lines 699 to 712
module site

require "kemal"

get "/" do |env|
  "Hello from an iyi program"
end

get "/json" do |env|
  env.response.content_type = "application/json"
  {message: "iyi"}.to_json
end

Kemal.run
console
$ iyi build --crystal -o site site.iyi
$ ./site &
$ curl localhost:3000/json
{"message":"iyi"}

Install in one line

The latest release into ~/.local on Linux x86-64 or macOS arm64, or into %LOCALAPPDATA% on Windows x86-64, with both libraries and the samples. Then hello.

What the installer does, and the by-hand version →
sh
curl -fsSL https://raw.githubusercontent.com/iyilang/iyi/master/install.sh | sh
~/.local/bin/iyi run ~/.local/share/iyi/samples/hello.iyi
PowerShell
irm https://raw.githubusercontent.com/iyilang/iyi/master/install.ps1 | iex
& "$env:LOCALAPPDATA\Programs\iyi\bin\iyi.exe" run "$env:LOCALAPPDATA\Programs\iyi\share\iyi\samples\hello.iyi"