Skip to content

mmesh/m-cli

mmesh.io

Discord GitHub Discussions Twitter

Open source projects from mmesh.

mmesh-cli

Go Report Card Release GitHub

This repository contains mmeshctl, a tool for managing the mmesh platform from the command line.

mmeshctl is available for a variety of Linux platforms, macOS and Windows.

Minimun Requirements

mmeshctl has the same minimum requirements as Go:

  • Linux kernel version 2.6.23 or later
  • Windows 7 or later
  • FreeBSD 11.2 or later
  • MacOS 10.11 El Capitan or later

Getting Started

See Quick Start to learn how to start building your mmesh.

Documentation

For the complete mmesh platform documentation visit mmesh.io/docs.

Installation

Binary Downloads

Linux, macOS and Windows binary downloads are available from the Releases page.

You can download the pre-compiled binaries and install them with the appropriate tools.

Linux Installation

Linux binary installation with curl

  1. Download the latest release.

    curl -LO "https://mmesh.s3.nl-ams.scw.cloud/binaries/stable/latest/linux/amd64/mmeshctl"
  2. Validate the binary (optional).

    Download the mmeshctl checksum file:

    curl -LO "https://mmesh.s3.nl-ams.scw.cloud/binaries/stable/latest/linux/amd64/mmeshctl_checksum.sha256"

    Validate the mmeshctl binary against the checksum file:

    sha256sum --check < mmeshctl_checksum.sha256

    If valid, the output must be:

    mmeshctl: OK

    If the check fails, sha256 exits with nonzero status and prints output similar to:

    mmeshctl: FAILED
    sha256sum: WARNING: 1 computed checksum did NOT match
  3. Install mmeshctl.

    sudo install -o root -g root -m 0755 mmeshctl /usr/local/bin/mmeshctl

    Note: If you do not have root access on the target system, you can still install mmeshctl to the ~/.local/bin directory:

    chmod +x mmeshctl
    mkdir -p ~/.local/bin
    mv ./mmeshctl ~/.local/bin/mmeshctl
    # and then append (or prepend) ~/.local/bin to $PATH

Package Repository

mmesh provides a package repository that contains both DEB and RPM downloads.

For DEB-based platforms (e.g. Ubuntu and Debian) run the following to set up a new APT sources.list entry and install mmesh-cli:

echo 'deb [trusted=yes] https://repo.mmesh.io/apt/ /' | sudo tee /etc/apt/sources.list.d/mmesh.list
sudo apt update
sudo apt install mmesh-cli

For RPM-based platforms (e.g. RHEL, CentOS) use the following to create a repo file and install mmesh-cli:

cat <<EOF | sudo tee /etc/yum.repos.d/mmesh.repo
[mmesh]
name=mmesh Repository - Stable
baseurl=https://repo.mmesh.io/yum
enabled=1
gpgcheck=0
EOF
sudo yum install mmesh-cli

Homebrew installation on Linux

If you are on Linux and using Homebrew package manager, you can install the mmesh CLI with Homebrew.

  1. Run the installation command:

    brew install mmesh/tap/mmesh-cli
  2. Test to ensure the version you installed is up-to-date:

    mmeshctl version show

macOS Installation

macOS binary installation with curl

  1. Download the latest release.

    Intel:

    curl -LO "https://mmesh.s3.nl-ams.scw.cloud/binaries/stable/latest/darwin/amd64/mmeshctl"

    Apple Silicon:

    curl -LO "https://mmesh.s3.nl-ams.scw.cloud/binaries/stable/latest/darwin/arm64/mmeshctl"
  2. Validate the binary (optional).

    Download the mmeshctl checksum file:

    Intel:

    curl -LO "https://mmesh.s3.nl-ams.scw.cloud/binaries/stable/latest/darwin/amd64/mmeshctl_checksum.sha256"

    Apple Silicon:

    curl -LO "https://mmesh.s3.nl-ams.scw.cloud/binaries/stable/latest/darwin/arm64/mmeshctl_checksum.sha256"

    Validate the mmeshctl binary against the checksum file:

    shasum --algorithm 256 --check mmeshctl_checksum.sha256

    If valid, the output must be:

    mmeshctl: OK

    If the check fails, sha256 exits with nonzero status and prints output similar to:

    mmeshctl: FAILED
    sha256sum: WARNING: 1 computed checksum did NOT match
  3. Make the mmeshctl binary executable.

    chmod +x mmeshctl
  4. Move the mmeshctl binary to a file location on your system PATH.

    sudo mkdir -p /usr/local/bin
    sudo mv mmeshctl /usr/local/bin/mmeshctl
    sudo chown root: /usr/local/bin/mmeshctl

    Note: Make sure /usr/local/bin is in your PATH environment variable.

