Glossary
A quick reference for the terms used throughout this documentation.
Surfaces & modes
Section titled “Surfaces & modes”CLI — Command Line Interface
Section titled “CLI — Command Line Interface”A program you invoke from your shell with arguments — myapp client list --json. One-shot: parse the arguments, run the command, exit. You can automate it, pipe its output, and call it from scripts.
MCP — Model Context Protocol
Section titled “MCP — Model Context Protocol”The open standard that lets AI assistants discover and invoke capabilities as structured tools. An agent receives a list of available tools (name, description, input schema), calls them with typed arguments, and reads structured results — without prompt engineering or HTML scraping.
With Repl, app.UseMcpServer() maps every command in the graph to an MCP tool automatically. Route constraints become JSON Schema. Annotations (.ReadOnly(), .Destructive()) become behavioral hints.
→ MCP Mode · modelcontextprotocol.io · specification
REPL — Read-Eval-Print Loop
Section titled “REPL — Read-Eval-Print Loop”An interactive prompt that reads one command at a time, evaluates it, prints the result, and loops. Users navigate the command graph directly, building up context across commands. Comparable to python, node, or dotnet fsi, but scoped to your application’s command graph.
TUI — Text User Interface
Section titled “TUI — Text User Interface”A full-screen, keystroke-driven UI rendered in the terminal — panels, menus, live-updating widgets (think htop or vim). Repl is not a TUI framework on its own: it renders structured text output and interactive prompts. For richer full-screen surfaces, Repl.Spectre integrates Spectre.Console, which provides progress bars, tables, tree views, and more.
→ Cookbook: Spectre.Console · Wikipedia
Terminal & protocols
Section titled “Terminal & protocols”ANSI escape sequences
Section titled “ANSI escape sequences”Control codes embedded in text output to instruct a terminal to change text color, move the cursor, clear the screen, and more. The name comes from the ANSI X3.64 standard (now part of ECMA-48 and ISO 6429). Modern terminals support a superset including 256-color and 24-bit (true-color) palettes.
Repl’s default renderer uses ANSI 256-color mode. 24-bit color is available via Repl.Spectre. ANSI output is suppressed automatically when NO_COLOR is set, output is redirected, or TERM=dumb.
OSC — Operating System Command
Section titled “OSC — Operating System Command”An ANSI escape sequence prefix (ESC ]) used to send commands to the terminal emulator itself — setting the window title, reporting progress, transmitting clipboard content, and more. Repl uses OSC 9;4 to report progress state (in-progress, error, done) to terminals that support it (Windows Terminal, WezTerm, iTerm2, Ghostty).
→ Terminal Integration — Progress reporting
The command interpreter that reads what you type and launches programs. Common shells include Bash, Zsh, Fish, PowerShell, and Nushell. Repl generates shell completion scripts for all of them via myapp completion install.
A shell is distinct from a terminal: the terminal is the window you see; the shell is the program running inside it.
→ CLI Mode — Shell completion · Wikipedia
Telnet
Section titled “Telnet”A text-based network protocol (RFC 854) for remote terminal sessions. Repl ships Repl.Telnet for hosting command surfaces over Telnet connections, including NAWS (RFC 1073) for window-size negotiation and TERMINAL-TYPE (RFC 1091) for terminal identity.
→ Hosting Remote Sessions · Wikipedia
Terminal (terminal emulator)
Section titled “Terminal (terminal emulator)”A program that renders text output and accepts keyboard input, translating between the application’s byte stream and what you see on screen. Modern terminals are emulators — software that mimics the behavior of physical hardware terminals from the 1970s. Examples: Windows Terminal, iTerm2, WezTerm, Ghostty, Alacritty, GNOME Terminal, Konsole.
A terminal is distinct from a shell: the terminal is the window; the shell is the program running inside it.
→ Terminal Integration · Wikipedia
VT sequences
Section titled “VT sequences”The family of escape sequences originating from DEC VT100 and VT220 hardware terminals, now the de facto standard for terminal control. VT sequences use CSI (ESC [), SS3 (ESC O), and OSC (ESC ]) prefixes to encode cursor movement, color, keyboard events, and more. Most ANSI sequences are a subset of the VT standard.
Repl decodes VT keyboard sequences (arrow keys, Home/End, F1–F4, etc.) for sessions running over a stream pair.
→ Terminal Integration — Keyboard input
Repl concepts
Section titled “Repl concepts”Command graph
Section titled “Command graph”The full tree of commands registered via app.Map(...) and app.Context(...). It is the single source of truth for everything the application can do — projected unchanged onto CLI, REPL, hosted sessions, and MCP tools.
Command surface
Section titled “Command surface”One projection of the command graph onto a specific transport (shell arguments, interactive terminal, WebSocket, Telnet, MCP). The same handler code runs on every surface; only the I/O layer changes.
Hosted session
Section titled “Hosted session”An instance of the command graph served over a text-based transport (WebSocket, Telnet, or any custom stream pair), each with its own scope and DI lifetime. Multiple sessions can run concurrently against the same application.
Module
Section titled “Module”A class that implements IReplModule and registers a group of related commands via its Map(IReplMap map) method. Modules are the composition unit for larger applications: register a module once and all its commands become part of the graph.
→ Modules
The pattern that identifies a command, for example client {id:int} show. A route is made up of literal segments, typed parameters, and optional constraints. The framework matches incoming input against registered routes and binds the matched values to handler parameters.
Scoped context
Section titled “Scoped context”A navigable subtree of the command graph where certain route segments are fixed. When a user (or agent) enters a context — for example client 42 — subsequent commands run within that scope and see the bound values (id = 42) without repeating them on every line.
MCP in detail
Section titled “MCP in detail”MCP App
Section titled “MCP App”A command marked .AsMcpAppResource() that returns HTML. Capable clients render it as an inline UI surface under a ui:// URI, with optional preferences for display mode (fullscreen, sidebar…) and border style. Clients that do not support MCP Apps receive the normal text result instead.
→ MCP In Depth · modelcontextprotocol.io
MCP prompt
Section titled “MCP prompt”A command marked .AsPrompt(). It is exposed as a reusable prompt template that agents and hosts can instantiate with arguments — a structured way to package common instructions or workflows.
MCP resource
Section titled “MCP resource”A command marked .AsResource(). It is exposed under a repl:// URI that agents can read, subscribe to, or embed in context. Resources model data that can be fetched or watched, as opposed to actions that change state.
MCP tool
Section titled “MCP tool”A command exposed to an AI agent as a callable function. Repl generates the tool name, description, and input schema from the route and its annotations. The agent calls the tool with typed arguments; Repl routes the call through the normal handler pipeline.