Android CLI command reference

The android command-line tool provides commands for scaffolding projects, running apps, managing virtual devices, inspecting UI layouts, and integrating with Android Studio.

Summary of commands

Command Description
completion Installs shell autocomplete configuration for Android CLI in the current user profile.
create Creates a new Android project from available templates. You can specify the project name, output directory, minSdk value, and dry-run execution.
describe Analyzes an Android project to generate descriptive metadata. This command identifies and outputs the paths to JSON files that detail the project's structure, including build targets and their corresponding output artifact locations (such as APKs). This information enables other tools and commands to locate build artifacts efficiently.
docs Searches and fetches developer documentation from the official Android Knowledge Base.
emulator Manages Android Virtual Devices (AVDs). Includes commands to start, stop, list, and view details about emulators.
help Shows the help information for a specified command.
info Prints environment information including SDK location, connected devices, and configuration variables.
init Initializes the environment for Android CLI. Sets up required configurations, directories, and default skills.
install Installs an Android app (one or more APKs) on a connected device or emulator without activating any components, using incremental optimizations for faster deployment than adb.
layout Returns the layout tree of an app.
run Builds, deploys, and launches an Android app on a connected device or emulator.
screen Captures and inspects the screen of a connected Android device or emulator.
sdk Manages the Android SDK installation. Includes commands to install, update, remove, and list available and installed SDK packages.
skills Manages Android CLI skills. Includes commands to install, remove, list, and search for skills by keyword.
studio Connects Android CLI to a running Android Studio instance to analyze files, find declarations and usages, render Compose previews, and look up library versions.
update Updates Android CLI to the latest version.