Scalingo CLI 1.1.0: smart completion and improved UX

Update : Scalingo CLI 1.1.1 has been released, look at the end of the post for more details.

During these past weeks, the command line client scalingo has been greatly improved, adding new features that will enhance your working environment and productivity. These features include the smart completion of every command and subcommand, a --remote flag which helps you selecting the environment of your choice, and a --filter flag available to the “logs” command.

image

#

Manage your applications faster

From now, Scalingo CLI shows a list of available arguments for commands, subcommands and even flags, making your experience smoother. For instance, you can select your app by pressing tabulations after the --app flag, or even the addon you want to provision (as shown above).

Completion has been built using the Scalingo public API (like our Dashboard and the CLI itself) and is a small example of what you can do with it.

We chose to design it in a way that makes you save your time. You don’t need to type anything entirely anymore, it’s quicker and you will probably avoid mistakes.

Interesting usecases

  • You just created an application and you want to add collaborators from an other app:
scalingo -a myapp collaborators-add <tab><tab>

This will show you every collaborator you are working with on all your apps, and let you select them faster.

This way, you won’t have to manually type any email address and won’t miss anyone you would like to invite.

  • If you wish to unset an environment variable but you dont want to remember its exact name:
scalingo -a myapp env-unset <tab><tab>

All your app’s environment variables are displayed and can be selected easily. There are many other commands that are smartly completed by requesting the Scalingo public API.

Setup

Our completion is supported by both bash and zsh. There is a script for each shell that has to be installed manually. Scripts and steps to follow can be found here.

Deploy in your custom environment

You can now specify a --remote flag instead of using --app

it gives you a quicker way to select the application you are working with. It looks at your GIT remotes of your current project to find the right Scalingo applications name.

Even the simpliest workflow may include a staging and a production environment. You can how handle them more easily.

We will assume remotes have already been created by doing:

scalingo create --remote staging myapp

Which will create an app and add a git remote named “staging”, or if you already have created the application with our dashboard, you can directly run the following git command to add the remote accordingly.

git remote add staging git@scalingo.com:myapp.git

Let’s say you want to check your logs on different environments:

scalingo --remote staging logs
scalingo -r production logs
scalingo -r myenv logs

Filter your logs by container type

We decided to add a --filter flag to the “logs” command in order to reduce the log stream to a specific or multiple container types.

Sometimes you may want to debug or have information about a particular process running on your app, this is now possible and you don’t have to search for the container in a huge logs stream.

To achieve this you can add to “logs” command a --filter flag or its alias -F flag followed by a pattern matching your container’s name.

image

Conclusion: give it a try

Our role is to keep improving the developers workflow and experience. The command completion is an important step to improve productivity using this tool. The best is to try it! If you haven’t yet, create an account at scalingo.com, then to install or update an existing installation of the command line client, follow the instructions at cli.scalingo.com.

Update: Scalingo CLI version 1.1.1

Multiple bugfixes and regression corrections. This version also adds the completion to the ‘–remote’ flag. To improve completion performance, a completion cache has been added to avoid querying the API too often.

You’ll find a complete changelog at http://cli.scalingo.com

What are you waiting to try Scalingo?
30 days free trial. No credit card required. Deploy now, scale later.