sitepilot/flight

Flight is a remote development tool that enables your existing local tools to work with code in remote environments.

v1.1.0 2023-06-21 09:13 UTC

This package is auto-updated.

Last update: 2024-04-16 10:21:14 UTC


README

Latest Version Total Downloads Build Status License

Introduction

Flight is a remote development tool that enables your existing local tools to work with code in remote environments. It helps you to manage your projects, execute remote commands, work with remote containers and enables real-time file synchronization using Mutagen.

Installation

Downloading the phar file is the recommended installation method for most users. Before installing Flight, please make sure your environment meets the minimum requirements:

  • UNIX-like environment (Linux, MacOS, WSL)
  • PHP 8.1 or later
  • Mutagen
php -r "copy('https://github.com/sitepilot/flight/releases/latest/download/flight', 'flight');"

Next, check the phar file to verify that it’s working:

php flight --version

To use Flight from the command line by typing flight, make the file executable and move it to somewhere in your PATH. For example:

chmod +x flight
sudo mv flight /usr/local/bin/flight

Getting Started

Run flight init within a local project folder to create a Flight configuration file. The configuration will be stored in <project-root>/flight.yml.

Configuration

The table below contains a list of all configuration options supported by Flight.

Key Default Description
host - The remote SSH host
port 22 The remote SSH port
user root The remote SSH user
shell bash The remote SSH port
path - The remote project path
container.name - The remote container name
container.user root The remote container user
container.shell bash The remote container shell
database.ssh false Connect to the database via SSH
database.type mariadb The database type (e.g. mariadb, mysql, microsoftsqlserver)
database.host <env>.host The database host
database.port 3306 The database port
database.name - The database name
database.user - The database user
database.password - The database user
sync.ignore - A list of files and folders to ignore
links.* - A list of external project links (key-value)

Example

host: 1.2.3.4
port: 22
user: captain
path: ~/code/project
sync:
  ignore:
    - node_modules
links:
  preview: https://sitepilot.io

Commands

Command Description
flight init Initialize configuration
flight config Display the configuration
flight shell Start a remote shell
flight shell --host Start a remote shell to the host (when using a remote container)
flight folder Open project folder in explorer / finder
flight open {link} Open a project link in the default browser
flight db Open database in TablePlus
flight db --show Show database connection string (for import in TablePlus)
flight sync Start / resume file synchronization
flight sync:status Display file synchronization status
flight sync:pause Pause file synchronization
flight sync:terminate Terminate file synchronization
flight sync:list Display all file synchronization sessions
flight artisan {command} Run a Laravel Artisan command
flight wp {command} Run a WPCLI command
flight compose {command} Run a Docker Compose command
flight up {options} Alias for the docker compose up command
flight down {options} Alias for the docker compose down command

Updating

You can update Flight with sudo flight self-update, or by repeating the installation steps.