Homebrew installation on macOS

If you are on macOS and using Homebrew package manager, you can install the mmesh CLI with Homebrew.

  1. Run the installation command:

    brew install mmesh/tap/mmesh-cli
  2. Test to ensure the version you installed is up-to-date:

    mmeshctl version show

Windows Installation

Windows binary installation with curl

  1. Open the Command Prompt as Administrator and create a folder for mmesh.

    mkdir 'C:\Program Files\mmesh'
  2. Download the latest release into the mmesh folder.

    curl -LO "https://mmesh.s3.nl-ams.scw.cloud/binaries/stable/latest/windows/amd64/mmeshctl.exe"
  3. Validate the binary (optional).

    Download the mmeshctl.exe checksum file:

    curl -LO "https://mmesh.s3.nl-ams.scw.cloud/binaries/stable/latest/windows/amd64/mmeshctl.exe_checksum.sha256"

    Validate the mmeshctl.exe binary against the checksum file:

    • Using Command Prompt to manually compare CertUtil's output to the checksum file downloaded:

      CertUtil -hashfile mmeshctl.exe SHA256
      type mmeshctl.exe_checksum.sha256
    • Using PowerShell to automate the verification using the -eq operator to get a True or False result:

      $($(CertUtil -hashfile mmeshctl.exe SHA256)[1] -replace " ", "") -eq $(type mmeshctl.exe_checksum.sha256).split(" ")[0]
  4. Append or prepend the folder C:\Program Files\mmesh to your PATH environment variable.

  5. Test to ensure the version of mmeshctl is the same as downloaded.

    mmeshctl version show

Artifacts Verification

Binaries

All artifacts are checksummed and the checksum file is signed with cosign.

  1. Download the files you want and the checksums.txt, checksum.txt.pem and checksums.txt.sig files from the Releases page:

  2. Verify the signature:

    cosign verify-blob \
        --cert checksums.txt.pem \
        --signature checksums.txt.sig \
        checksums.txt
  3. If the signature is valid, you can then verify the SHA256 sums match the downloaded binary:

    sha256sum --ignore-missing -c checksums.txt

Docker Images

Our Docker images are signed with cosign.

Verify the signatures:

COSIGN_EXPERIMENTAL=1 cosign verify mmeshdev/mmeshctl

Configuration

The first time you run mmeshctl, you will be assisted to generate your mmeshctl.yml. This config file will be located by default at the $HOME/.mmesh directory.

See the mmeshctl configuration reference to find all the configuration options.

Usage

See usage with:

mmeshctl help

Running with Docker

You can also run mmeshctl as a Docker container. See the example below.

Registries:

  • mmeshdev/mmeshctl
  • ghcr.io/mmesh/mmeshctl

Example usage:

docker run --rm -ti -v $HOME/.mmesh:/root/.mmesh:ro mmeshdev/mmeshctl help

Community

Have questions, need support and or just want to talk?

Get in touch with the mmesh community!

Discord GitHub Discussions Twitter

Code of Conduct

Participation in the mmesh community is governed by the Contributor Covenant Code of Conduct. Please make sure to read and observe this document.

Please make sure to read and observe this document. By participating, you are expected to uphold this code.

License

The mmesh open source projects are licensed under the Apache 2.0 License.

FOSSA Status