This directus CLI extension allows you to sync your directus flows and operations with your local filesystem.
Install npm dependencies:
npm install
Run unit tests:
npm run test
Build the extension:
npm run build
Copy the dist/index.mjs
file to your directus extensions directory.
Export flows and operations to the filesystem:
npx directus flow export
Import flows and operations from the filesystem:
npx directus flow import
The following CLI options are available when exporting flows and operations:
-i
,--include-inactive
: Include inactive flows and operations in the export. Defaults tofalse
.
The following CLI options are available when importing flows and operations:
-u
,--user-id <uuid>
: The user id to use for the import. Defaults tonull
.-o
,--overwrite
: Overwrite existing flows and operations. Defaults tofalse
.-i
,--import-ids <ids>
: A comma separated list of flow ids to import. Defaults to[]
. If no ids are provided, all flows are imported.
The extension can be configured using the following environment variables:
FLOW_SYNC_PATH
: The path to the directory where the flows and operations are stored. Defaults to./extensions/hooks/flow-sync/config
.
Pull request welcome. For major changes, please open an issue first to discuss what you would like to change.
In case you need help or have questions, feel free to contact us via support@dasburo.com or [create an issue].
This project is licensed under the GNU General Public License v3.0 license.
Inspired by Gerard Lamusse's solution in directus-rbac-sync.