Developer Tools  / PaaS

A Quick Guide to the Divio CLI

Our quick guide to navigating the Divio CLI. Set up, configure, develop and deploy web apps, as well as interact with the database and storage services.

Mebrahtu Zemui Tesfazghi

Mebrahtu Zemui Tesfazghi

Community Manager

The Divio CLI

The Divio CLI is an important command-line interface tool for setting up, configuring, developing, and deploying your application, as well as interacting with the database and storage services.

Refer to our detailed documentation on Divio CLI’s installation and use, Divio CLI's technical references, and Divio’s local commands cheatsheet for Divio CLI’s commands.

The Divio CLI's User Friendliness

The CLI can be intimidating for a new command-line user initially. However, the Divio CLI commands are easy to remember. After a few uses, it becomes second nature, and one is able to execute commands faster than clicking a mouse.

The Divio CLI Use Cases

The Divio CLI, as part of the local development environment, performs important tasks. The Divio CLI use cases are described in detail in our technical documentation. Some of the highlights are shown below.

Application development and deployment: 

The Divio CLI plays an important role during application development (coding), upgrade (when there is a new release; for example, for new functionality, dependency/vulnerability/bug fixes) and application deployment. For example:

  • Setting up a cloud application locally:
    divio app setup <application_slug> <environment> 

  • Updating local application from the cloud :
    divio app update 

  • Running/stopping a local application:
    divio app up
    divio app down

  • Deploying a cloud application:
    divio app deploy <environment>

Interacting with the cloud services

The Divio CLI also serves as a bridge between the local and cloud services. For example:

  • Updating the cloud database / downloading from the cloud database:
    divio app push db <environment>
    divio app pull db <environment>

  • Updating/uploading media to the cloud media storage/ downloading media from the cloud storage:
    divio app push media <environment>
    divio app pull media <environment>

Troubleshooting

The Divio CLI provides the last deployment logs, and runtime logs

  • Displaying deployment logs:
    divio app deploy-log <environment>

  • Providing real time runtime logs, as it happens:
    divio app logs <environment> 

The Divio CLI is an easy-to-learn but a powerful command-line interface tool that can help you maintain a smooth flow of your application development processes. If you have any questions about the Divio CLI, please contact Divio support.