Skip to main content

Module repl

Module repl 

Source
Expand description

REPL (Read-Eval-Print Loop) module root for mongosh

This module is split into several submodules responsible for different aspects of the interactive shell:

  • cursor_state : pagination cursor state
  • shared_state : shared mutable state between REPL and execution context
  • engine : ReplEngine, the main interactive loop and editor
  • completer : Completion provider for reedline
  • highlighter : Syntax highlighting for reedline
  • hinter : Inline hints for reedline
  • validator : Line validation for reedline
  • completion : Intelligent completion system for MongoDB shell and SQL

External code should typically depend on ReplEngine and SharedState. More specialized types (e.g. completer, highlighter, validator) are re‑exported for convenience but are mostly internal details of the REPL implementation.

Modules§

completion
Completion system for mongosh REPL

Structs§

CursorState
Active cursor state for pagination
ReplEngine
REPL engine for interactive command execution
SharedState
Shared state between REPL and execution context.