Skip to content

Packages

All packages target .NET 10+ and are published to NuGet under the Repl family.

The meta-package. Bundles Repl.Core + Repl.Defaults + Repl.Protocol.

Install this for most apps — it’s the single reference that covers routing, the interactive REPL, DI, output formats, and machine-readable contracts.

Terminal window
dotnet add package Repl

The dependency-free foundation. No DI, no hosting, just routing, binding, constraints, and the output pipeline.

Use CoreReplApp.Create() to build apps that don’t need DI.

Terminal window
dotnet add package Repl.Core

DI-enabled app facade (ReplApp), lifecycle orchestration, and default profiles:

  • UseDefaultInteractive() — REPL when no args, CLI when args given
  • UseCliProfile() — CLI-only, no interactive loop
  • UseEmbeddedConsoleProfile() — embedded in a larger host
Terminal window
dotnet add package Repl.Defaults

Machine-readable contracts — useful for tooling, agents, and testing pipelines:

  • Help contracts (structured --help --json responses)
  • Error contracts
  • Minimal MCP manifest types
Terminal window
dotnet add package Repl.Protocol

Expose your entire command graph as an MCP server:

  • app.UseMcpServer() — one line to activate
  • Tools, resources, prompts
  • MCP Apps UI resources
  • Behavioral annotations (.Destructive(), .ReadOnly(), .Idempotent(), .OpenWorld(), .LongRunning())
  • Client roots support
  • Transport factory
Terminal window
dotnet add package Repl.Mcp

Spectre.Console integration:

  • Rich renderables as command return values (Table, Panel, Tree, BarChart, Calendar, …)
  • UseSpectreConsole() — enables rich prompts and renderables in one call
  • IAnsiConsole DI injection (session-safe across hosted sessions)
  • Automatic capability detection and graceful degradation
Terminal window
dotnet add package Repl.Spectre

WebSocket transport for hosted sessions — serves REPL sessions over WebSocket connections from an ASP.NET Core app:

  • app.MapReplWebSocket("/repl") — registers the WebSocket endpoint
  • Per-session scope, shared singletons, terminal metadata, session registry
  • Network-transport layer only; combine with Repl.Telnet to add session-protocol framing
Terminal window
dotnet add package Repl.WebSocket

Telnet session protocol layered over a WebSocket transport — adds Telnet framing and terminal negotiation for clients that speak Telnet:

  • app.MapReplTelnet("/telnet")
  • NAWS (RFC 1073) window-size negotiation and TERMINAL-TYPE (RFC 1091) detection
  • WebSocket is the network transport; Telnet is the session protocol above it
Terminal window
dotnet add package Repl.Telnet

Session-aware logging context for Repl apps:

  • AddReplLogging() — registers the logging context services
  • Injects ReplLoggingMiddleware automatically via ReplApp for structured log scopes
  • Adds REPL session metadata (ReplSessionId, ReplTransport, etc.) to every log scope
  • No sink included — bring your own provider (Serilog, OpenTelemetry, etc.)
Terminal window
dotnet add package Repl.Logging

In-memory multi-session test harness:

  • ReplTestHost — builds your command graph in memory
  • ReplSessionHandle — runs commands, inspects results
  • Typed result assertions
  • Interaction timeline (prompts, answers, output events)
  • Multi-session shared-state tests
Terminal window
dotnet add package Repl.Testing