cli

command module
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2025 License: MIT Imports: 1 Imported by: 0

README

metal-stack-cloud CLI

Markdown Docs Go Version Go Report Card

This is the official CLI for accessing the API of metalstack.cloud.

Installation

Download locations:

Installation on Linux
curl -LO https://github.com/metal-stack-cloud/cli/releases/latest/download/metal-linux-amd64
chmod +x metal-linux-amd64
sudo mv metal-linux-amd64 /usr/local/bin/metal
Installation on MacOS

For x86 based Macs:

curl -LO https://github.com/metal-stack-cloud/cli/releases/latest/download/metal-darwin-amd64
chmod +x metal-darwin-amd64
sudo mv metal-darwin-amd64 /usr/local/bin/metal

For Apple Silicon (M1) based Macs:

curl -LO https://github.com/metal-stack-cloud/cli/releases/latest/download/metal-darwin-arm64
chmod +x metal-darwin-arm64
sudo mv metal-darwin-arm64 /usr/local/bin/metal
Installation on Windows
curl -LO https://github.com/metal-stack-cloud/cli/releases/latest/download/metal-windows-amd64
copy metal-windows-amd64 metal.exe

Usage

All commands follow a general form:

metal <entity> [<category>] <command> <argument> [<flags>]

For example:

metal tenant member list --api-token <your-token> --api-url <api-url>
metal cluster list -p <project-id>
metal ctx add <context-name>

The api-token, api-url and project-id are defaulted by the context, if one exists, and can be omitted.

In addition to the standard API services, there are also admin services that require an admin token for execution.

You can access help for every service and command by using --help or -h. If you encounter any issues not covered in the help prompt, or if you have suggestions for improvement, please feel free to contact us or open an issue in this repository. Your feedback is greatly appreciated!

A list of all available services (excluding admin topics). For their associated commands, arguments and flags visit the correct documentation.

Entity Description Documentation
api-methods show available api-methods of the metalstack.cloud api metal api-methods
asset show asset metal asset
cluster manage cluster entities metal cluster
completion generate the autocompletion script for the specified shell metal completion
context manage cli contexts metal context
health print the client and server health information metal health
ip manage ip entities metal ip
markdown create markdown documentation metal completion
payment manage payment of the metalstack.cloud metal payment
project manage project entities metal project
storage storage commands metal storage
tenant manage tenant entities metal tenant
token manage token entities metal token
user manage user entities metal user
version print the client and server version information metal version
Autocompletion

To successfully set up autocompletion follow this guide.

Authentication and Configuration

To work with this CLI, it's necessary to create an api-token. This can be issued through the cloud console, make sure to configure the right permissions you want to use within your context.

The project's ID can be copied from the UI, the button is located right next to the project title in the project dashboard. The default API-URL of metal-stack-cloud is https://api.metalstack.cloud.

$ metal ctx add <context-name> --activate --default-project <project-uuid> --api-token <your-token>
✔ added context "<context-name>"

The configuration file is by default written to ~/.metal-stack-cloud/config.yaml.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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