# How to Get Help with vphone-cli: Command-Line Documentation Guide

> Need help with vphone-cli? Discover how to access command-line documentation and detailed options for vphone-cli and its sub-commands. Get the support you need easily.

- Repository: [Lakr/vphone-cli](https://github.com/Lakr233/vphone-cli)
- Tags: how-to-guide
- Published: 2026-09-11

---

**Run `vphone-cli --help` to display available sub-commands, or append `--help` to any sub-command like `vphone-cli vm create --help` to view detailed options and flags for that specific operation.**

`vphone-cli` from the Lakr233/vphone-cli repository leverages Apple's **ArgumentParser** framework to provide comprehensive built-in documentation. Every command includes automatically generated help screens that display usage instructions, available flags, and command descriptions directly from the Swift source code.

## Accessing Top-Level Help Documentation

To view the complete list of available operations, execute the binary with the `--help` (or `-h`) flag. This displays the abstract defined in the `VPhoneCLI` struct along with all registered sub-commands.

```bash
vphone-cli --help

```

This output renders the command configuration abstract and enumerates the top-level command structure, including `boot`, `patch-firmware`, `vm`, `fw`, `restore`, `cfw`, and `setup`. According to the source in [`sources/vphone-cli/VPhoneCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/sources/vphone-cli/VPhoneCLI.swift) (lines 6-14), ArgumentParser generates this documentation from the root command's `CommandConfiguration`.

## Getting Sub-Command Specific Help

Append `--help` after any sub-command to inspect detailed parameters for that specific action. This reveals the `CommandConfiguration` properties including discussion text and option definitions unique to that command.

For example, to examine VM creation parameters:

```bash
vphone-cli vm create --help

```

The [`VPhoneVMCommand.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneVMCommand.swift) file (lines 1-12) defines these configurations for VM management operations such as `new`, `list`, `info`, and `clone`. The framework automatically surfaces this metadata as formatted terminal output when you request help for nested commands.

## Exploring Flag and Option Documentation

Individual flags include inline documentation within their source definitions. The **boot** command's `--dfu` flag, documented in [`VPhoneBootCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneBootCLI.swift) (lines 43-48), appears in help output alongside other options like `--headless` and `--variant`.

To view boot-specific options:

```bash
vphone-cli boot --help

```

## Key Source Files Behind the Help System

The help system generates documentation from specific Swift source files in the repository:

- **[`sources/vphone-cli/VPhoneCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/sources/vphone-cli/VPhoneCLI.swift)**: Contains the root `VPhoneCLI` struct defining top-level command registration, sub-command hierarchy, and the overall abstract text (lines 6-14).
- **[`sources/vphone-cli/VPhoneVMCommand.swift`](https://github.com/Lakr233/vphone-cli/blob/main/sources/vphone-cli/VPhoneVMCommand.swift)**: Implements VM sub-commands (`create`, `launch`, `list`, `clone`) with individual `CommandConfiguration` instances that render sub-command help (lines 1-12).
- **[`VPhoneBootCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneBootCLI.swift)** (within [`VPhoneCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneCLI.swift)): Defines boot-related flags and options, including the `--dfu` parameter (lines 18-34 and 43-48).
- **[`PatchFirmwareCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/PatchFirmwareCLI.swift)** (within [`VPhoneCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneCLI.swift)): Houses the `patch-firmware` sub-command configuration for VM directory selection and variant options (lines 25-41).

## Practical Help Command Examples

Use these patterns to query documentation for different operations:

```bash

# Display all available top-level commands and descriptions

vphone-cli --help

# View firmware patching options and directory flags

vphone-cli patch-firmware --help

# List VM management sub-commands

vphone-cli vm --help

# Get detailed help for VM creation syntax and requirements

vphone-cli vm create --help

# Check restore command parameters

vphone-cli restore --help

```

## Summary

- **Run `vphone-cli --help`** to see the complete command hierarchy based on the root `VPhoneCLI` struct configuration in [`VPhoneCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneCLI.swift).
- **Append `--help` to any sub-command** to access specific documentation sourced from individual `CommandConfiguration` definitions in files like [`VPhoneVMCommand.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneVMCommand.swift).
- **Consult the repository README** for high-level usage patterns that complement the command-line help system.
- **Reference source files** including [`VPhoneBootCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneBootCLI.swift) to understand how ArgumentParser generates flag documentation from Swift property wrappers.

## Frequently Asked Questions

### How do I see all available vphone-cli commands?

Run `vphone-cli --help` in your terminal. This displays the top-level abstract from [`VPhoneCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneCLI.swift) and lists all available sub-commands including `boot`, `vm`, `restore`, and `patch-firmware` as defined in the root command configuration.

### Can I get help for specific VM operations like create or clone?

Yes. Append `--help` after the sub-command path. For example, run `vphone-cli vm create --help` to see required arguments and optional flags, or `vphone-cli vm --help` to list all VM-related operations. The help text originates from `CommandConfiguration` structs defined in [`VPhoneVMCommand.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneVMCommand.swift).

### Where is the help text generated from in the source code?

The documentation originates from Swift `CommandConfiguration` structs in [`sources/vphone-cli/VPhoneCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/sources/vphone-cli/VPhoneCLI.swift) (for top-level help) and [`sources/vphone-cli/VPhoneVMCommand.swift`](https://github.com/Lakr233/vphone-cli/blob/main/sources/vphone-cli/VPhoneVMCommand.swift) (for VM commands). Apple's ArgumentParser framework automatically renders these configurations into terminal-readable help screens based on the abstract and discussion properties defined in the source.

### What flags are available for the boot command?

Run `vphone-cli boot --help` to view available flags including `--dfu`, `--headless`, and `--variant`. These options are implemented in [`VPhoneBootCLI.swift`](https://github.com/Lakr233/vphone-cli/blob/main/VPhoneBootCLI.swift) within the main CLI source file (lines 43-48), and the help output reflects their inline documentation and type specifications.