Introducing CLI command 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

Working Plan Exceptions

Working plan exceptions explained

Starting from Easy!Appointments 1.4, providers can override their schedule with the use of a powerful new feature, called Working Plan…

Read Story
setup-easyappointments-from-git

Setup Easy!Appointments from git

As an open source project Easy!Appointments has all its source code available on GitHub, one of the most popular collaboration…

Read Story
Default Featured Image

About the email notification system

Easy!Appointments features an email notification system that sends information to both customers and providers that relate to a specific appointment. When a…

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