Introducing CLI Support

Alex Tselegidis

Modern applications require various types of interaction in order to serve a variety of purposes. From scripted automations to data safekeeping, CLI (Command Line Interface) commands have a lot to offer in the workflows of any contemporary technological effort.

As part of the constant improvement of the application, Easy!Appointments 1.4 is the first release to provide console support. Common tasks can now be accessed via the terminal application on your local machine or any other hosting environment supports remote terminal connections.

Getting Started

Before using the new CLI commands, you first have to make sure that PHP is accessible from the terminal. Open the terminal application on your local machine and execute the following command.

php -v

Alternatively you can SSH to your remote server and do the same. The output of the command must include the currently installed PHP information. Head to the Easy!Appointments installation directory and try the following commands.

Help

php index.php console help

The Help command will display generic installation information and a list of the available terminal commands. You can execute it as many times as you want, as it can be very handy for getting execution information, before running the actual command.

Migrate

php index.php console migrate

The Migrate command will execute the database migrations up to the last one and update the database structure. This command can also be executed after the new Easy!Appointments release files are uploaded on the server, so that the database gets updated too. The migrate command will also enable you to migrate from scratch (see “migrate fresh” variation of the help output).

Seed

php index.php console seed

The Seed command will add the initially available sample records into the database, so that you can get started with your new installation. Those basically include some admin, provider, service, etc records that also demonstrate the usage of the application.

Install

php index.php console install

The Install command is a combination of the Migrate and Seed commands and will perform a brand new Easy!Appointments installation, without you having to use the user interface. It is a headless way of installing the application, multiple times if necessary. After the installation is completed this command will output information on how to login with the default admin account.

Backup

php index.php console backup

The Backup command will create a dump of the MySQL database to the preferred location which can be used as a point in time snapshot for any production installation. This backup could be imported back to a brand new database in case of data loss.

Sync

php index.php console sync

The Sync command will trigger the Google Calendar Sync for all the providers that have a connected calendar. This command can be configured to run with a cron job and automatically synchronize event changes between Easy!Appointments and Google Calendar.

Upcoming blog posts will provide more information on how to make the most out of your Easy!Appointments installation. Subscribe to the newsletters and follow Easy!Appointments on Facebook or Twitter in order to catch up with the latest updates.

More great articles

how-to-troubleshoot-easyappointments

How To Troubleshoot Easy!Appointments

Troubleshooting any software may become a challenge, especially if not performed correctly. Easy!Appointments offers all the tools and configuration to…

Read Story
software-release-process

Contribute To The Testing Rounds

Soon enough, the Easy!Appointments 1.5 development phase will be completed and the first pre-release packages will become available for download.…

Read Story
contribute-to-translations

Help With Translations

Right out of the box, Easy!Appointments supports multiple languages (29 at the time of writing), featuring an automated language detection…

Read Story

Never miss a minute

Get great content to your inbox every month. No spam.

    Only great content, we don’t share your email with third parties.
    Arrow-up