# Edit this file, save it as .env beside main.py, then run: python main.py
# Values are literal: $, backslashes and # inside quotes are preserved.
# Do not use shell expansion. Quote passwords that contain spaces or #.

# auto uses a configured folder/ZIP/SFTP source; otherwise it uses HTTP.
WM_MODE=auto
WM_ACTION=extract

# Integration Server connection from Designer (NOT My webMethods).
# Specify the actual protocol and listener port; no port is assumed.
WM_HOST=YOUR_IS_SERVER_IP_OR_HOST
WM_PORT=YOUR_IS_PORT
WM_PROTOCOL=https
WM_USERNAME=YOUR_DESIGNER_USERNAME
WM_PASSWORD="YOUR_DESIGNER_PASSWORD"
# Optional complete base URL overrides WM_HOST / WM_PORT / WM_PROTOCOL.
WM_URL=
# For an HTTP-only listener, set WM_PROTOCOL=http AND WM_ALLOW_HTTP=true.
WM_ALLOW_HTTP=false
# Internal HTTPS CA bundle. Use a hostname covered by its certificate.
WM_CA_FILE=
# false connects directly to IS; true uses HTTP(S)_PROXY / NO_PROXY.
WM_USE_PROXY=false
WM_RESPONSE_FORMAT=json

# Empty means all packages visible in the selected source.
WM_PACKAGES=
# Optional comma-separated glob patterns, e.g. Wm*,Test*
WM_EXCLUDE=

# HTTP source collection. nodes is inventory-only, not Flow/Java recovery.
WM_COLLECTION_MODE=auto
# Use name only if confirmed by your installed export service signature.
WM_EXPORT_PACKAGE_FIELD=package
WM_SKIP_SERVER_METADATA=false

# Strongest source route: an IS packages folder or an individual package.
# Example Windows: C:/SoftwareAG/IntegrationServer/instances/default/packages
# Example Linux: /opt/softwareag/IntegrationServer/instances/default/packages
WM_PACKAGES_DIR=
# A Designer export ZIP or directory of ZIPs (multi-package ZIPs supported).
WM_ZIPS_PATH=

# Each run gets its own timestamped directory inside this parent.
WM_OUTPUT_DIR=output
WM_TIMEOUT=60
WM_DELAY=0.2
WM_MAX_DOWNLOAD_MB=256
WM_MAX_FILE_MB=16
WM_MAX_UNPACKED_MB=1024
WM_MAX_ENTRIES=100000
# Only HTTP/ZIP modes: keep original unredacted archives locally.
WM_KEEP_ARCHIVES=false

# Optional automatic source reads over SFTP; requires requirements-sftp.txt.
# These are OS/SFTP credentials, separate from the Designer/IS login.
WM_SFTP_HOST=
WM_SFTP_PORT=22
WM_SFTP_USERNAME=
WM_SFTP_PASSWORD=
WM_SFTP_KEY_FILE=
WM_SFTP_KEY_PASSPHRASE=
# An OpenSSH known_hosts file containing a separately verified server key.
# Blank uses the user's standard known_hosts file. Unknown keys are rejected.
WM_SFTP_KNOWN_HOSTS=
WM_SFTP_PACKAGES_DIR=
