Leveraging the FreeScout CLI for managing your installation

4 min read

FreeScout stands out as a robust, open-source solution. For administrators and power users, tapping into the full potential of FreeScout often means going beyond the graphical user interface (GUI) and harnessing the power of Command Line Interface (CLI) commands. These commands offer a more direct and versatile method of managing and customising the FreeScout experience.

The Advantage of Using CLI Commands

CLI commands in FreeScout allow for swift and efficient management of the system. Unlike the GUI, CLI commands can execute tasks instantly, automate repetitive actions, and provide a deeper level of control. They are particularly useful for:

  • Batch Processing
    Perform actions on a large scale quickly, such as updating multiple modules simultaneously.
  • Automated Maintenance
    Schedule regular maintenance tasks, like clearing cache or cleaning up logs, without manual intervention.
  • Enhanced Customisation
    Access advanced settings and customisations not available through the GUI.

Why CLI Commands Are Useful

Utilising CLI commands in FreeScout is invaluable for:

  1. Time-Saving: Perform complex tasks in a fraction of the time it would take via GUI.
  2. Precision: Execute specific operations with accuracy and reduce the risk of human error.
  3. Scripting and Automation: Integrate commands into scripts to automate workflows and system maintenance.

Use Case Scenarios and Examples

  • Automated Email Fetching
    Use freescout:fetch-emails to set up a cron job that automatically retrieves emails from mailboxes at regular intervals.
  • User Management
    Quickly create a new user with freescout:create-user without going through the web interface, streamlining the onboarding process.
  • Module Updates
    Apply updates to all modules using freescout:module-update, ensuring that your system is up-to-date with minimal downtime.

Full List of available Commands (CLI) as of 2024.01

Below is a detailed list of CLI commands available in FreeScout, each serving a specific function to streamline and enhance the system management process:

  • freescout:after-app-update: Executes necessary commands after the application has been updated.
  • freescout:build: Runs commands required for building application assets.
  • freescout:check-conv-viewers: Checks if users have finished viewing a conversation.
  • freescout:check-requirements: Verifies the console version of PHP for compatibility.
  • freescout:clean-notifications-table: Deletes old read records from the notifications table to maintain database efficiency.
  • freescout:clean-send-log: Removes older records from the send log to free up database space.
  • freescout:clean-tmp: Clears FreeScout files older than one week from the system's temp folder to prevent storage issues.
  • freescout:clear-cache: Clears the application cache and cache configuration for optimal performance.
  • freescout:create-user: Facilitates the creation of a new user directly from the command line.
  • freescout:fetch-emails: Automates the fetching of emails from specified mailboxes.
  • freescout:fetch-monitor: Monitors email fetching, sending alerts for any operational issues or recoveries.
  • freescout:generate-vars: Generates a vars.js file containing variables and translated strings for the application.
  • freescout:logout-users: Logs out all users, useful for system resets or after major updates.
  • freescout:logs-monitor: Sends new log records via email for administrative review.
  • freescout:module-build: Builds a specific module or all modules (if module_alias is empty).
  • freescout:module-check-licenses: Checks licenses for all installed modules.
  • freescout:module-install: Installs a module (or all modules) by running migrations and creating a symlink.
  • freescout:module-laroute: Generates a Laravel routes JS-file for a specific module or all modules.
  • freescout:module-update: Updates all modules or a single module (if module_alias is set).
  • freescout:send-monitor: Checks if the queue:work is processing the email queue and displays alerts in the web interface if needed.
  • freescout:test-webklex: Tests the Webklex/php-imap library for functionality.
  • freescout:update: Updates the application to the latest version from GitHub.
  • freescout:update-folder-counters: Updates counters for all folders, ensuring accurate data display.
  • freescout:workflows-process: Processes date-conditioned workflows for system automation.

Each of these commands plays a vital role in the efficient and effective management of the FreeScout helpdesk system, providing administrators with the tools needed for advanced system control and customization.

Further notes...

The CLI in FreeScout is an underutilised gem that offers efficiency, precision, and a depth of control unmatched by the standard GUI. By mastering CLI commands, administrators can significantly enhance the functionality and management of their FreeScout systems, leading to a smoother, more efficient customer support operation. Whether you're managing user accounts, updating modules, or maintaining the system, the CLI is an indispensable tool for any seasoned FreeScout administrator.


Ready to Optimize Your Email Management with FreeScout? Reach Out Now for Expert Assistance!"