CLI Reference
thresh provides a comprehensive set of commands for managing WSL development environments, AI-powered blueprint generation, and MCP server integration.
New in v1.5.0
Thresh v1.5.0 introduces networking and storage features:
- Port mapping and forwarding for WSL environments
- Persistent volumes and bind mounts
- New commands:
thresh startandthresh stopfor lifecycle management - WSL configuration profiles for database optimization
Quick Overview
| Command | Description |
|---|---|
up | Provision a new environment from a blueprint |
start | Start a stopped environment and apply port forwarding |
stop | Stop a running environment and remove port forwarding |
list | List all thresh-managed environments |
destroy | Remove an environment |
blueprint | Manage blueprints (list, generate, delete) |
blueprint list | List available blueprints |
blueprint generate | Generate custom blueprint using AI |
blueprint delete | Delete a generated blueprint |
chat | Interactive AI chat for environment planning |
distros | List available distributions |
distro | Manage custom distributions |
config | Manage configuration settings |
wslconf | Manage WSL configuration profiles |
volume | Manage persistent volumes |
serve | Start MCP server |
metrics | Show performance metrics |
version | Show version information |
Command Categories
Environment Management
- up - Create new environments
- start - Start stopped environments (v1.5.0)
- stop - Stop running environments (v1.5.0)
- list - View all environments
- destroy - Remove environments
Blueprint Management
- blueprint - Manage blueprints (parent command)
- blueprint list - List available blueprints
- blueprint generate - Generate custom blueprints with AI
- blueprint delete - Delete generated blueprints
AI Features
- chat - Interactive AI assistant
Configuration
- config - Manage settings
- distro - Custom distributions
- distros - View distributions
- wslconf - WSL configuration profiles (v1.5.0)
Storage
- volume - Manage persistent volumes (v1.5.0)
Integration
- serve - MCP server for AI editors
Information
Global Options
All commands support these global options:
| Option | Description |
|---|---|
--help, -h | Show help information |
--verbose, -v | Enable verbose output |
--quiet, -q | Suppress non-error output |
--version | Show version information |
Getting Help
For any command, use --help to see detailed usage:
thresh --help # Show all commands
thresh up --help # Show help for 'up' command
thresh config --help # Show help for 'config' command
Exit Codes
thresh uses standard exit codes:
| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Invalid arguments |
3 | WSL not available |
4 | Environment not found |
5 | Configuration error |
Examples
See individual command pages for detailed examples and use cases.