Endo¶
Stop parsing. Start piping.¶
A modern, cross-platform shell where functional programming meets everyday productivity.
The shell you always wanted -- F#-inspired, Bash-convenient, everywhere.
Why Endo?¶
Shells haven't evolved. You're still gluing strings together, guessing at exit codes, and writing brittle pipelines. Endo changes that. It brings the expressive power of functional programming to your terminal -- without sacrificing the quick-and-dirty convenience you rely on every day.
-
Functional Core
F#-inspired language with pipe operators, pattern matching, immutable-by-default bindings, and first-class functions built into the foundation.
-
Bash Compatible
Run commands, redirect output, glob files, chain with
&&and||. If your muscle memory speaks Bash, Endo understands. -
Structured Pipelines
Stop parsing
grep | awk | sedchains. Endo pipelines pass typed records between stages, so data stays intact from source to sink. -
Cross-Platform
Native support for Linux, macOS, and Windows. Write scripts once, run them everywhere -- no compatibility layers, no emulation.
-
Intelligent Completions
Context-aware tab completions powered by the type system. Endo knows what a command expects before you finish typing it.
-
Sane Error Handling
No more silent failures. Result and Option types give you explicit, composable error handling without the ceremony.
A Quick Taste¶
Familiar commands, elevated syntax:
# It's still a shell -- run anything
ls -la
git status && echo "All clean"
# F#-style bindings and string interpolation
let name = "world"
println $"Hello, {name}!"
Shell output meets functional pipelines:
# Pipe shell command output straight into F# transforms
ps aux | lines |> filter (contains _ "nginx") |> length
|> fun n -> echo $"Found {n} nginx processes"
# Process git history with functional pipelines
git log --oneline | lines |> take 5 |> each println
Functional data processing:
# Placeholder lambdas keep pipelines concise
[10; 25; 3; 42; 7] |> filter (_ > 10) |> map (_ * 2) # [50; 6; 84]
# Curried functions and partial application
let add x y = x + y
let add10 = add 10
[1; 2; 3] |> map add10 # [11; 12; 13]
# Function composition
let double = _ * 2
let inc = _ + 1
let doubleThenInc = double >> inc
print (doubleThenInc 5) # 11
Pattern matching at your prompt:
# Option types for safe value handling
match (env "EDITOR") with
| Some editor -> print $"Using {editor}"
| None -> print "No editor set"
# Result types for explicit error handling
let safeDiv x y =
if y == 0 then Error "division by zero"
else Ok (x / y)
match safeDiv 10 0 with
| Ok n -> print $"Result: {n}"
| Error e -> print $"Failed: {e}"
Lists, ranges, and comprehensions:
# Ranges and comprehensions
let squares = [for x in [1..10] -> x * x]
let evens = [for x in [1..20] when x % 2 == 0 -> x]
# Recursive processing with pattern matching
let rec sum acc lst =
match lst with
| [] -> acc
| head :: tail -> sum (acc + head) tail
print (sum 0 [1; 2; 3; 4; 5]) # 15
Quick Links¶
- Getting Started -- Build from source and write your first Endo script
- Language Reference -- Complete language documentation
- Shell Features -- Interactive shell capabilities
- Examples -- Real-world code examples
- FAQ -- Frequently asked questions
- Roadmap -- Development plans and progress
License¶
Licensed under the Apache License 2.0. See LICENSE for details.