Help us shape the future of Go! Take the 2026 Go Developer Survey

meshstack-cli

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: Apache-2.0

README

meshStack CLI

meshstack is the command line interface for your meshStack instance, handling multiple meshStacks via the meshstack profile command.

Start with meshstack login --profile your-profile-name and explore the CLI with meshstack --help, after you install it.

The meshStack Terraform provider builds on this login as follows:

provider "meshstack" {
  profile   = "your-profile-name" # login creates 'default' initially
  workspace = "your-workspace"    # 'meshstack workspace list' finds one,
                                  # or leave it to the profile's default workspace
}

Commands meant for people, such as meshstack auth status and meshstack profile list, write Markdown. The other commands write JSON, or one item per line with --output ndjson, for scripts and agentic AI workflows that read it through a | jq ... pipe. A listing stops at 100 items unless --limit says otherwise.

On a terminal, the Markdown is rendered and the log is colored. NO_COLOR turns the colors off, and FORCE_COLOR or CLICOLOR_FORCE turns them on where the output is no terminal, such as in a CI job. GitHub Actions, GitLab CI and Azure Pipelines get a colored log without being asked, and the log of a building block run stays plain, since meshPanel shows it as plain text.

meshstack api sends an authenticated, curl-like request to any path of the API. For a meshObject endpoint it picks the latest version the OpenAPI docs list, and meshstack api-docs shows what those docs say about a request.

meshstack login picks a profile, logs in through the browser and selects a workspace, meshstack buildingblock list lists the first building blocks, meshstack api sends that request as it is, the same command line with api-docs in place of api describes it, as meshstack api-docs --describe bb.list does, meshstack profile edits a profile, and meshstack profile add completes the endpoint and the workspace of the logged-in profile

Install

With Homebrew
brew install meshcloud/tap/meshstack-cli
brew upgrade meshstack-cli
With Go
go install github.com/meshcloud/meshstack-cli/cmd/meshstack@latest

...or without installing it:

go run github.com/meshcloud/meshstack-cli/cmd/meshstack@latest --version
With Nix (flakes enabled)
nix profile add github:meshcloud/meshstack-cli   # older Nix: `nix profile install`
nix profile upgrade meshstack-cli

...or without installing it:

nix run github:meshcloud/meshstack-cli -- --version

⚠ nix profile upgrade follows the main branch, not releases.

With the install script
curl -fsSL https://raw.githubusercontent.com/meshcloud/meshstack-cli/main/install.sh | sh

Run it again to upgrade. | sh -s -- --version v1.2.3 --dir ~/bin pins a release and the directory, and | sh -s -- --help lists the options.

Development

This repository also holds the Go client for the meshStack API in client/, which the meshStack Terraform provider imports.

The Nix dev shell provides Go, goreleaser and task:

nix develop
task build            # writes ./meshstack
task test
task lint             # add -- --fix to apply the fixes it can make itself
task release:snapshot # the release artifacts, into dist/, without publishing them

Directories

Path Synopsis
openapi
Package openapi reads the OpenAPI document meshStack publishes, and picks the operations of a request path, a method and a version out of it.
Package openapi reads the OpenAPI document meshStack publishes, and picks the operations of a request path, a method and a version out of it.
cmd
api
internal/color
Package color decides how much color the CLI writes, so that the Markdown a command shows and the log agree.
Package color decides how much color the CLI writes, so that the Markdown a command shows and the log agree.
internal/prompt
Package prompt asks a person on the terminal.
Package prompt asks a person on the terminal.
meshstack command
docs
demo/fakemeshstack command
Command fakemeshstack stands in for three meshStack installations, their Keycloak and the API docs, so that docs/demo/demo.tape can record `meshstack login` with no backend and no network.
Command fakemeshstack stands in for three meshStack installations, their Keycloak and the API docs, so that docs/demo/demo.tape can record `meshstack login` with no backend and no network.
internal
apidocs
Package apidocs loads the OpenAPI document of the meshStack API into the config directory, and keeps it there up to date.
Package apidocs loads the OpenAPI document of the meshStack API into the config directory, and keeps it there up to date.
io
testutil/fakemeshstack
Package fakemeshstack stands in for one meshStack: its API, its Keycloak and its API docs.
Package fakemeshstack stands in for one meshStack: its API, its Keycloak and its API docs.
testutil/testlogin
Package testlogin logs a command under test in to a fake meshStack.
Package testlogin logs a command under test in to a fake meshStack.
tfstate
Package tfstate reads and writes the OpenTofu state meshStack keeps for a building block, and serves it to tofu's http backend.
Package tfstate reads and writes the OpenTofu state meshStack keeps for a building block, and serves it to tofu's http backend.
pkg
io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL