How jonsequitur/dotnet-repl works
Main Components
a. Core REPL Engine Layer:
• Input Kernel (InputKernel.cs)
• Command Parser (CommandLineParser.cs)
• REPL Execution Engine (Repl.cs)
• Kernel Builder (KernelBuilder.cs)
b. Language Support Layer:
• C# Kernel
• F# Kernel
• Markdown Kernel
c. Input/Output Processing:
• Line Editor Commands (LineEditorCommands/)
• Document Parser (DocumentParser.cs)
• Document Converter (DocumentConverter.cs)
• Console Output Formatting (SpectreFormatter.cs)
d. Automation & File Handling:
• Notebook Runner (Automation/NotebookRunner.cs)
• File Import/Export capabilities
• Supported file formats (.ipynb, .dib, .cs, .fsx, etc.)
Interaction Flows
• User Input → Command Parser → REPL Core
• REPL Core → Language Kernels → Execution
• Execution Results → Output Formatting → Console Display
• File Import → Notebook Runner → REPL Core
External Dependencies
• .NET Interactive
• Spectre.Console
• NuGet Package Management
Additional Details
Small annotations showing:
• Support for multi-line input
• Magic commands (#! syntax)
• NuGet package integration
• Session state management
• Keyboard shortcut handling