diff --git a/docs/software/python-cli/installation.mdx b/docs/software/python-cli/installation.mdx index 7f1a2067..7fb3880a 100644 --- a/docs/software/python-cli/installation.mdx +++ b/docs/software/python-cli/installation.mdx @@ -4,35 +4,36 @@ title: Meshtastic Python CLI installation sidebar_label: Installation slug: /software/python/cli/installation sidebar_position: 1 +description: This page offers comprehensive instructions on methods of installing the Meshtastic Python CLI across different operating systems. --- import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -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. +## Meshtastic Python Library -The [Meshtastic-python repo](https://github.com/meshtastic/Meshtastic-python) and [API documentation](https://python.meshtastic.org) are excellent sources of information. +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. -If you wish to view the code or contribute to development of the python library or the command line interface, please visit the Meshtastic python [GitHub page](https://github.com/meshtastic/Meshtastic-python). +The [Meshtastic-python repo](https://github.com/meshtastic/Meshtastic-python) and [API documentation](https://python.meshtastic.org) are excellent sources 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](https://github.com/meshtastic/Meshtastic-python). -There are standalone executables for Windows and Ubuntu if you do not want to install python and/or the python libraries required to run the meshtastic CLI tool. See [Standalone](#standalone) for more information. +### Prerequisites -Installation can also be easily done through the [Python package installer pip](https://pypi.org/project/meshtastic): -:::note -You must use pip version 20 or later. To upgrade to the latest pip, do: `pip install --upgrade pip` -::: -:::info -Make sure that the `PATH variable` also gets installed by checking the box while installing python. If you don't, python may not be available and you may not be able to call `meshtastic` from your CLI. If you do forget to check that box, you will need to install the path environment variable for python on your operating system. -::: -:::important -You may need to install a driver from Silicon Labs for the [CP210X USB to UART bridge](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers) +Before installing, ensure that your system meets the following requirements: -Some newer boards may require the drivers for the [CH9102](http://www.wch.cn/downloads/CH343SER_ZIP.html) or [Direct Download](https://github.com/Xinyuan-LilyGO/CH9102_Driver) for Windows 7. -::: +- **Serial Drivers**: Your computer should have the required serial drivers installed for the [CP210X USB to UART bridge](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers) or the [CH9102](http://www.wch.cn/downloads/CH343SER_ZIP.html) (for some newer boards). +- **Python**: Python 3 should be installed on your system. Check with `python3 -V` and install it if necessary. +- **pip**: The Python package installer pip should be installed. Check with `pip3 -V` and install it if necessary. + +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](#standalone-installation-ubuntu-only) if you prefer. - - -#### Ubuntu - -- Download meshtastic_ubuntu - -- Run the following command to make the file executable and rename it 'meshtastic': +1. Download the `meshtastic_ubuntu` executable from the [Releases](https://github.com/meshtastic/Meshtastic-python/releases) page. +2. Run the following command to make the file executable and rename it `meshtastic`: ```shell chmod +x meshtastic_ubuntu && mv meshtastic_ubuntu meshtastic ``` - -- To run the cli: +3. To run the CLI: ```shell ./meshtastic @@ -246,21 +230,3 @@ chmod +x meshtastic_ubuntu && mv meshtastic_ubuntu meshtastic :::tip Copy (or move) this binary somewhere in your path. ::: - - - - -#### Windows - -- Download meshtastic_windows - -- Rename to meshtastic.exe - -- To run, open a windows command prompt, navigate to the location of the executable and run: - -```shell -meshtastic.exe -``` - - -