Skip to main content

vers tree

Print a visual tree representation of the cluster and its VMs.

Usage

vers tree                            # Show tree for current HEAD's cluster
vers tree [cluster-id|cluster-alias] # Show tree for specific cluster

Examples

Show current cluster tree

vers tree
Finding cluster for current HEAD VM: vm-abc123
Generating tree for cluster: development

Cluster: development (Total VMs: 5)

└── web-server [R] ' for VM details.

Show specific cluster tree

vers tree production
Generating tree for cluster: production

Cluster: production (Total VMs: 3)

└── vm-abc123 [R]
    ├── vm-def456 [P]
    └── vm-ghi789 [R] ' for VM details.

How it works

The tree command:
  1. Resolves cluster:
    • No arguments: Finds cluster containing current HEAD VM
    • With argument: Finds cluster by ID or alias
  2. Builds hierarchy: Uses parent-child relationships from cluster data
  3. Displays tree: Shows visual tree with state indicators and HEAD marker
  4. Provides legend: Explains state symbols and suggests next commands

Tree structure

Visual elements

  • Tree lines: └──, ├──, show parent-child relationships
  • VM names: Shows alias if available, otherwise VM ID
  • State symbols: [R] Running, [P] Paused, [S] Stopped
  • HEAD marker: <- HEAD indicates your current VM
  • State colors: Green for Running, muted for Paused, red for Stopped

Hierarchy representation

Root VM [R]
├── Child 1 [P]
│   ├── Grandchild 1 [R] <- HEAD
│   └── Grandchild 2 [S]
└── Child 2 [R]
    └── Grandchild 3 [P]

Understanding VM relationships

Parent-child relationships

VMs can have children created by branching:
  • Root VM: The original VM in the cluster (no parent)
  • Child VMs: Created by branching from a parent
  • Sibling VMs: Multiple children of the same parent

State indicators

  • [R] Running: VM is active and can be connected to
  • [P] Paused: VM is paused but retains state
  • [S] Stopped: VM is stopped

Error handling

No cluster found for HEAD

vers tree
Error: no cluster ID provided and HEAD not found
Solution: Run vers up to create a VM or specify a cluster directly.

Cluster not found

vers tree nonexistent-cluster
Error: cluster 'nonexistent-cluster' not found

Cluster with no root VM

vers tree problematic-cluster
Error: cluster 'problematic-cluster' has no root VM

HEAD VM not in any cluster

vers tree
Error: couldn't find a cluster containing VM 'vm-orphaned123'

Use cases

Understanding project structure

# See how your VMs are related
vers tree
# Understand branching patterns
# Identify parallel development paths

Planning development

# Check current structure
vers tree

# Identify good branching points
# See which VMs are available for work
# See the full hierarchy
vers tree

# Choose target VM for checkout
vers checkout interesting-vm

State overview

# See which VMs are running/paused
vers tree

# Resume paused VMs if needed
vers resume paused-vm

Prerequisites

  • Network connectivity to query cluster data
  • Valid HEAD VM or cluster identifier
  • Cluster must exist and be accessible

See Also