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 set up 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:
- Applications: configuration
- Applications: management
- Applications: deployment and lifecycle
- Add-ons: management and backups
- Services: dependencies
- Services: logs drains
- Services: notifications and webhooks
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)
[--color] Choose whether to print colors or not. You can also use --no-color (default: true)
[--update-notifier] Choose whether to use update notifier or not. You can also use --no-update-notifier (default: true)
[--verbose, -v] Verbose output (default: false)
Tip
For commands returning a list of items, you can use --format json
or -F json
to get a JSON output.
To check the current version or get information about your setup, use:
clever version
clever diag
clever diag --format json
Note
Such information are nice to provide in your issues report or when you contact Clever Cloud technical support team.
To connect to your Clever Cloud account, use:
clever login
It will open your default browser and start an Open Authorization (OAuth) process to 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 log out, delete this file or use:
clever logout
To get information about the current logged-in user (ID, name, email, 2FA activation, etc.), use:
clever profile
clever profile -F json
To use our public API, you need to be authenticated for most 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
, but in an authenticated context for Clever Cloud API.