A terminal-based console for connecting to and interacting with Klipper instances via the Moonraker WebSocket API.
Moonriver provides a fast, efficient, and color-coded way to monitor and control your 3D printer, all from the comfort of your command line. Built entirely in Rust for speed and reliability.
In the tradition of klipper-repl and krui, Moonriver brings command-line control to Klipper 3D printers.
Moonriver offers three modes of operation: TUI (Terminal User Interface), Interactive REPL, and Scripting mode.
The Terminal User Interface is now the default mode, providing a comprehensive dashboard for monitoring and controlling your 3D printer.
- Temperature Display β Compact single-line display showing all temperatures
- Live extruder, bed, and chamber temperatures with clickable setpoints
- Click on any temperature setpoint to edit and press Enter to apply
- Color-coded by proximity to target: Green (at temp), Yellow (approaching), Cyan (heating/cooling)
- Shows MCU temperatures and fan speeds with RPM
- Position Display β Compact single-line position bar (toggleable)
- Live X/Y/Z coordinates with homed status indicators (β/β)
- Click on any position value to edit and press Enter to move axis
- Click the π Home All button to home all axes
- Floating point precision for accurate positioning
- Print Status β Active print job details including filename, duration, and filament used
- Connection Status β Visual feedback of Moonraker connection state
- Tab Navigation β Switch between views using semantic keys:
m- Main dashboard with temperatures and job statusc- Console for GCode commands (coming soon)p- Position display with homed statusj- Print job history browser (coming soon)h- Help screen
- Toggle Panels β Control visibility with:
t- Toggle temperature bar on/offp- Toggle position bar on/off
- Mouse Support β Click to interact with UI elements:
- Click temperature setpoints to edit target values
- Click position coordinates to move axes
- Click π Home All button to home all axes
- Click footer tabs to switch views
- Context-Sensitive Help β Footer shows available keys for current view
- Press
Ctrl+Cto trigger emergency stop (M112) and exit - Press
qorEscto exit normally
- Moonraker WebSocket Integration β Connects directly to a remote Moonraker instance using its WebSocket API, providing real-time data without polling
- Built with Rust β Leverages Rust's memory safety and performance characteristics for a fast, low-latency experience
- Simple Configuration β Easily configure the Moonraker host address and API key via a simple configuration file or command-line arguments
- Automatic Reconnection β Reconnects automatically if Klipper restarts or is unavailable
- Scripting Support β Run commands non-interactively for automation
- Multiple Commands β Execute multiple G-Code commands per line using
,as a separator - Tab Autocompletion β Tab completion for user-defined macros
- Multiple Printers β Control multiple printers via GNU Parallel
- Rich Terminal Coloring β Color-coded output categorizes different types of information (green for G-code responses, yellow for warnings, red for errors) for easy readability at a glance
- Interactive Command Line β Familiar, interactive command-line interface for sending commands
- Command History β Access and reuse previous commands using the up and down arrow keys
- Syntax Highlighting β Syntax highlighting for both G-Code and user-defined macros
- G-code Submission β Directly submit G-code commands to your Klipper instance and view immediate responses
- Configuration File Access β Easily retrieve and potentially modify Klipper
configuration files (
printer.cfg, etc.) directly through the console - Printer Status Monitoring β Display key status information:
- Tool/Bed Temperatures: Real-time temperature readings and target values
- Extruder Position/State: Current position and state information
- Homing/Mainsail Status: Quick access to the printer's operational state
- Macro Execution β Send and execute defined Klipper macros instantly
- Emergency Stop β Ctrl+C emergency stop (TUI) or M112 (REPL)
Launch the full Terminal User Interface (this is now the default):
moonriver --host <moonraker-url> --port <port>
# or simply:
moonriverKey Bindings:
m- Main dashboardc- Consolep- Toggle position barj- Jobshor?- Helpq- QuitCtrl+C- Emergency stopt- Toggle temperature bar
To use the classic REPL interface:
moonriver --repl --host <moonraker-url> --port <port>Once connected, you can type your G-code commands:
> G28
> M104 S200
Execute commands non-interactively for automation:
moonriver --command "G28, M104 S200, G1 X100 Y100" --host <moonraker-url>
# or short form:
moonriver -c "G28, M104 S200" --host <moonraker-url>> G28
// Printer response: X axis homed
// Printer response: Y axis homed
// Printer response: Z axis homed
> M105
// Printer response: T:20.5 /0.0 B:21.1 /0.0
> GET_TEMP SENSOR=heater_bed
// Printer response: // Current temperature of heater_bed is 21.1
You can evaluate one line of G-Code as follows. Note that you can use the ,
character to incorporate multiple G-Code commands into one line, and that G-Code
is case-insensitive (but generally gets converted to uppercase by Klipper).
moonriver --host <moonraker-url> --port <port> g28, screws_tilt_calculateTyping the command m112 into moonriver will immediately discard the rest of
the command buffer and send an emergency stop signal to Klipper.
Full documentation is available at: moonriver.rs
brew install moonrivercargo install moonrivercargo binstall moonriverDownload the appropriate .deb file from the
releases page:
# Download for your architecture (amd64 or arm64)
wget https://github.com/willpuckett/moonriver/releases/latest/download/moonriver_VERSION_amd64.deb
# Install
sudo dpkg -i moonriver_VERSION_amd64.debgit clone https://github.com/willpuckett/moonriver.git
cd moonriver
cargo build --release
sudo cp target/release/moonriver /usr/local/bin/We welcome contributions! If you have suggestions or want to report a bug, please open an issue on GitHub. If you're interested in contributing code, feel free to submit a Pull Request!