How to Get Help with vphone-cli: Command-Line Documentation Guide
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.
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 (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:
vphone-cli vm create --help
The 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 (lines 43-48), appears in help output alongside other options like --headless and --variant.
To view boot-specific options:
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: Contains the rootVPhoneCLIstruct defining top-level command registration, sub-command hierarchy, and the overall abstract text (lines 6-14).sources/vphone-cli/VPhoneVMCommand.swift: Implements VM sub-commands (create,launch,list,clone) with individualCommandConfigurationinstances that render sub-command help (lines 1-12).VPhoneBootCLI.swift(withinVPhoneCLI.swift): Defines boot-related flags and options, including the--dfuparameter (lines 18-34 and 43-48).PatchFirmwareCLI.swift(withinVPhoneCLI.swift): Houses thepatch-firmwaresub-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:
# 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 --helpto see the complete command hierarchy based on the rootVPhoneCLIstruct configuration inVPhoneCLI.swift. - Append
--helpto any sub-command to access specific documentation sourced from individualCommandConfigurationdefinitions in files likeVPhoneVMCommand.swift. - Consult the repository README for high-level usage patterns that complement the command-line help system.
- Reference source files including
VPhoneBootCLI.swiftto 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 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.
Where is the help text generated from in the source code?
The documentation originates from Swift CommandConfiguration structs in sources/vphone-cli/VPhoneCLI.swift (for top-level help) and 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 within the main CLI source file (lines 43-48), and the help output reflects their inline documentation and type specifications.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →