Getting Started
This guide will help you install and configure Moonriver.
Prerequisites
Before installing Moonriver, ensure you have:
- A working Klipper installation with Moonraker
- Rust and Cargo installed (for building from source)
- Network access to your Moonraker instance
Installation
Method 1: Install from crates.io
The simplest method is to install directly from crates.io:
cargo install moonriverThis will download, compile, and install Moonriver to your Cargo bin directory (usually ~/.cargo/bin/).
Method 2: Using cargo-binstall
If you have cargo-binstall installed:
cargo binstall moonriverThis downloads pre-built binaries if available, which is faster than compiling.
Method 3: Build from Source
For the latest development version:
# Clone the repository
git clone https://github.com/willpuckett/moonriver.git
cd moonriver
# Build in release mode
cargo build --release
# The binary will be at target/release/moonriver
# Optionally, copy it to your PATH
sudo cp target/release/moonriver /usr/local/bin/Verify Installation
Check that Moonriver is installed correctly:
moonriver --versionYou should see output like:
moonriver 0.1.0First Connection
Connect to your printer for the first time:
moonriver --host <your-printer-ip> --port 7125For example:
moonriver --host 192.168.1.100 --port 7125If successful, you'll see:
Connecting to ws://192.168.1.100:7125/websocket...
Connected to Moonraker!
🌙 Moonriver - Klipper Console 🌙
Type your G-code commands below. Use Ctrl+D or 'exit' to quit.
Use ',' to separate multiple commands on one line.
Type 'M112' for emergency stop.
>Basic Usage
Try some basic commands:
# Home all axes
> G28
# Check temperature
> M105
# Get current position
> GET_POSITION
# Exit
> exitTroubleshooting
Cannot Connect
If you see connection errors:
Verify Moonraker is running:
bashcurl http://<printer-ip>:7125/printer/infoCheck the port: Default is 7125, but verify in your Moonraker config
Try IP address: Use the IP address instead of hostname
Check firewall: Ensure port 7125 is not blocked
Command Not Found
If the moonriver command isn't found after installation:
Ensure
~/.cargo/binis in your PATH:bashecho 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc source ~/.bashrcOr use the full path:
bash~/.cargo/bin/moonriver --host <printer-ip> --port 7125
Configuration
For convenience, you can create shell aliases:
# Add to ~/.bashrc or ~/.zshrc
alias moon='moonriver --host 192.168.1.100 --port 7125'
alias moon-test='moonriver --host test-printer.local --port 7125'Then simply run:
moonSee the Configuration Guide for more options.
Next Steps
- Quick Start - Common commands and workflows
- Interactive Mode - REPL features
- Scripting Mode - Automation and scripts