Jitzu

An interactive shell and a typed scripting language.

Runtime .NET 10
Packages Any NuGet library
Platforms Win · Mac · Linux
License Open source
Scroll

Same task. Less noise.

PowerShell Get-ChildItem -Recurse -Filter *.cs
Jitzu find -ext cs
PowerShell $obj | Select-Object -ExpandProperty Name
Jitzu obj.name
PowerShell try { } catch [System.Exception] { $_ }
Jitzu let val = risky()?
Bash result=$(cmd) && echo $result
Jitzu let result = cmd(); print(result)
Bash everything is a string
Jitzu Int, String, Bool, Result<T, E>, Option<T>

60+ built-in commands

lscdpwdcatgrepfindmkdirrmcpmvechotouchheadtailsortuniqwccutdiffaliasunaliaslabelunlabelhistoryclearexitenvsetexportwhichwhoamihostnameuptimepskilljobsfgbgsudochmodopenteemorelesstreedudfdatetimesleepseqyestruefalsetesthelpversionmonitor
lscdpwdcatgrepfindmkdirrmcpmvechotouchheadtailsortuniqwccutdiffaliasunaliaslabelunlabelhistoryclearexitenvsetexportwhichwhoamihostnameuptimepskilljobsfgbgsudochmodopenteemorelesstreedudfdatetimesleepseqyestruefalsetesthelpversionmonitor
monitorversionhelptestfalsetrueyesseqsleeptimedatedfdutreelessmoreteeopenchmodsudobgfgjobskillpsuptimehostnamewhoamiwhichexportsetenvexitclearhistoryunlabellabelunaliasaliasdiffcutwcuniqsorttailheadtouchechomvcprmmkdirfindgrepcatpwdcdls
monitorversionhelptestfalsetrueyesseqsleeptimedatedfdutreelessmoreteeopenchmodsudobgfgjobskillpsuptimehostnamewhoamiwhichexportsetenvexitclearhistoryunlabellabelunaliasaliasdiffcutwcuniqsorttailheadtouchechomvcprmmkdirfindgrepcatpwdcdls
The Shell

Everything you need at the prompt.

Tab Completion

Files, commands, variables, and types — all completable with Tab.

Typed Pipes

Pipe OS command output into Jitzu functions. Types flow through the pipeline.

History & Search

Ctrl+R reverse search, arrow-key predictions, and a git-aware prompt.

jitzu
simon ~/projects/api (main) *
> find src -ext cs
src/Parser.cs
src/Lexer.cs
src/Interpreter.cs
> git log --oneline | first
a1b2c3d Add pattern matching support
> let msg = "hello, world"
> msg.ToUpper()
"HELLO, WORLD"
> alias ll="ls -la"
Alias set: ll → ls -la
>
Directory Labels

Name your directories.
Use them everywhere.

No symlinks. No drive mapping. No editing fstab. Just give a directory a name and use it as a path prefix — in cd, ls, cat, anywhere.

Works as a path prefix: cd git:jitzu/site
Tab completes label names and paths after the colon
Saved to your config — available in every session
Jitzu
// Label a directory
label git ~/git/

// Now use it anywhere
cd git:jitzu/site
ls git:jitzu/Tests/
cat git:jitzu/README.md

// List all your labels
labels
// git: → /home/simon/git/
// proj: → /home/simon/projects/

// Remove one
unlabel proj
The Language

Oh, it's also
a full language.

Rust's enums. C#'s runtime. TypeScript's ergonomics. Compiled to bytecode, running on .NET's VM.

Pattern matching

Match on types, destructure fields, guard with conditions.

Jitzu
let result = match GetUser() {
    Ok(user) => `Hello, {user.name}!`,
    Err(e) => `Failed: {e}`,
}

Result<T, E> and the ? operator

Propagate errors without try/catch. Compose fallible operations.

Jitzu
fun load_config(): Result<Config, Error> {
    let file = try read_file("config.json")
    let parsed = try parse_json(file)
    return Ok(parsed)
}

Traits and impl blocks

Define shared behavior, implement it on any type.

Jitzu
trait Greet {
    fun greeting(self): String
}

impl Greet for User {
    fun greeting(self): String {
        `Hey, {self.name}!`
    }
}

Types with type inference

Define types with pub fields. Types are inferred from context.

Jitzu
type Point {
    pub x: Double,
    pub y: Double,
}

let origin = Point { x = 0.0, y = 0.0 }
let dist = (origin.x ** 2 + origin.y ** 2) ** 0.5

NuGet packages

Import any .NET package with a single line.

Jitzu
#:package Newtonsoft.Json@13.0.4
open "Newtonsoft.Json" as { JsonConvert }

let json = JsonConvert.SerializeObject(user)
print(json)