Skip to content

Latest commit

 

History

History

docs

How to use Clever Tools

Clever Tools is the command line interface (CLI) of Clever Cloud. You can use it to create and manage multiple services of the platform as applications, databases or storage add-ons. It also provides easy authenticated access to Clever Cloud public APIv2 and APIv4 through the clever curl command.

It's an easy to setup multiplatform and open source tool, based on Node.js. You can contribute to it through issue or pull requests. You're free to ask for new features, enhancements or help us to provide them to our community.

You'll find below the first commands to know to connect Clever Tools to your account, get its information and manage some options. Others are developed in dedicated pages:

basic commands

To show Clever tools available commands, use:

clever
clever help

For each of them, you can add these parameters:

[--help, -?]               Display help about this program (default: false)
[--version, -V]            Display the version of this program (default: false)
[--verbose, -v]            Verbose output (default: false)
[--no-update-notifier]     Don't notify available updates for clever-tools (default: false)

diag | version

To check the current version or get information about your setup, use:

clever version
clever diag

Note

Such information are nice to provide in your issues report or when you contact Clever Cloud technical support team.

login | logout

To connect to your Clever Cloud account, use:

clever login

It will open your default browser and start an Open Authorization (OAuth) process get a token and secret pair added in your account if it succeeds. You can manage it from the Console. Clever Tools will automatically store these token and secret values in a hidden clever-tools.json config file in the current local user home folder.

If you already know them, you can use:

clever login --secret SECRET --token TOKEN

Tip

If environment variables CC_SECRET and CC_TOKEN are set, Clever Tools will use them, login is not needed.

To logout, delete this file or use:

clever logout

profile

To get information about the current logged-in user (ID, name, email, 2FA activation), use:

clever profile

curl

To use our public API, you need to be authentified on many endpoints. If you're logged in through Clever Tools, there is a simple way to make any request you want: clever curl. It's curl, you can use exactly the same way as the famous tool, but in an authenticated context for Clever Cloud API.