Can --device accept the phone name instead of the full device ID?
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.
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!