Working on different customers code base is an interesting experience. Not only you deal with different skills, languages, and configurations but also with versions of ExtJS, Touch and even Sencha Cmd.
In order to replicate the exact same environment we usually keep all public versions of Sencha Cmd locally, and then change the
.bashrc file or create an alias to use the right version.
To avoid that process, I created a very simple nodejs utility:
cmd-plus is an experiment to run the Sencha Cmd version based on the project metadata information (
sencha.cfg). It is a simple wrapper for Sencha Cmd, so you can use it transparently by just installing cmd-plus and run it instead of
You only need to install it using npm:
$ sudo npm install -g cmd-plus
There are a few more options you can run with
Shows the list of all current versions available in your system.
You can check your installed versions with:
$ cmd-plus list 126.96.36.199 188.8.131.52 184.108.40.206 220.127.116.11 18.104.22.168 22.214.171.124 126.96.36.1994 188.8.131.524
Uses the given Sencha Cmd version to run the command.
This will generate a new app using cmd version 184.108.40.206
$ cmd-plus use 220.127.116.11 -sdk ../touch-2.4.0 generate app MyApp MyApp
Returns the current cmd-plus version
$ cmd-plus version cmd-plus v1.0.0
Running any other sencha cmd command is transparent:
$ cmd-plus which
This will execute the current installed
sencha which command. But, if you are under a sencha touch / extjs root app folder it will read the ./.sencha/app/sencha.cfg file and use the cmd version from it. If it is not installed it will default to the latest version.
You can check the sencha-cmd-plus repository for the latest updates or to report any issues.
› Any viewpoints and opinions expressed in this article are my own and do not, in any way, reflect those of my employer, my colleagues, or anyone else. I speak only for myself, not for them.