mttctl
A Rust CLI tool for interacting with Meshtastic mesh networking devices over TCP, serial, or BLE connections.
Quick Start
# Download the latest binary for your platform (includes BLE support)
# → https://github.com/matutetandil/mttctl/releases
That's it — connect, see your mesh, send a message.
Full Documentation — complete guides, all command references, and architecture details.
Purpose & Context
What it does: mttctl provides a command-line interface to Meshtastic devices, allowing you to list nodes, send messages, monitor incoming packets, query device info, ping specific nodes, manage channels, control GPIO pins, and more — all from a terminal.
Why it exists: The Meshtastic ecosystem lacks a robust, composable CLI tool built in Rust. This project aims to fill that gap as an open-source contribution, leveraging the official meshtastic Rust crate to interact with real hardware and local simulators alike.
Who it's for: Developers and operators working with Meshtastic mesh networks who want scriptable, terminal-native access to device data without a GUI.
Features (v0.4.0)
| Category | Highlights |
|---|---|
| Connectivity | TCP, serial, BLE; --no-nodes for fast startup; persistent config file |
| Messaging | send (broadcast/targeted/ACK/private), listen (with --log), reply (auto-reply with signal info) |
| Node Info | nodes (with --fields), info, support, watch (live TUI) |
| Configuration | config get/set/export/import, set-ham, set-url, begin-edit/commit-edit, set-modem-preset, ch-add-url |
| Channels | channel add/del/set/list/qr (QR to terminal, PNG, SVG; --all per-channel) |
| Device Mgmt | reboot, shutdown, reboot-ota, enter-dfu, factory-reset, set-time, canned messages, ringtone |
| Node Mgmt | set-owner, remove, set-favorite, set-ignored, set-unmessageable |
| Position | position get/set/remove with named broadcast flags |
| Remote Data | request telemetry (7 types), position, metadata |
| Network Diag | ping (RTT), traceroute (hop + SNR) |
| GPIO | gpio write/read/watch on remote nodes |
| Waypoints | waypoint send/delete/list |
| Integration | mqtt bridge (bidirectional mesh-to-MQTT), shell (REPL with tab completion) |
| Output | --json global flag, completions for bash/zsh/fish/PowerShell/Elvish |
Installation
Pre-built binaries (recommended)
Download the latest binary from GitHub Releases:
| Platform | Binary |
|---|---|
| Linux x86_64 | mttctl-linux-x86_64 |
| Linux ARM64 | mttctl-linux-aarch64 |
| macOS Intel | mttctl-macos-x86_64 |
| macOS Apple Silicon | mttctl-macos-aarch64 |
| Windows x86_64 | mttctl-windows-x86_64.exe |
# Example: Linux x86_64
Install from crates.io
Build from source
BLE support
All pre-built binaries include BLE support. When building from source:
Linux requires BlueZ: sudo apt install libbluetooth-dev
Command Reference
| Command | Description | Docs |
|---|---|---|
nodes |
List all mesh nodes with signal and device info | Messaging |
send |
Send text messages (broadcast, targeted, ACK, private) | Messaging |
listen |
Stream incoming packets in real time | Messaging |
reply |
Auto-reply with signal info (SNR, RSSI, hops) | Messaging |
info |
Display local node and device details | Messaging |
support |
Diagnostic summary for bug reports | Messaging |
ping |
Ping a node, measure round-trip time | Network |
traceroute |
Trace route with SNR per hop | Network |
config |
Get/set/export/import device configuration | Config |
channel |
Add, delete, set, list, QR code | Channel |
device |
Reboot, shutdown, factory reset, time, ringtone | Device |
node |
Set owner, remove, favorite, ignored | Node |
position |
Get, set, remove GPS position | Position |
request |
Request telemetry, position, metadata | Request |
gpio |
Remote GPIO write, read, watch | GPIO |
waypoint |
Send, delete, list waypoints | Waypoint |
watch |
Live-updating node table | Watch |
mqtt bridge |
Bidirectional MQTT bridge | MQTT |
shell |
Interactive REPL with tab completion | Shell |
completions |
Generate shell completion scripts | Completions |
config-file |
Manage persistent CLI config | Config File |
Connection Examples
# TCP (default: localhost:4403, ideal for Docker simulator)
# TCP with custom host
# Serial
# BLE by name
# BLE scan
# Skip node discovery for faster startup
# JSON output for scripting
|
Contributing
Contributions are welcome. Please ensure cargo clippy -- -D warnings and cargo fmt --check pass before submitting. See the Contributing Guide for details.
License
This project is licensed under the MIT License. See LICENSE for details.
Project Status
Current Version: 0.4.0 Development Status: Active development Stability: Experimental — API and CLI interface may change
Support
If you find this project useful, consider supporting its development: