Skip to content

mznu/vd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vd

vd is short for virtual device: a lightweight command-line helper for discovering, diagnosing, launching, and shutting down local Android emulators and iOS simulators from one place.

It wraps the vendor CLIs instead of reimplementing emulator internals:

  • iOS: xcrun simctl
  • Android: avdmanager, emulator, and adb

TL;DR

vd doctor                         # Check local iOS and Android tooling
vd list                           # List available virtual devices
vd list --all                     # Include unavailable and broken devices
vd launch --ios <udid-or-name>    # Boot an iOS simulator and open Simulator.app
vd launch --android <avd-name>    # Start an Android Emulator process
vd shutdown --ios <udid-or-name>  # Shut down an iOS simulator
vd shutdown --android <serial-or-name> # Shut down a running Android emulator

Prerequisites

  • iOS: macOS with Xcode installed and initial Xcode component setup completed. Standalone Command Line Tools are not enough for iOS Simulator support.
  • Android: Android SDK command-line tools, Android Emulator, and platform-tools. vd checks PATH, ANDROID_HOME, ANDROID_SDK_ROOT, and common macOS/Linux SDK locations.

Install

Supported release artifacts are macOS/Linux on amd64/arm64.

Homebrew

brew install mznu/tap/vd

Manual Release Archive

Download the archive for your OS and architecture, then install the vd binary somewhere on your PATH:

tar -xzf vd_1.0.0_darwin_arm64.tar.gz vd
mkdir -p ~/.local/bin
install -m 0755 vd ~/.local/bin/vd

Use darwin_amd64, darwin_arm64, linux_amd64, or linux_arm64 as needed. Make sure ~/.local/bin is on your PATH.

macOS

If macOS blocks a manually downloaded binary, remove the quarantine attribute after verifying that the archive came from a trusted release:

xattr -d com.apple.quarantine ~/.local/bin/vd

Linux

Linux does not support iOS Simulator management. Android commands work when the Android SDK command-line tools, Android Emulator, and platform-tools are available.

Windows / WSL 2

Native Windows binaries are not published. Use WSL 2 and install the Linux artifact inside the WSL distribution.

Build From Source

Build from source with Go:

go build -o vd ./cmd/vd

Usage

vd doctor [--json]
vd version
vd list [--ios|--android] [--all] [--json]
vd launch --ios <udid-or-name>
vd launch --android <avd-name>
vd shutdown --ios <udid-or-name>
vd shutdown --android <serial-or-name>

Run vd --help, vd help [command], or vd [command] --help for command-specific help. Commands that call vendor tools also accept --timeout (default: 45s).

For iOS, launch boots the selected simulator and opens Simulator.app. For Android, launch starts the Android Emulator process and returns promptly.

Releasing

Releases are automated with GoReleaser. Pushing a SemVer tag that starts with v runs tests, builds Linux and macOS artifacts, uploads checksums, and creates a GitHub Release.

git tag v1.0.0
git push origin v1.0.0

Validate the release configuration locally before tagging:

goreleaser release --snapshot --clean

About

CLI for discovering and launching local Android emulators and iOS simulators from one place

Resources

License

Stars

Watchers

Forks

Contributors

Languages