Sencha Ext JS 7.7 is Here – Discover What’s New and Exciting – LEARN MORE Support in Sencha Cmd

March 27, 2013 177 Views

Introduction is a backend-as-a-service, providing a set of APIs that helps developers to build and run their applications. It enables you to build web applications using services provided through our mobile JavaScript framework Sencha Touch. Sencha Cmd is a command line tool that gives you access to a lot of functionality that is helpful when building applications with Sencha Touch including, as of version 3.1, support.

In this article, we will highlight the functionality available in Sencha Cmd by walking through the process of creating an application, deploying it to the cloud, and managing its settings.

Getting Started — Hosting a Web App on

To begin using the system, you will need a Sencha ID (same as your Sencha forum ID). If you don’t already have one, visit the registration page to get one. You’ll also need a recent version of Sencha Cmd (version 3.1 or later). You can get a copy of Sencha Cmd for your specific OS platform from the official Sencha Cmd download page.

For information about how to develop an application using the SDK and Sencha Touch, please visit the Dashboard. You’ll find downloads and examples of how to leverage the SDK in your own applications.

Sencha Cmd and
The Dashboard

The Dashboard allows you to create and manage cloud hosting and services for your applications. While the Dashboard interface exposes the functionalities available in the platform, some developer workflows that include repetitive tasks are better suited to command line tools. To support these workflows, we have added support to Sencha Cmd which allows you to perform many of the same functions available in the Dashboard from the command line. For a brief overview of how to use Sencha Cmd, take a look at the Cmd introduction guide.

Let’s start by creating an application that we can modify and configure. The following steps were executed in a command line window with access to a Sencha Cmd installation.

Sencha Cmd and

In this example, test user extraordinaire Testy McTesterson is creating an app, called testApp. From the service response, you can see that the above service request was successful and a unique AppId and AppSecret has been created for this application to use. Since these values will be used in the client framework SDK to identify your application with the service, you may want to record them for future use. However, if you ever need them again, you can get them from the Dashboard or by using the list-apps command:

Sencha Cmd and

When applications are deployed on, cloud hosting is automatically allocated for that app on Senchafy (’s hosting service) and that app becomes available on the Internet at a unique Senchafy subdomain URL. You can see from the previous example that the output of the list-apps command includes the AppId and AppSecret, as well as this unique Senchafy URL for this specific app. Additionally, you can also register a CNAME for your app to use and assign it through the Dashboard.

Now that cloud hosting has been allocated for our app, we can create a version of that app and upload it to the cloud. Here, our test developer has prepared a small app that he wants to upload, in a zip file named, and use Cmd to upload it as version 1.0 of his app.

Sencha Cmd and

Even though we’ve successfully uploaded the application to the cloud, it must then be deployed in order to be accessible through its Senchafy URL. The deployment service allows you to keep multiple versions of your app stored in the system, and lets you switch between them as you see fit by deploying the appropriate app version. We will now execute the following command to deploy version 1.0 of our app that we just uploaded:

Sencha Cmd and

Now the test app will be accessible through its Senchafy URL and is now published in the cloud. Just to confirm that the application has been unpacked and deployed correctly, we can use the io-fs command to query and modify the file system of the remote application. To confirm that our index.html file inside has made it’s way to the remote cloud file system, we can list all the files available:

Sencha Cmd and

The above results confirm that the zip file containing index.html was successfully uploaded and added to the currently deployed app version. If you want to modify the contents of the currently deployed app version, you can use the rm and put commands to remove existing files and add new ones to the remote file system.

Sencha Cmd and
The Todo List Application Hosted on Senchafy

Configuring Authentication in

One of the key features of is the user and authentication model. Users can log into the system either through an application specific username (email address) and password, or through their Facebook or Twitter accounts. Exactly which types of login are enabled for your application can be configured using the Authentication Groups settings for your application. You can see a really good illustration of this concept in the Todo App example from the Sencha blog; I’ve updated the code to work with the current version of, and I hosted it as the test application from the previous section.

To use Authentication Groups and User model, you first need to create an Authentication Group. Here our test developer is creating an auth group for the workers in his company:

Sencha Cmd and

When an auth group is created, by default, it is enabled to use authentication (i.e, application specific username/email & password). We can use Sencha Cmd to associate the Workers auth group that we just created with the test app we created earlier:

Sencha Cmd and

Now, we can specify the login mechanisms for the app. For example, if we want to enable Facebook auth for testApp, we can do so from Sencha Cmd as well.

Sencha Cmd and

The developer needs to supply the application key and secret values for Facebook along with the above command, and the auth group will be updated. Now, any app which has the Workers auth group associated with it will accept Facebook logins, and any app built with the Controller from the client framework will automatically adjust its UI to this new auth group configuration.


Sencha Cmd allows you to perform a wide variety of tasks, including managing how an application is configured and hosted in As the platform grows and more services and configuration options are added to it, we will continue to add equivalent features to Sencha Cmd, so developers can automate their workflows and test effectively. Let us know if you have any ideas for Cmd integration that will make your life easier and join the discussion on the forum!


coming soon

Something Awesome Is