# CLI Reference

> Complete command reference for the single reims-go.exe binary covering host checks, portable runtimes, offline images, VM lifecycle, and plugin packaging.

- **Canonical URL**: https://reims.dev/en/docs/cli-reference
- **Chinese Version**: https://reims.dev/docs/cli-reference.md
- **Section**: CLI & Architecture
- **LLMs Index**: https://reims.dev/llms.txt

---

Reims-Go ships as a single dual-mode executable: double-clicking `reims-go.exe` opens the desktop window, while passing any subcommand executes the CLI against the same core engine and data directory.

> In Windows PowerShell, append `| Out-Host` to GUI-subsystem executables so stdout flushes cleanly into the current console.

## End-to-end workflow

```powershell
# 1. Check WHPX, Vulkan 1.3 extensions, and committable RAM
reims-go doctor | Out-Host

# 2. Fetch and verify the stable portable runtime
reims-go runtime fetch | Out-Host

# 3. Download an offline macOS image directly from Apple
reims-go installer download tahoe | Out-Host

# 4. Create an NVMe virtual machine with OpenCore boot image
reims-go vm create macos-tahoe | Out-Host

# 5. Start the VM (handed off to desktop tray by default)
reims-go vm start macos-tahoe | Out-Host
```

## Diagnostics and safe mode

| Command / Flag | Description |
| --- | --- |
| `reims-go doctor` | Inspects WHPX status, hybrid CPU topology, Vulkan 1.3 ICD & extensions, available committable RAM, and active runtime |
| `reims-go --safe-mode` | Starts the desktop client without loading any third-party plugins, reverting to default theme and language |
| `reims-go version` | Prints client version, runtime compatibility contract, and `uiApi` / `bridgeApi` versions |

## Runtime and image commands

```powershell
# List local and remote runtime channels (stable / alpha)
reims-go runtime list | Out-Host

# Fetch and activate a runtime channel
reims-go runtime fetch --channel stable | Out-Host
reims-go runtime fetch --channel alpha | Out-Host

# List catalog images and start parallel chunk download
reims-go installer list | Out-Host
reims-go installer download tahoe | Out-Host
```

## VM lifecycle and tray handoff

```powershell
# List, create, start, stop, and suspend VMs
reims-go vm list | Out-Host
reims-go vm create macos-tahoe --cpus 8 --memory 16384 --disk 128 | Out-Host
reims-go vm start macos-tahoe | Out-Host
reims-go vm stop macos-tahoe | Out-Host
reims-go vm suspend macos-tahoe | Out-Host
```

By default, `reims-go vm start` performs a **seamless desktop tray handoff**:

- When the desktop tray host is running, CLI launch requests delegate execution to the tray host over loopback so bidirectional clipboard, Guest Tools, WebDAV shared folders, and the Windows 10 cold-restart watcher remain active.
- Direct standalone console execution is available for headless automation when tray features are not needed.

## Plugin marketplace and packaging commands

```powershell
# Search, install, and update marketplace plugins
reims-go plugin search locale | Out-Host
reims-go plugin install official.lang.zh-tw | Out-Host
reims-go plugin update | Out-Host

# Scaffold and validate Localization v2 / ICU plural packs
reims-go plugin locale init my-locale | Out-Host
reims-go plugin locale check ./my-locale | Out-Host

# Run static security checks and package a release archive with SHA256SUMS
reims-go plugin pack ./my-plugin | Out-Host
```

Every package installed from the marketplace is verified against its published `SHA-256` digest and can be disabled or removed from the **Plugins** view at any time.
