All products

Sync Directus environments with AI

Compare a saved configuration with another Directus instance before promoting schema, dashboards or flows. Keep environment-specific settings separate.

You can sync Directus environments with AI when a tested change needs to move from staging to production. The directus-environment-sync skill distinguishes what was pulled from the source from what currently sits on disk. The target receives the latter, so a stale folder or an accidental edit matters.

A comparison makes additions and changes visible before a push. It also gives you somewhere to catch a staging preview address, a flow header containing a secret or a target licence that cannot accommodate the proposed configuration.

What it does

  • Pull selected collections and settings into reviewable JSON files.
  • Compare the saved configuration with an authorised target without applying it.
  • Exclude settings that should differ between staging and production.
  • Distinguish merge and add operations from mirror-mode deletions.
  • Keep the identifier map so subsequent promotions match the same records.

Install and use

  1. Install the skill and the official Directus 12 CLI using Node 22 or later. Use separate admin credentials on two Directus instances at the same patch version, at least 12.2, with matching database vendors.
  2. Ask, “Compare the publishing configuration with staging. List the proposed changes and leave the production instance alone for now.”
  3. Review the diff, including flow bodies and headers. Approve the intended promotion and save any updated identifier map afterwards.

FAQ

Source

Made by Directus (Monospace Inc.). Original skill: directus-environment-sync, published on GitHub under the MIT licence.

View on GitHub