CLI built in Go

Hey Everyone!

This is my first time posting, but I wanted to share something I made that I hope people might find useful. I’ve been working with two radios for a few months to build a project using Go and ended up writing my own version of the CLI.

It doesn’t have all of the same features as the python CLI yet, and it’s currently only working with radios using the 1.1 firmware (this was the stable version when I started development) but I’d love to see if anyone is interested in trying it out and giving feedback.

The part that I like the most about using Go for this is that I can create executables that can run without dependencies (like Python) for different OS’s. I’ve tested on Windows 10, Mac OS and Raspberry Pi OS and haven’t run into any issues. The only prerequisite for Mac/Windows are the ESP32 drivers.

Here’s a link to the GitHub repo: GitHub - lmatte7/meshtastic-go: CLI for Meshtastic Devices



Any chance you might consider turning this into a full fledged API for go, would be a nice addition to the ecosystem for sure.

1 Like

The thought has definitely crossed my mind. I can see a way to spin out the code that interfaces with the radio into its own API at some point in the future, but I’m still trying to think out the logistics for that. Mainly how to incorporate it into the CLI as a library (to make sure the code wouldn’t get out of sync) and how to handle the compiled Protobuf files. There’s even more complexity involved when I think about updating the CLI to work with the 1.2 firmware :slight_smile:

For now the library is structured in a way that it can be imported and used to retrieve data from the radio without having to use any of the CLI code. If anyone is interested in using Go with meshtastic that would give them a starting point.

1 Like

You can use the python and typescript implementations as reference, which tackle things in quite different ways