FlexSite CLI Reference

Applies to: FlexLab

Overview

The FlexSite CLI (flexsite) automates database pulls, file sync, Drush, and auth against FlexLab environments.

Prerequisites

  • FlexLab project with at least one ready environment.
  • Personal access token from ProfileTokens (account menu).
  • CLI installed locally (npm install -g @flexsite/cli or per docs).

Common commands

| Command | Purpose |

|---------|---------|

| flexsite auth login | Authenticate with token |

| flexsite auth status | Verify session |

| flexsite db pull | Download latest DB backup |

| flexsite files pull | Download files backup |

| flexsite sync | Sync DB and files |

| flexsite drush -- | Run Drush remotely |

Steps — first use

  1. Create token with required scopes on Tokens.
  2. Run flexsite auth login in your project directory.
  3. Select organization and environment when prompted.
  4. Run flexsite db pull to test connectivity.

See FlexSite CLI Setup in the FlexLab book for full command reference.