Jugg CLI
Jugg CLI is the command-line entry point through which Agents and terminal users access Jugg plugin capabilities. It wraps MCP tools in stable subcommands and handles project resolution, port discovery, asynchronous compilation polling, and human- or script-oriented output formats.
This page explains which tasks the CLI supports and when it is appropriate. For exact commands, arguments, and aliases, see CLI command reference.
Supported tasks
| User task | Current support | Input and output boundary |
|---|---|---|
| Compile, deploy, reinstall, or restart | Supported | Uses compile, deploy, gradle-build, clean-reinstall, and restart |
| Run androidTest | Supported | Uses instrument; --source-path is required |
| Inspect runtime status and device information | Supported | Uses status, devices, activity-stack, and wait-logs |
| Inspect and interact with the UI | Supported | Uses layout-dump, view-locate, view-inspect, and tap |
| Request remote diagnostic information | Supported | Uses ssh-info and requires explicit user consent |
Invocation
python3 {SKILL_DIR}/scripts/jugg.py [global arguments] <subcommand> [subcommand arguments]
python3 {SKILL_DIR}/scripts/jugg.py help <subcommand>TIP
Prefer plain or json for Agent use. rich refreshes terminal lines and is unsuitable as stable model context.
How the CLI finds the plugin
The CLI reads the port cache first. If it misses, it scans the Jugg MCP port range 12320..12329. By default, the project directory uses longest-prefix matching between the current working directory and projects initialized in the IDE. When --project-dir is supplied, the CLI uses that path directly.
CLI
-> Discover a local MCP port
-> Resolve projectDir
-> Call the corresponding MCP tool
-> Poll get-compile-status when needed
-> Output plain / rich / json resultsSubcommand groups
- Build and deployment:
compile,deploy,gradle-build,clean-reinstall,restart - Android Test:
instrument - Runtime and devices:
status,devices,activity-stack,wait-logs - UI automation:
layout-dump,view-locate,view-inspect,tap - Remote diagnosis:
ssh-info
For exact arguments and output fields, see CLI command reference and MCP tool reference.