An Experiment to Run the Right Sencha Cmd

Dec 1, 2014 · 2 min read

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

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 sencha


You only need to install it using npm:

$ sudo npm install -g cmd-plus


There are a few more options you can run with cmd-plus


Shows the list of all current versions available in your system.

You can check your installed versions with:

$ cmd-plus list

Use [Version] {Sencha Cmd Options}

Uses the given Sencha Cmd version to run the command.

This will generate a new app using cmd version

$ cmd-plus use -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.

GitHub Repository

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.