Skip to content

Getting Started

This guide walks you through building Endo from source, launching the shell, and writing your first commands.

Prerequisites

Before building, ensure you have:

  • A C++23-compatible compiler (Clang 17+ recommended, GCC 14+ also works)
  • CMake 3.26 or newer
  • Git for cloning the repository
  • A Linux or macOS system (Windows support is in progress)

Compiler Support

Endo uses modern C++23 features including std::expected, std::format, and constexpr extensively. Clang 17+ with libc++ provides the best support.

Build from Source

Clone the Repository

git clone https://github.com/contour-terminal/endo.git
cd endo

Configure and Build

Endo uses CMake presets for streamlined builds. For a release build (recommended for daily use):

cmake --preset clang-release
cmake --build --preset clang-release

For a debug build (for development and testing):

cmake --preset clang-debug
cmake --build --preset clang-debug

Build Options

The AI agent features -- LLM providers, agent mode and the MCP client -- are experimental and off by default. Enable them at configure time:

cmake --preset clang-release -DENDO_ENABLE_AGENT=ON
cmake --build --preset clang-release

Building with them enabled also pulls in llama.cpp for local inference, which noticeably lengthens the first build. The official packages (.deb, .msi, .dmg and the static Linux binary) are built with agent support enabled, so this only affects builds from source. See the AI Agent documentation.

Install (Optional)

sudo cmake --install build/clang-release

Launch Endo

After building, launch the interactive shell:

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

You should see the Endo prompt. Try a few commands:

# Classic shell commands work as expected
echo "Hello from Endo!"
ls -la
pwd

Hello World

Shell Style

echo "Hello, World!"

F# Style

let greeting = "Hello, World!"
println greeting

With String Interpolation

let name = "World"
println $"Hello, {name}!"

Combining Shell and F

# Capture shell output and process it functionally
let user = & whoami
println $"Welcome, {user}!"

# Pipe shell output into F# functions
ls | lines |> length |> fun n -> println $"Found {n} entries"

Run the Tests

To verify your build is working correctly:

ctest --preset=clang-release

Or for the debug build:

ctest --preset=clang-debug

Configuration

Endo loads ~/.config/endo/init.endo on startup. You can place aliases, prompt configuration, and other setup there:

# ~/.config/endo/init.endo

# Set the prompt preset
set_prompt_preset "endo-signature"

# Define aliases
let ll ...args = & exa -l ...args
let gs ...args = & git status ...args

To start Endo without loading this file, use --no-profile:

endo --no-profile

Next Steps