avf_cli
A CLI tool for managing Apple Virtualization.framework macOS Virtual Machines, powered by avf_dart.
Installation
You can activate this CLI globally using the Dart SDK:
dart pub global activate avf_cli
Make sure your ~/.pub-cache/bin directory is added to your system's PATH environment variable.
Usage
avf <command> [arguments]
Subcommands
-
list: List all local virtual machines.avf list -
boot: Boot a local virtual machine.avf boot <vm-name> [options]Options:
-u, --username: Username for SSH verification (defaults to "admin")-p, --password: Password for SSH verification (defaults to "admin")-i, --private-key: SSH private key file path for verification-c, --run-command: Optional command to run on VM via SSH after successful boot
-
install: Install macOS onto a new VM using an IPSW file.avf install <vm-name> --ipsw <ipsw-path> -
delete: Delete a local virtual machine.avf delete <vm-name> -
clone: Clone an existing local virtual machine.avf clone <source-vm> <target-vm> -
pull: Pull a VM archive from GCS bucket.avf pull <vm-name> --bucket <bucket-name> -
push: Push a VM archive to GCS bucket.avf push <vm-name> --bucket <bucket-name> -
download-ipsw: Download the macOS IPSW image.avf download-ipsw [options]Options:
--url: Optional IPSW URL (if omitted, fetches the latest from Apple)-o, --out: Optional save path (defaults to standard downloads directory)
-
fetch-ipsw: Fetch the latest supported macOS IPSW URL from Apple.avf fetch-ipsw
Publishing to pub.dev
When publishing avf_cli to pub.dev, you must prepare the configuration in pubspec.yaml as follows:
- Remove
publish_to: none(which prevents accidental pub.dev publishes during local development). - Replace the local
pathdependency ofavf_dartwith the published version dependency:dependencies: avf_dart: ^0.1.22