Clever Tools Packaged!

We have packaged the Clever Tools CLI for Windows, MacOs & GNU/Linux. This makes it way easier to setup. Discover how to do it for these platforms.

Clever Tools should better be called Clever Cool

First of all, what is Clever Tools? Ok, basically it’s all what you can do in the console.clever-cloud.com web UI but through a command line tool.

How is that awesome?

Well, it is. For most of our users, going back and forth in the web console is slowing their development workflow. Even if the web console is indispensable for people more comfortable with it, we wanted our users to be able to exactly to do the same in both. By the way, did you know you can also use the API to do everything?

Anyway, the cool part with Clever Tools is that you stay in the comfy shell. You can use Clever Tools along with vim, git and even grep. That’s pretty handy to manage logs for instance.

Earlier this year, we released new features in the CLI 0.7.0 such as fine-grained access to logs, ssh into a running instance for debugging purposes (eg. list files, view logs locally,…)

So here is a short review of whay you can do:

# Deploying on the production server
$ clever deploy --alias prod
# Displaying the (live-updated) status of an app
$ clever activity --follow --alias preprod
# Show the logs
$ clever logs
# Create a free plan PG addon named my-addon in the Montreal zone
$ clever addon create postgresql-addon my-addon-pg --plan dev --region mtl
# Create a node.js app named my-app-dev in the Paris zone
$ clever create my-app-dev --type node --alias dev --region par

But you can also set notifications, start and stop your apps… well, as we said: everything!

If you want to dig it a bit more, you will find everything you can do within the CLI.

Ok, but I already knew all that!

Ok, now what’s new is that we packaged Clever Tools for Windows, GNU/Linux and MacOS.

But why is that a big deal?

Before that, you had to download and install node and npm to install clever tools. Now it’s over, it’s all packaged in a binary and very easy to setup.

How to install on MacOS?

Clever Tools is packaged using Homebrew:

brew install CleverCloud/tap/clever-tools

If you don’t want to use brew, a pre-compiled version is available: clever-tools-0.9.0_macos.tar.gz. You need to put both files (clever and nodegit.node) in your PATH to use the application.

Autocompletion

Clever Tools comes with a comprehensive auto-completion system. The brew package installs it automatically (for bash and zsh). Make sure bash-completions or zsh-completions are properly set up.

# In ~/.bash_profile
./usr/local/etc/bash_completion

# In ~/.zshrc
fpath=(/usr/local/share/zsh-completions $fpath)

Documentation.

How to install on Windows?

Clever Tools is packaged using Chocolatey:

choco install clever-tools

If you don’t want to use chocolatey, a pre-compiled version is available: clever-tools-0.9.0_windows.zip. You need to add both files (clever.exe and nodegit.node) to your PATH to use the application.

Documentation.

For GNU/Linux

Now what, we are still hesitating on the distributions to package it for. We would like to have your feedback on that. Feel free to give your point of view in the comments below are by email @ support@clever-cloud.com. Also, if someone wants to manage a PPA, that would be great.

A pre-compiled version is available: clever-tools-0.9.0_linux.tar.gz. You need to add both files (clever and nodegit.node) to your PATH to use the application.

Autocompletion

Clever Tools comes with a comprehensive auto-completion system, this is one way to install it:

# for bash
clever --bash-autocomplete-script $(which clever) | sudo tee /usr/share/bash-completion/completions/clever

# for zsh
clever --zsh-autocomplete-script $(which clever) | sudo tee /usr/share/zsh/site-functions

In case of libcurl version mismatch

On some distributions (eg. archlinux), a libcurl version mismatch between the system default and the expected version can happen. If you see Error: /usr/lib/libcurl.so.4: version 'CURL_OPENSSL_3' not found (required by /usr/bin/nodegit.node) in the logs, you can fix the issue by using a compatible libcurl version:

# install libcurl-compat
pacman -S libcurl-compat # on archlinux

# add an alias to start clever tools with a compatible libcurl version
alias clever='LD_PRELOAD=libcurl.so.3 clever'

Manual installation (advanced)

Even though we provide packaged versions, you can still install Clever Tools with npm: npm install -g clever-tools.

You can also install it from source.

That’s all folks!

We hope you will enjoy these improvements and use more Clever Tools.

As always, feel free to contact us for any feedback. Have a look at the open issues.

Blog

À lire également

SuperBOL: The COBOL revolution in the Cloud

COBOL, a programming language that is over 60 years old, continues to power a large proportion of the IT systems of the world's major companies, particularly in the financial and insurance sectors.
Features

Clever Cloud welcomes the first startups to the UP Programme

Clever Cloud is proud to announce the arrival of the first five startups selected to join its UP Programme, an initiative dedicated to supporting young technology companies in their growth phase.
Company

A minor update resulted in a cascade of errors: how it went wrong, what we’ve learnt

On Friday, August 2nd, 2024 Clever Cloud’s platform became very unstable, leading to downtime of varying duration and scope, for customers using services on the EU-FR-1 (PAR) region, and remote zones depending on the EU-FR-1 control plane (OVHcloud, Scaleway, and Oracle). Privates and on-premise zones weren’t impacted.
Company Engineering