installation

Meshtastic Python Library

This library provides a command-line interface (CLI) for managing the user settings of Meshtastic nodes and provides an easy API for sending and receiving messages over mesh radios. Events are delivered using a publish-subscribe model, and you can subscribe to only the message types you are interested in.

The Meshtastic-python repo is an excellent source of information. If you wish to view the code or contribute to the development of the Python library or the command-line interface, please visit the Meshtastic Python GitHub page.

Prerequisites

Before installing, ensure that your system meets the following requirements:

After ensuring the requirements are met, follow the installation instructions for your operating system in the tabbed section below.

Installation Instructions

To install the Meshtastic CLI, select the tab for your operating system and follow the step-by-step instructions for installing via pip. For Ubuntu only, you can alternatively install the Standalone version if you prefer.

      <Icon icon="mdi:linux" height="1.5rem" style={{ marginRight: "0.25rem" }} /> Linux
    </>
  ),
  value: "linux",
},
{
  label: (
    <>
      <Icon icon="mdi:apple" height="1.5rem" style={{ marginRight: "0.25rem" }} /> macOS
    </>
  ),
  value: "macos",
},
{
  label: (
    <>
      <Icon icon="mdi:microsoft" height="1.5rem" style={{ marginRight: "0.25rem" }} /> Windows
    </>
  ),
  value: "windows",
},
{
  label: (
    <>
      <Icon icon="mdi:terminal" height="1.5rem" style={{ marginRight: "0.25rem" }} /> Termux for Android
    </>
  ),
  value: "termux",
},

]}>

Linux

macOS

Windows

:::info When installing Python, make sure to select the option to "Add Python to PATH" or check the box that says "Add Python to environment variables". If you missed this during installation, you can add Python to your system's PATH manually after installation. Failing to do so may result in errors when trying to use Python or pip commands. :::

Termux

:::note Be aware that the Meshtastic CLI is not able to control the nodes over USB through termux, but you can control devices over Wifi using the --host x.x.x.x option with the device IP address (ESP32 or Pico W only). Wifi connection is currently under development and may not be working properly just yet. If you would like to provide feedback or test this feature, please join our Discord server for more information. :::

You may need to close and re-open the CLI. The path variables may or may not update for the current session when installing.

Standalone Installation (Ubuntu only)

  1. Download the meshtastic_ubuntu executable from the Releases page.
  2. Run the following command to make the file executable and rename it meshtastic:
chmod +x meshtastic_ubuntu && mv meshtastic_ubuntu meshtastic
  1. To run the CLI:
./meshtastic

:::tip Copy (or move) this binary somewhere in your path. :::