Skip to content

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 taskCurrent supportInput and output boundary
Compile, deploy, reinstall, or restartSupportedUses compile, deploy, gradle-build, clean-reinstall, and restart
Run androidTestSupportedUses instrument; --source-path is required
Inspect runtime status and device informationSupportedUses status, devices, activity-stack, and wait-logs
Inspect and interact with the UISupportedUses layout-dump, view-locate, view-inspect, and tap
Request remote diagnostic informationSupportedUses ssh-info and requires explicit user consent

Invocation

text
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.

text
CLI
  -> Discover a local MCP port
  -> Resolve projectDir
  -> Call the corresponding MCP tool
  -> Poll get-compile-status when needed
  -> Output plain / rich / json results

Subcommand groups

For exact arguments and output fields, see CLI command reference and MCP tool reference.