-
-
Couldn't load subscription status.
- Fork 27
Closed
Description
The README.md documents environment variables, which can be used to pass flags.
For apply, it references
TARGET_DIRECTUS_URL: Equivalent to--directusUrlTARGET_DIRECTUS_TOKEN: Equivalent to--directusTokenTARGET_DIRECTUS_EMAIL: Equivalent to--userEmailTARGET_DIRECTUS_PASSWORD: Equivalent to--userPasswordTEMPLATE_LOCATION: Equivalent to--templateLocationTEMPLATE_TYPE: Equivalent to--templateType
For extract, it references
SOURCE_DIRECTUS_URL: Equivalent to--directusUrlSOURCE_DIRECTUS_TOKEN: Equivalent to--directusTokenSOURCE_DIRECTUS_EMAIL: Equivalent to--userEmailSOURCE_DIRECTUS_PASSWORD: Equivalent to--userPasswordTEMPLATE_LOCATION: Equivalent to--templateLocation
However, the flags prefixed with TARGET_ and SOURCE_ do not work. When used, the cli exists with
2025-10-24 10:09:09 npm notice
2025-10-24 10:09:10 › Error: Directus URL is required for programmatic mode.
The reason is because they are actually not the ones defined in the code.
For both commands to work, you need to remove the TARGET_ / SOURCE_ prefix from your environment variable definition. Like:
environment:
DIRECTUS_URL: "http://directus:8055"
DIRECTUS_EMAIL: "admin@example.com"
DIRECTUS_PASSWORD: "d1r3ctu5"
TEMPLATE_LOCATION: "/directus/template"
TEMPLATE_TYPE: "local"Metadata
Metadata
Assignees
Labels
No labels