Skip to content
Projects

contour-terminal/endo has 32 GitHub stars and 3 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 05:30 UTC. Last push 2026-11-06.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

A modern, cross-platform functional-first shell programming

AI

README.md

Original
Endo logo

Endo

A cross-platform shell with F#-inspired functional programming.

Linux macOS Windows License


Getting Started · Features · Examples · Documentation · Installation · Contributing

Early Development — Endo is under active development. The language, builtins, and APIs may change. Feedback and contributions are very welcome!

What Is Endo?

Endo is an interactive shell and scripting language that combines familiar command-line conventions with ideas from functional programming — primarily F#. It runs natively on Linux, macOS, and Windows.

  • Structured pipelines — data flows as typed records, not only plain text
  • Pattern matching and algebraic types — Option, Result, discriminated unions
  • Type inference — types are checked but rarely need to be written
  • Bash compatibility — redirects, globs, &&/||, and command execution work as expected

Features

F#-Inspired Language

Pipe operators, pattern matching, immutable-by-default bindings, and first-class functions form the core of the language.

Familiar Shell Conventions

Run commands, redirect output, glob files, chain with && and ||. Everyday shell usage works the way you'd expect.

Structured Pipelines

Pipelines pass typed records between stages, so data stays intact from source to sink.

Cross-Platform

Runs natively on Linux, macOS, and Windows from the same source — scripts are portable without compatibility layers.

Context-Aware Completions

Tab completions are informed by the type system, offering relevant suggestions based on what a command or function expects.

Explicit Error Handling

Result types (Ok/Error) and option types (Some/None) make error paths visible and composable.

Examples

Basic usage:

# 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 commands in functional pipelines:

# Structured builtins return typed records — no text parsing needed
ps |> filter (_.command |> contains "endo") |> length
|> fun n -> println $"Found {n} endo processes"

# git log returns structured commit data
git log |> take 5 |> each (fun c -> println c.message)

Functional data processing:

# Placeholder lambdas keep pipelines concise
[10; 25; 3; 42; 7] |> filter (_ > 10) |> map (_ * 2)   # [50; 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

Cross-platform scripting:

# Works the same on Linux, macOS, and Windows
let config_dir =
    match (env "OS") with
    | Some "Windows_NT" -> "C:/Users/endo/config"
    | _                 -> $"{env "HOME" ?| "/tmp"}/.config/endo"

mkdir -p $config_dir

Getting Started

# Clone and build
git clone https://github.com/contour-terminal/endo.git
cd endo
cmake --preset clang-release
cmake --build --preset clang-release

# Launch
./build/clang-release/src/shell/endo

Installation

From Source

git clone https://github.com/contour-terminal/endo.git
cd endo
cmake --preset clang-release
cmake --build --preset clang-release
sudo cmake --install build/clang-release

The experimental AI agent features are off by default in a source build; add -DENDO_ENABLE_AGENT=ON at configure time to include them. The packages below are built with them enabled.

Debian / Ubuntu (.deb)

Each release ships a .deb built against the latest Ubuntu LTS, plus a matching .ddeb with debug symbols:

sudo apt install ./endo_<version>_amd64.deb
# optional, for debugging / crash reports:
sudo apt install ./endo-dbgsym_<version>_amd64.ddeb

The package also installs a desktop entry and the Endo icon, so Endo shows up in your application menu and opens in your terminal emulator.

To build the package yourself (requires Docker):

./scripts/package-deb.sh dist   # writes dist/endo_<version>_amd64.deb (+ .ddeb)

Other Package Managers

Coming soon — Homebrew, Scoop, and RPM packages are on the roadmap.

Contributing

Contributions are welcome — bug reports, feature ideas, documentation improvements, or code.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-thing)
  3. Commit your changes
  4. Open a pull request

Please see CONTRIBUTING.md for detailed guidelines.

License

Licensed under the Apache License 2.0. See LICENSE for details.