Skip to content

Wrong environment variables for apply/extract flags in README #111

@eyecatchup

Description

@eyecatchup

The README.md documents environment variables, which can be used to pass flags.

For apply, it references

  • TARGET_DIRECTUS_URL: Equivalent to --directusUrl
  • TARGET_DIRECTUS_TOKEN: Equivalent to --directusToken
  • TARGET_DIRECTUS_EMAIL: Equivalent to --userEmail
  • TARGET_DIRECTUS_PASSWORD: Equivalent to --userPassword
  • TEMPLATE_LOCATION: Equivalent to --templateLocation
  • TEMPLATE_TYPE: Equivalent to --templateType

For extract, it references

  • SOURCE_DIRECTUS_URL: Equivalent to --directusUrl
  • SOURCE_DIRECTUS_TOKEN: Equivalent to --directusToken
  • SOURCE_DIRECTUS_EMAIL: Equivalent to --userEmail
  • SOURCE_DIRECTUS_PASSWORD: Equivalent to --userPassword
  • TEMPLATE_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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions