|
|
1 week ago | |
|---|---|---|
| .. | ||
| .zcode-plugin | 1 week ago | |
| commands | 1 month ago | |
| hooks | 1 month ago | |
| output-styles | 1 month ago | |
| scripts | 1 month ago | |
| skills | 1 month ago | |
| src | 1 week ago | |
| templates | 1 month ago | |
| test | 1 week ago | |
| .mcp.json | 1 month ago | |
| README.md | 1 week ago | |
| package.json | 1 week ago | |
| tsconfig.json | 1 month ago | |
ZCode plugin for model-driven Android app development.
The package root is the plugin root:
zcode --plugin-dir /absolute/path/to/android-emulator-plugin
When enabled, ZCode loads:
.zcode-plugin/plugin.json for plugin metadata and skill/command paths..mcp.json for the stdio MCP server.skills/android-dev/SKILL.md for the model workflow.commands/android-dev.md as a convenience slash command.ZCode bundles this package as the official
android-emulator@zcode-plugins-official plugin. Enable the plugin to project
its skill, slash command, and MCP server into the session.
At startup ZCode copies the packaged plugin files into
~/.zcode/cli/plugins/cache/zcode-plugins-official/android-emulator/0.1.1/
and runs the MCP server from that cache directory. SEA builds rewrite the
official plugin's ZCode manifest to launch the cached MCP server through ZCode's
internal plugin host, so the server uses the embedded Node.js runtime.
Third-party plugins are not rewritten automatically and keep their own declared
command.
Example ~/.zcode/cli/config.json entry:
{
"plugins": {
"enabledPlugins": {
"android-emulator@zcode-plugins-official": true
},
"options": {
"android-emulator@zcode-plugins-official": {
"default_avd": "medium_phone",
"api_level": "35"
}
}
}
}
The plugin MCP server name is android-emulator. ZCode normalizes that name for
model-visible MCP tools, so the model sees mcp__android_emulator__<tool>, for
example mcp__android_emulator__android_preflight. The MCP server still
implements the raw MCP tool names such as android_preflight; ZCode maps
between the model-visible name and the server tool name.
Use stdio for the normal local workflow. HTTP is only useful if you later wrap this package as a long-running daemon shared by multiple clients.
android_preflightandroid_discover_projectandroid_create_appandroid_build_appandroid_build_and_runandroid_list_devicesandroid_list_avdsandroid_start_emulatorandroid_stop_emulatorandroid_create_avdandroid_install_appandroid_launch_appandroid_terminate_appandroid_open_urlandroid_screenshotandroid_logsandroid_ui_statusandroid_ui_describeandroid_ui_resolveandroid_ui_tapandroid_ui_swipeandroid_ui_type_textandroid_ui_keyeventandroid_preflight reports it as an
unsupported host.adb).PATH so generated projects can create a Gradle wrapper when one is missing.Use android_preflight for diagnostics. When setup is missing, the android-dev skill follows skills/android-dev/INSTALL_ENVIRONMENT.md for fixed macOS shell or Windows PowerShell setup procedures before returning to MCP tools.
Android SDK path, default AVD, API level, build-tools version, system image variant/ABI, and JDK major version are configurable through plugin user config.
android_start_emulator starts a new GUI Android Emulator and returns its
serial. It does not reuse existing devices or emulators; pass an existing
target's serial directly to install, launch, screenshot, log, or UI tools.
pnpm install
pnpm --filter @zcode/android-emulator-plugin typecheck
pnpm --filter @zcode/android-emulator-plugin test
pnpm --filter @zcode/android-emulator-plugin build
The Claude-compatible .mcp.json and the ZCode manifest both execute
dist/mcp/server.js with Node.js. Run the package build after changing
TypeScript sources.
src/providers/project.ts owns project discovery and creation.src/providers/build.ts owns Gradle build orchestration.src/providers/avd.ts and src/providers/device.ts own emulator/device lifecycle.src/providers/ui.ts owns UI automation operations.