Skip to main content
Version: 1.3.0

thresh list

List all thresh-managed WSL environments with their status and resource usage.

Synopsis

thresh list [options]

Description

The list command displays all WSL environments managed by thresh, showing their current status, distribution, memory usage, and disk space.

Options

OptionDescription
--all, -aInclude stopped environments
--verbose, -vShow detailed information
--jsonOutput in JSON format
--help, -hShow help information

Examples

Basic Usage

thresh list

Output:

NAME              STATUS    DISTRO          MEMORY     DISK
python-dev Running Ubuntu 22.04 256 MB 2.1 GB
alpine-minimal Running Alpine 3.19 128 MB 512 MB
node-dev Running Ubuntu 22.04 384 MB 3.2 GB

Include Stopped Environments

thresh list --all

Output:

NAME              STATUS    DISTRO          MEMORY     DISK
python-dev Running Ubuntu 22.04 256 MB 2.1 GB
alpine-minimal Stopped Alpine 3.19 - 512 MB
node-dev Running Ubuntu 22.04 384 MB 3.2 GB
test-env Stopped Debian 12 - 1.8 GB

Verbose Output

thresh list --verbose

Output:

NAME: python-dev
STATUS: Running
DISTRO: Ubuntu 22.04
MEMORY: 256 MB
DISK: 2.1 GB
CREATED: 2024-01-15 10:30:00
BLUEPRINT: python-dev
PACKAGES: 42
WSL VERSION: 2

NAME: alpine-minimal
STATUS: Running
DISTRO: Alpine 3.19
MEMORY: 128 MB
DISK: 512 MB
CREATED: 2024-01-15 09:15:00
BLUEPRINT: alpine-minimal
PACKAGES: 12
WSL VERSION: 2

JSON Output

thresh list --json

Output:

[
{
"name": "python-dev",
"status": "Running",
"distribution": "Ubuntu 22.04",
"memory_mb": 256,
"disk_gb": 2.1,
"created": "2024-01-15T10:30:00Z",
"blueprint": "python-dev",
"packages": 42,
"wsl_version": 2
},
{
"name": "alpine-minimal",
"status": "Running",
"distribution": "Alpine 3.19",
"memory_mb": 128,
"disk_gb": 0.5,
"created": "2024-01-15T09:15:00Z",
"blueprint": "alpine-minimal",
"packages": 12,
"wsl_version": 2
}
]

Output Columns

ColumnDescription
NAMEEnvironment name (same as WSL distribution name)
STATUSRunning, Stopped, or Installing
DISTROBase distribution and version
MEMORYCurrent memory usage (running only)
DISKTotal disk space used

Comparing with WSL

# thresh-managed environments only
thresh list

# All WSL distributions (including non-thresh)
wsl -l -v

Filtering Environments

Only Running

# Default behavior - shows only running
thresh list

Only Stopped

# PowerShell filter
thresh list --all | Where-Object { $_ -match "Stopped" }

By Name Pattern

# PowerShell filter
thresh list | Where-Object { $_ -match "python" }

Exit Codes

CodeMeaning
0Success
1Error listing environments
3WSL not available

See Also

  • thresh up - Create new environments
  • thresh destroy - Remove environments
  • thresh metrics - Show performance metrics