OpenGUI icon indicating copy to clipboard operation
OpenGUI copied to clipboard

Can --device accept the phone name instead of the full device ID?

Open PiKaZhung opened this issue 3 months ago • 1 comments

devices already shows a readable phone name, but running a task still means copying the full ID:


pnpm opengui -- do "check the current screen" --device <deviceId> --json

Could --device also accept a unique device name? If two phones have the same name, it can return an error and ask for the ID.

PiKaZhung avatar Aug 17 '26 14:08 PiKaZhung

Thanks for the suggestion — this would make selecting a device much more convenient.

Currently, --device accepts only the exact device ID, even though the devices command also displays a readable device name.

Supporting a unique device name as a selector makes sense. The expected behavior would be:

  • an exact device ID continues to work as it does today;
  • a unique device name can also be used;
  • if multiple online devices have the same name, the CLI returns a clear error and asks the user to specify the device ID;
  • if no device matches, the CLI suggests running pnpm opengui -- devices.

Device IDs will remain the canonical and recommended identifiers for scripts and automated workflows, because device names are not guaranteed to be unique.

We will keep this issue open as a CLI usability enhancement. Thanks for the clear suggestion!

dxcsmam avatar Aug 26 '26 07:08 dxcsmam