cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse <>
Subject Re: --list argument for CLI
Date Tue, 16 Dec 2014 09:55:25 GMT
Yes to all of this, and welcome aboard!


> On Dec 15, 2014, at 3:22 PM, Murat Sutunc <> wrote:
> Hi all,
> My name is Murat Sutunc, I'm part of the Visual Studio team @ Microsoft and new to Cordova.
> I was looking at the Cordova Tooling Wiki at (
and thought it would be interesting to make some additions to the list-devices feature. Currently
we have list-devices and list-emulator-images scripts for a lot of different platforms. However
these scripts are not easily accessible from the Cordova CLI. By introducing an additional
argument to the run or emulate command, we could show a list of available emulators or connected
devices. (I would like to deemphasize the fact that the command is called --list). After invoking
the command, a user can decide which target to use and run the app on the desired target by
using cordova run -device devicename
> Here's how it looks for an Android only project:
> C:\dev\cordova-projects\hello>cordova run --list
> Running command: C:\dev\cordova-projects\hello\platforms\android\cordova\run.bat --list
> Available Android Virtual Devices:
>        AVD_GalaxyNexus_ToolsForApacheCordova
> Available Android Devices:
> (Internally what happens here is, through run.js we will call android list and adb devices
and pipe that list to the user. Similar process with iOS too.)
> Note that in case a platform doesn't support --list flag, it'll ignore the flag and run
as if the flag is not provided. This is due to current args parsing logic in platforms. Is
this ok for the short term? I would hope that more platforms would support this option in
the future.
> Below are the pull requests for cordova-cli and cordova-android/cordova-ios that have
this functionality implemented. I would like to hear your thoughts on this design, choice
of the flag and if you think this feature would be a valuable addition to the CLI.
> cordova-cli:
> cordova-android:
> cordova-ios:
> PS: My ICLA just got approved. You can also ping me anytime on #cordova, my name on irc
is muratsu.
> Thanks!
> -Murat

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message