A .NET framework for building composable command surfaces.
- Define your commands once — run them as a CLI, explore them in an interactive REPL,
- host them in session-based terminals, expose them as MCP servers and MCP Apps for AI agents,
- or drive them from automation scripts.
New here? Start at repl.yllibed.org — installation, your first app, guides, cookbook, and API reference.
dotnet add package Replusing Repl;
var app = ReplApp.Create().UseDefaultInteractive();
app.Map("hello", () => "world");
return app.Run(args);using Repl;
var app = ReplApp.Create().UseDefaultInteractive();
app.Context("client", client =>
{
client.Map("list", () => new { Clients = new[] { "ACME", "Globex" } });
client.Context("{id:int}", scoped =>
{
scoped.Map("show", (int id) => new { Id = id, Name = "ACME" });
scoped.Map("remove", (int id) => Results.Cancelled($"Remove {id} cancelled."));
});
});
return app.Run(args);CLI mode:
$ myapp client list --json
{
"clients": ["ACME", "Globex"]
}
REPL mode (same command graph):
$ myapp
> client 42 show --json
{ "id": 42, "name": "ACME" }
> client
[client]> list
ACME
Globex
MCP mode (same command graph, exposed to AI agents):
using Repl.Mcp;
app.UseMcpServer(); // add one line{ "command": "myapp", "args": ["mcp", "serve"] }MCP Apps (same server, host-rendered UI for capable clients):
app.Map("contacts dashboard", (IContactStore contacts) => BuildHtml(contacts))
.WithDescription("Open the contacts dashboard")
.AsMcpAppResource();One command graph. CLI, REPL, remote sessions, and AI agents — all from the same code.
Repl is the meta-package that bundles Core + Defaults + Protocol — start here.
Progressive learning path — each sample builds on the previous. Each sample has a companion cookbook page with explanations and patterns.
| Sample | Cookbook |
|---|---|
| Core Basics — routing, constraints, help, output modes | repl.yllibed.org/cookbook/core-basics/ |
Scoped Contacts — dynamic scoping, .. navigation |
repl.yllibed.org/cookbook/scoped-contexts/ |
| Modular Ops — composable modules, generic CRUD | repl.yllibed.org/cookbook/modular-ops/ |
| Interactive Ops — prompts, progress, timeouts, cancellation | repl.yllibed.org/cookbook/interactive-prompts/ |
| Hosting Remote — WebSocket / Telnet session hosting | repl.yllibed.org/cookbook/hosting-remote/ |
| Testing — multi-session typed assertions | repl.yllibed.org/cookbook/testing/ |
| Spectre — Spectre.Console renderables, visualizations, rich prompts | repl.yllibed.org/cookbook/spectre/ |
| MCP Server — MCP tools, resources, prompts, and MCP Apps UI | repl.yllibed.org/cookbook/mcp-server/ |
| Architecture | Best Practices & FAQ |
| Coming from CLI frameworks | Packaging & Distribution |
| Packages overview | API Reference |
| Glossary | Dependency Injection |
If you use an AI coding agent (Claude Code, Cursor, Windsurf, Copilot, Codex, OpenCode, etc.) to build your Repl Toolkit app, install Context7 to give it access to Repl Toolkit documentation and code snippets.
Library ID: /yllibed/repl
Most agents that support MCP can use Context7 directly. Refer to your agent's documentation for MCP server configuration.
Contributions welcome — please discuss new features first to keep the toolkit aligned with its goals.
See CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md.
MIT — Copyright (c) 2026 Yllibed project / Carl de Billy