CLI

Qovery provides a very easy to use CLI (Command Line Interface) designed to fit the developer workflow perfectly.


The purpose of the CLI is to integrate seamlessly with your development workflow:

  1. Write code
  2. Commit
  3. Qovery - deploy a new version of your application
  4. Qovery CLI - check the status of your application
  5. Qovery CLI - debug your application
  6. Repeat

First usage

Install

# Download and install Qovery CLI on every Linux distribution
$ curl -s https://get.qovery.com | sudo bash

Sign up

# Sign up and sign in command
$ qovery auth

Your browser window with sign-in options will open.

Qovery Sign-up page

Click here to authorize Qovery to clone and build your applications.

Connect Github

Congratulations, you are logged-in.

Help

You can see all the commands available by executing:

$ qovery help
Help output
$ qovery help
A Command-line interface of Qovery platform
Usage:
qovery [command]
Available Commands:
auth Log in to Qovery
completion Generate the autocompletion script for the specified shell
console A brief description of your command
context Setup the CLI context
help Help about any command
log Displays application logs
status A brief description of your command
version Print version information for the Qovery CLI
Flags:
-h, --help help for qovery

Context

Context command lets you configure the CLI to work with your chosen application. Before executing other commands, you need first to set up the context. The context is then remembered and used by the CLI. You can configure a new context anytime by running the qovery context set command.

Set New Context

To set a new context, type qovery context set:

$ qovery context set
Qovery: Current context:
Organization | Qovery
Project | test
Environment | development
Application | website
Qovery: Select new context
Organization:
✔ Qovery
Project:
✔ admin
Environment:
✔ main
Application:
✔ app
Qovery: New context:
Organization | Qovery
Project | admin
Environment | main
Application | app

Print Current Context

$ qovery context
Qovery: Current context:
Organization | Qovery
Project | admin
Environment | main
Application | app
Qovery: You can set a new context using 'qovery context set'.

Log

Log command allows you to display the application logs.

$ qovery log
TIME MESSAGE
Jul 15 08:46:13.019717 at /usr/src/app/autoFunctions/levels.js:17:16
Jul 15 08:46:13.019721 at Array.forEach (<anonymous>)
Jul 15 08:46:13.019724 at Timeout._onTimeout (/usr/src/app/autoFunctions/levels.js:15:14)
Jul 15 08:46:13.019728 at listOnTimeout (internal/timers.js:557:17)
# ... the rest of logs

By default, the last 1000 logs is displayed.

Follow Logs

To make the CLI follow your logs, use -f flag:

$ qovery log -f
TIME MESSAGE
Jul 15 08:46:13.019717 at /usr/src/app/autoFunctions/levels.js:17:16
Jul 15 08:46:13.019721 at Array.forEach (<anonymous>)
Jul 15 08:46:13.019724 at Timeout._onTimeout (/usr/src/app/autoFunctions/levels.js:15:14)
Jul 15 08:46:13.019728 at listOnTimeout (internal/timers.js:557:17)
# ... the rest of logs

This will make the CLI follow your application logs and append any new logs till you use CTRL+C.

Status

Status command lets you print the basic status of your application.

$ qovery status
15 Jul 21 10:55 CEST
Application | Backend
Status | RUNNING

Console

Console command quickly opens the Qovery Console in your browser to let you display more information about your application.

$ qovery console
Qovery: Opening https://console.qovery.com/platform/organization/your-org/projects/your-proj/environments/your-env/applications/your-app/summary

Shell

Shell command allows you to open an ssh connection with the container where your application is running (application selected via the cli context).

$ qovery shell
/ # ls
bin media srv
dev mnt sys
docker-entrypoint.d opt tmp
docker-entrypoint.sh proc usr
etc root var
home run www
lib sbin

Generate API token

To use the Qovery API you will need to generate an authentication token. To generate an API token you can install the CLI and type

$ qovery token
Qovery: Select organization
Organization:
✔ My Organization
Choose a token name
Token name: Romaric
Choose a token description
Token description: used for Github Actions
Qovery: ---- Never share this authentication token and keep it secure ----
Qovery: qov_4LnEg2wFxxxxxHObGSQ22rjBZZyyyySgyR6Y_2500882691
Qovery: ---- Never share this authentication token and keep it secure ----

To use your token and list your organizations.

curl -X GET -H 'Authorization: Token qov_4LnEg2wFxxxxxHObGSQ22rjBZZyyyySgyR6Y_2500882691' https://api.qovery.com/organization

Check out our API documentation

Support

Do you have any issues with Qovery CLI? Open an issue.