Skip to main content
List all cluster contexts configured in your Uncloud config file. Contexts let you manage multiple clusters from a single CLI.

Usage

uc context ls
Alias: uc context list

Output

The command displays a table with:
  • NAME - Context name
  • CURRENT - Checkmark (✓) for the active context
  • CONNECTIONS - Number of machine connections configured

Examples

List all contexts

uc context ls
Example output:
NAME         CURRENT   CONNECTIONS
default      ✓         2
production             3
staging                1

Understanding Contexts

A context represents a cluster and contains:
  • Connection information for accessing cluster machines
  • Current context settings
Contexts are stored in ~/.config/uncloud/config.yaml.

Use Cases

Check Available Clusters

See what clusters you can connect to:
uc context ls

Verify Current Context

Confirm which cluster you’re working with:
uc context ls | grep

Build docs developers (and LLMs) love