Overview: rad CLI

Learn about the rad CLI and how to interact with Radius from your local machine

The rad Command Line Interface (CLI) allows you to interact with Radius from your local machine. It is the primary way to interact with Radius and is used to create, deploy, and manage your applications, environments, and resources.

$ rad
Radius CLI

Usage:
  rad [command]

Available Commands:
  application Manage Radius Applications
  bicep       Manage bicep compiler
  completion  Generates shell completion scripts
  credential  Manage cloud provider credential for a Radius installation.
  debug-logs  Capture logs from Radius control plane for debugging and diagnostics.
  deploy      Deploy a template
  env         Manage Radius Environments
  group       Manage resource groups
  help        Help about any command
  init        Initialize Radius
  install     Installs Radius for a given platform
  recipe      Manage recipes
  resource    Manage resources
  run         Run an application
  uninstall   Uninstall Radius for a specific platform
  version     Prints the versions of the rad cli
  workspace   Manage workspaces

Installation

The rad CLI is distributed as a single binary that can be installed on Linux, macOS, and Windows. Visit the installation guide to learn how to install the rad CLI.

Install rad CLI

Binary location


By default, the rad CLI installation script installs the rad CLI to /usr/local/bin/rad

If you would like to install the rad CLI to a different path, you can specify the path with the RADIUS_INSTALL_DIR environment variable:

# Install to home directory
export RADIUS_INSTALL_DIR=~/

By default, the rad CLI installation script installs the rad CLI to %LOCALAPPDATA%\radius\rad.exe

Configuration

The rad CLI stores its configuration, the rad-Bicep compiler, and other configuration under the rad directory.


The rad CLI stores configuration under ~/.rad


The rad CLI stores configuration under %USERPROFILE%\.rad

config.yaml file

The rad CLI stores its configuration in a YAML file named config.yaml under the rad directory. This file contains workspaces, which point to your cluster, your default resource group, and your default environment.

When the rad CLI runs commands, it will use the configuration in the config.yaml file to determine which cluster, resource group, and environment to target and use.

For more information, refer to the config.yaml reference documentation.

rad-bicep compiler

The rad CLI uses the Bicep compiler to compile Bicep files to JSON templates. The Bicep compiler is stored as /bin/rad-bicep within your configuration directory.

Reference documentation

Visit the reference documentation to learn more about the rad CLI and its commands.

Reference docs