A hyperextensible agent harness.

A small Rust kernel confines processes, persists sessions, renders the terminal UI, and runs Lua 5.5 plugins. Read, wrap, or replace everything above it.

Get started
$ curl -fsSL https://signalridge.github.io/mare/install.sh | sh
A mare session: the agent reads a file, edits it and shows the diff

Recorded from the real terminal UI against an offline scripted model.

Rust isolation, Lua plugins.

Rust handles process isolation, session storage, and terminal rendering. Lua plugins implement the agent loop, tools, providers, compaction, and UI components.

mare layered architecture Four-layer architecture of mare: Front ends (TUI via mare-cli and mare-tui, Headless, mare RPC 3.0 over JSON-RPC 2.0, HTTP/WS listener, ACP) over Plugins (Built-in Lua 5.5, User and project config, Packages), Public Lua API (Cordis services, Event and policy bus, UI components), and the Rust core kernel (OS sandbox, Durable JSONL appends, File snapshots, Lua watchdog, Runtime and TUI). Front ends five ways into the same session Terminal UI mare (mare-cli/tui) Headless -p · --json mare RPC 3.0 --rpc (JSON-RPC 2.0) HTTP / WS listener --web (plugin UI/RPC) Editor ACP mare acp commands · prompts · event streams Plugins Lua 5.5 · readable, replaceable (override = true) Built-in plugins agent · tools · providers · compact · session permissions · ui components/themes · mcp · changes User & project config ~/.config/mare/init.lua · plugins/ .mare/plugins/ (trusted projects) Packages mare.plugins.add(...) mare-plugins & git repos inject / provide · service contracts Public Lua API stable plugin contract (mare runtime types) Cordis services ctx.agent · tools · llm · session Events & policy bus ctx:on · ctx.bus · ctx.policy UI components ui.* / mare.ui.* · overlays · keymaps guarded Rust bindings · safety boundary Rust core kernel confinement, durability & runtime guarantees OS sandbox bwrap · Landlock Seatbelt · WinACL/User Durable store mare-store JSONL tree via session plugin File snapshots mare-binding::snapshot per-turn /rewind Lua watchdog watchdog_ms aborts slow coroutine Runtime & TUI Lua 5.5 (mlua 0.12) mare-tui · trust
Rust handles process isolation, session storage, and terminal rendering; Lua plugins implement the agent loop, tools, and UI components.

Rust core

Native binary

OS sandboxing, durable JSONL storage, file snapshots, project trust, watchdog, and terminal renderer.

Built-in plugins

Lua 5.5

Agent loop, tools, model providers, compaction, permissions, sessions, review, and MCP client.

Your plugins

Lua 5.5

Extend or replace any built-in with override = true from init.lua, user plugins, or packages.

Plugins

Built-in and user plugins communicate through Cordis services and events.

Inspect and replace built-in plugins.

Inspect built-in sources with mare runtime, override any plugin by name with override = true, and apply changes live with /reload.

Plugin model
show-model.lua
-- ~/.config/mare/plugins/show-model.lua
return {
  name = "show-model",
  inject = { "llm", "commands" },
  apply = function(ctx)
    ctx.commands:register("which-model", {
      description = "Show the current model",
      run = function()
        local m = ctx.llm:current()
        ui.notify(m and m.ref or "no model")
      end,
    })
  end,
}

Isolated child agents and side threads.

Subagents run with their own session context; they inherit the parent working directory unless cwd is set, with per-type or per-call tools and model. Define types in Markdown and inspect them in /agents.

Subagents
---
name: security-auditor
description: Audits changes for secret leaks.
tools: [read, ls]
effort: high
---
You are a read-only security reviewer.

Fork, branch, and rewind turns.

Messages and step commits are persisted to append-only JSONL, and file tools snapshot originals before editing so code and history revert together.

Sessions
/fork
branch from your latest message
/tree
branch from any earlier point
/rewind
restore files to a turn
mare -c
continue the last session

OS-level process confinement.

Commands run under bubblewrap or Landlock on Linux, Seatbelt on macOS, or restricted Windows tokens. Untrusted projects skip project code.

Permissions and sandbox
mare --permission auto

Read files your user can read; write inside the workspace and temp directories. Asks before expanding write access.

Unified effort control across providers.

Use a ChatGPT account, API keys, or any OpenAI-compatible endpoint. Set reasoning effort per model on the CLI or inside a session.

Models and providers

openai · anthropic · google · opencode-go · deepseek · kimi · kimi-code · openrouter · ollama · lmstudio

Set on the CLI or switch inside a session:

/effort high · mare --effort high

One engine, five front ends.

Run headless prompts or JSON streams in CI, connect editors via ACP, or drive sessions over mare RPC 3.0 (JSON-RPC 2.0) and WebSocket.

RPC and integrations
cli · acp · rpc · web
# one-shot, for scripts
$ mare -p "summarize the open TODOs in @src"
# JSON event stream for CI
$ mare --json "fix the failing test" | jq -c .
# editors (Agent Client Protocol)
$ mare acp
# mare RPC 3.0 (JSON-RPC 2.0) on stdio, or HTTP + WebSocket
$ mare --rpc
$ mare --web

Single binary, measurable startup.

Built-in plugins ship compiled into one binary. Profile boot stages with --profile-startup or start without user config via --clean.

CLI reference
  • $ mare --profile-startup
  • $ mare --startuptime startup.log
  • $ mare --clean

Install and run.

Select a platform. The install script verifies the release archive against checksums.txt.

Install script

curl -fsSL https://signalridge.github.io/mare/install.sh | sh

Homebrew

brew tap signalridge/tap
brew trust signalridge/tap
brew install --cask mare

Nix (NUR)

nix profile install github:signalridge/nur-packages#mare

First run.

Install, cd into a repository, and run mare. When onboarding is enabled and no provider credentials are available, the TUI guides login and default model selection.

Quickstart

Release archives

Prebuilt archives for six targets, each with SHA-256 checksums.

Releases also include .deb and .rpm packages, checksums.txt, Cosign signatures, and build attestations. Installation guide