Introduction
zil started as a calculator and grew into a scripting language and a shell. You don’t need all of that on day one. Read the section closest to how you work now, and come back to the others when you’re curious.
coming from a calculator or spreadsheet
Section titled “coming from a calculator or spreadsheet”Type the math the way you’d write it on paper, units and all. zil keeps track of them, so 100 km / 2 h comes out as a speed, and adding meters to seconds is an error instead of a wrong answer. Put to after anything to see it another way: other units, a fraction, a time zone.
Every answer is saved. _ is the last one and _1, _2 and so on are the numbered ones, so you can build on a result like you would with a calculator’s memory. When you want more, like rounding, averages or dates, there’s a function for it already loaded. help lists them, and putting ? after anything explains it.
1# units come along2100 km / 2 h50 km/h3# to converts4100 km / 2 h to mph31.0686 mph5# into mixed units61.8 m to ft in"5 ft 10.8661 in"7# percentages880 + 15%929# three of them, with tax1019.99 * 3 * (1 + 8.25%)64.917511# how long a download takes124.7 GB / 50 Mbps to min12.5333 min13# a column total14[12.50, 8.25, 31].sum51.7515# when a call lands in Tokyo16date("2026-12-25 18:30") to "Tokyo"2026-12-26 09:30:00 +09:00coming from Python or JavaScript
Section titled “coming from Python or JavaScript”Most of what you know carries over. There are variables, functions, if, for and while, lists and maps, and string interpolation with {}. What’s different is mostly about typing less. Nothing needs importing, since the whole library is always loaded. Any function can be called as a method, so x.f(y) means f(x, y) and you can write a chain of steps in the order they happen. Calls with no arguments drop the parens, and |x| x * 2 is a lambda.
Numbers behave more like math than like floats. Decimals are exact, so 0.1 + 0.2 == 0.3 really is true, integers never overflow, and 1 / 3 stays a third instead of rounding. Units are part of the value too, so mixing up meters and feet is an error instead of a bug you find later.
1# x.f(y) is f(x, y)2"a-b-c".split("-")["a", "b", "c"]3# no arguments, no parens4"hello".upper"HELLO"5# lambdas6[1, 2, 3].map(|x| x * 10)[10, 20, 30]7# |> pipes a value into a function8[3, 1, 2] |> sort[1, 2, 3]9# functions10double = fn(x) { x * 2 }; double(4)811# interpolation12"2 + 2 = {2 + 2}""2 + 2 = 4"13# exact decimals140.1 + 0.2 == 0.3true15# fractions stay exact161 / 3 * 3 == 1true17# no overflow182 ** 1001267650600228229401496703205376coming from bash
Section titled “coming from bash”zil has a command mode, so a lot of everyday shell use works as is. A line that starts with a command like ls, cd or grep is a shell command, and ! runs any other program, like !git status. Pipes, globs and > redirection all work.
The difference is what comes back. zil’s own commands return values, not text, so ls gives you a table of files you can filter or sum without parsing anything. |> hands the result back to zil so you can keep going, and for anything with real logic you get a proper language instead of [[ ]] and $(( )).
A few habits don’t carry over. Single quotes, $VAR and brace expansion are errors, and help shell shows what to write instead. Below, each line is shown with the zil call it turns into, which desugar shows for any line.
# long listing, hidden files tools -la src# → ls("src", long: true, all: true)# run any program!git status# → exec(["git", "status"], tty: true)# pipe into a programls | sort# → exec(["sort"], stdin: ls(), tty: true)# hand the result back to zills src |> len# → ls("src") |> len# only the big filesls src |> where(|f| f.size > 10 KB)# → ls("src") |> where(|f| f.size > 10 KB)# a zil value as an argumentrm {old}# → rm(old)where to go next
Section titled “where to go next”help examples is a long page of one-liners grouped by module, and the quickest way to see what’s in here. help syntax covers the whole language on one screen. help advanced has longer recipes that mix several modules. And help on its own lists every module, so help time or help geo shows everything in one.
Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.