android-cli
它能做什么
这个工具可以让你直接在命令行中管理 Android 应用开发。你可以用它创建新项目、安装或更新必要的组件(比如 SDK),还可以与连接的 Android 设备进行交互。
适用场景
- ✓需要快速创建一个新的 Android 项目时。
- ✓想要安装或管理 Android SDK 的部分组件时。
- ✓需要与已连接的 Android 设备交互,比如截取屏幕截图时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/skills/android-cli/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我该如何创建一个名为“My App”的新 Android 项目?”
每周 5 个新技能,1 分钟读完。
工作原理
你输入 “android create” 之类的命令来创建项目,或输入 “android sdk install” 来安装组件。工具会根据你的指令执行相应的 Android 开发任务。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Android CLI Specialist
This skill provides instructions for using the android CLI tool. The tool includes various commands for creating projects, running applications, interacting with devices, and managing the CLI environment.
When to Use
- Use when you need to create, configure, or analyze Android projects from the command line.
- Use when interacting with, deploying to, or taking screenshots of running Android devices.
- Use when managing Android SDK components, versions, or virtual devices (emulators).
- Use when inspecting UI layouts or running XML-specified journey tests.
Installation
If the android tool is not in the path, download the platform installer to a private temporary directory, inspect it, then run it only after the user confirms the source and contents:
tmpdir="$(mktemp -d "${TMPDIR:-/tmp}/android-cli.XXXXXX")" || exit 1
curl -fsSL https://dl.google.com/android/cli/latest/linux_x86_64/install.sh -o "$tmpdir/install.sh"
sed -n '1,160p' "$tmpdir/install.sh"
# After review and explicit user confirmation:
bash "$tmpdir/install.sh"
Use the matching darwin_arm64/install.sh or windows_x86_64/install.cmd URL for macOS or Windows. Do not pipe mutable network installer scripts directly into a shell.
SDK Management
To manage the installation of Android SDKs and tools, use the sdk command. For example:
android sdk install <package>[@<version>]...: Install specific packages. Multiple packages can be specified, separated by spaces.<version>defaults to latest. For example:android sdk install platforms/android-30@2 platforms/android-34android sdk update [<pkg-name>]: Update a specific package or all packages to the latest version.android sdk remove <pkg-name>: Remove a package from the local SDK.android sdk list --all: List installed and available SDK packages.
Project Creation
Create projects from templates using the create command.
For example:
android create empty-activity --name="My App" --output=./my-app
Interacting with Devices
For more information on interacting with running devices, see here.
Running Journey Tests
For more information on running journeys, see here.
Doc Searching
The docs command searches authoritative, high-quality Android developer documentation in the Android Knowledge Base.
By providing a few keywords, this tool will return high quality articles that contain examples or guidance on how to use Android APIs or libraries.
Use this tool to obtain additional information on how to achieve Android-specific tasks or to know more about Android APIs, surfaces, libraries, or devices.
Always use this tool to get the most up-to-date information about Android concepts. Typical good use cases are:
- Finding migration guides for APIs.
- Finding examples for APIs.
- Finding up-to-date information about Android APIs.
- Finding best practices for Android concepts.
Running APKs
Use the run command to run Android apps.
Managing Emulators
Manage Android Virtual Devices (AVDs) using the android emulator command.
Capturing Screenshots
Capture an image of the current screen of a connected Android device and output it to a file using the android screen capture -o <file path> command.
Managing Skills
Manage antigravity agent skills for Android using the android skills command.
Inspecting UI Layouts
Use the android layout command to inspect the UI layout of an Android application. It returns the layout tree of an Android application in JSON format. When debugging UI errors, this is often a much faster approach than taking a screenshot.
Updating the CLI
Update the Android CLI using the android update command.
Limitations
- The
androidCLI must be installed and available onPATH; otherwise install it first or use the platform-specific setup guidance above. - Device, emulator, SDK, and documentation commands can depend on local Android SDK state, network access, and attached hardware.
- Treat generated commands as environment-sensitive: inspect paths, package names, device serials, and install/update targets before running them.
Android Help Output
Usage: android [-hV] [--sdk=PARAM] [COMMAND]
-h, --help Show this help message and exit.
--sdk=PARAM Path to the Android SDK
-V, --version Print version information and exit.
Commands:
…
常见问题
我该如何安装 Android SDK?
你可以使用命令 “android sdk install”,后面加上包名,还可以选择性地加上版本号。例如:“android sdk install platforms/android-30@2”。
我该如何截取 Android 设备的屏幕截图?
使用命令 “android screen capture -o filename.png”。请确保设备已连接。
什么是 “android docs”?
这是一个用来搜索 Android 官方文档的命令,可以帮你找到关于 API 和库的使用示例与指南。
详情
作者的原始描述
Orchestrates Android development tasks including project creation, deployment, SDK management, and environment diagnostics using the `android` command-line tool.
热度
- GitHub 星标
- 48k
- 排名
- #6249
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。