Introducing Substrate Agents for Kubernetes optimizationLearn more

CLI Reference

Manage infrastructure from your terminal

The Substrate CLI gives you full control over clusters, deployments, templates, and monitoring directly from the command line.

Installation

Install the CLI

Choose your preferred installation method. The CLI is available via npm, Homebrew, or as a standalone binary.

npm

npm install -g @substrate/cli

Homebrew

brew install substrate/tap/substrate

Binary (Linux/macOS)

curl -fsSL https://get.substratecore.com/cli | sh

Authentication

Authenticate with your Substrate account to start managing resources. The login command opens your browser for secure OAuth authentication.

substrate login

For CI/CD environments, you can authenticate with an API token:

substrate auth --token $SUBSTRATE_API_TOKEN

Commands

Command reference

Clusters

Provision, register, and manage Kubernetes clusters across cloud providers.

substrate cluster listsubstrate cluster create --provider eks --region us-east-1substrate cluster register --kubeconfig ~/.kube/configsubstrate cluster delete --name my-cluster

Deployments

Create, scale, and manage deployments across your connected clusters.

substrate deploy create --template my-app --cluster prodsubstrate deploy list --cluster prodsubstrate deploy scale --name api --replicas 5substrate deploy status --name api

Templates

Manage reusable deployment templates with variable substitution.

substrate template listsubstrate template create --file template.yamlsubstrate template deploy --name my-app --var env=prodsubstrate template delete --name old-template

Monitoring

Enable monitoring, view metrics, and configure alert thresholds.

substrate monitoring enable --cluster prodsubstrate monitoring metrics --cluster prod --period 24hsubstrate monitoring alerts listsubstrate monitoring alerts create --threshold cpu>80

Ready to try the CLI?

Install the Substrate CLI and manage your infrastructure from the terminal in minutes.