Light Dark Auto

Install the greymatter.io CLI

The greymatter.io CLI lets you interact with the mesh without needing to handcraft API calls.

Downloading

Download the binaries for your operating system, substituting your greymatter.io credentials in curl's --user flag.

Mac OS Linux
curl -SLf --user $GREYMATTER_USERNAME:$GREYMATTER_PASS \
    https://nexus.greymatter.io/repository/raw/release/gm-cli/greymatter_4.3.0_darwin_amd64.tar.gz \
    > greymatter_4.3.0_darwin_amd64.tar.gz && tar -xvf greymatter_4.3.0_darwin_amd64.tar.gz
curl -SLf --user $GREYMATTER_USERNAME:$GREYMATTER_PASS \
    https://nexus.greymatter.io/repository/raw/release/gm-cli/greymatter_4.3.0_linux_amd64.tar.gz \
    > greymatter_4.3.0_linux_amd64.tar.gz && tar -xvf greymatter_4.3.0_linux_amd64.tar.gz

Move the binary to somewhere on your $PATH.

Verify Your Installation

After moving the binary to your path, verify your installation by running the greymatter command.

$ greymatter
NAME:
   greymatter - a CLI for interacting with the greymatter.io Control API

USAGE:
   greymatter [global options] command [command options] [arguments...]

VERSION:
   v4.3.0 e6d910f

DESCRIPTION:
   The greymatter.io CLI is used to interact with the greymatter.io Control API

COMMANDS:
   apply        create or replace an entire mesh object with input from a file or stdin
   get          get a mesh object by ID
   list         list mesh objects by type
   create       create a mesh object
   edit         edit a mesh object interactively
   delete       delete a mesh object
   modify, mod  modify an existing object; note: zones cannot be modified
   sync         Sync a CUE module directory tree of greymatter.io configurations to a greymatter.io instance.
   init         initialize a greymatter.io CUE module
   x            Experimental subcommands
   help, h      Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --api value               A fully qualified URL for the control API
   --base64-config value     base64 encoded TOML config file
   --catalog value           A fully qualified URL for the catalog API
   --config value, -c value  Path to config file (default: "$HOME/.config/greymatter/config.toml") [$GREYMATTER_CONFIG]
   --help, -h                show help (default: false)
   --log-level value         (default: "info")
   --version, -v             print the version (default: false)

The --help flag also works on subcommands.

greymatter SUBCOMMAND --help

If you receive an error after running the greymatter command:

  • verify your PATH includes the location where you moved the binary
  • check the binary's file permissions
  • ensure you downloaded the correct binary for your system.

Configuration

greymatter is configurable via flags, environment variables, and a config file. The default path for a config file is $HOME/.config/greymatter/config.toml, but an alternative path can be specified with the --config flag or the GREYMATTER_CONFIG environment variable.

See the CLI Configuration docs for more information.

Next Steps

Follow our guide to Install greymatter.io with GitOps.