{
    "_comment": "Flitt Edge SDK (Linux) - standalone binary egg",
    "meta": {
        "version": "PTDL_v2",
        "update_url": null
    },
    "exported_at": "2026-01-23T00:00:00+00:00",
    "name": "Flitt Edge SDK (Linux)",
    "author": "Flitt",
    "description": "Runs the Flitt Edge SDK as a standalone Linux binary. Downloads the binary, writes config.yaml, and starts the SDK.",
    "features": null,
    "docker_images": {
        "Debian": "ghcr.io/parkervcp/yolks:debian"
    },
    "file_denylist": [],
    "startup": "./flitt-edge-sdk -config {{CONFIG_PATH}}",
    "config": {
        "files": "{}",
        "startup": "{\n  \"done\": [\n    \"✓ SDK started successfully\",\n    \"Heartbeat connected to backend\"\n  ]\n}",
        "logs": "{}",
        "stop": "^C"
    },
    "scripts": {
        "installation": {
            "script": "#!/bin/bash\nset -euo pipefail\n\ncd /mnt/server\n\necho \"[1/4] Installing dependencies...\"\napt-get update\napt-get install -y --no-install-recommends curl ca-certificates\n\necho \"[2/4] Preparing folders...\"\nmkdir -p ./data\n\nSDK_DOWNLOAD_URL=\"${SDK_DOWNLOAD_URL:-http://localhost:4000/sdk-binaries/flitt-edge-sdk}\"\nCONFIG_PATH=\"${CONFIG_PATH:-config.yaml}\"\n\necho \"[3/4] Downloading Edge SDK from: ${SDK_DOWNLOAD_URL}\"\ncurl -fsSL \"${SDK_DOWNLOAD_URL}\" -o flitt-edge-sdk\nchmod +x ./flitt-edge-sdk\n\necho \"[4/4] Generating config via --gen-config...\"\nCONFIG_DIR=\"$(dirname \"${CONFIG_PATH}\")\"\nif [ \"${CONFIG_DIR}\" != \".\" ]; then\n  mkdir -p \"${CONFIG_DIR}\"\nfi\n\nif [ ! -f \"${CONFIG_PATH}\" ]; then\n  ./flitt-edge-sdk --gen-config -config \"${CONFIG_PATH}\"\nfi\n\n# Patch generated config to use env placeholders (Pterodactyl-friendly)\n# - use the allocated server port\n# - allow overriding DB path\nsed -i 's/^  port: 8080$/  port: ${SERVER_PORT}/' \"${CONFIG_PATH}\" || true\nsed -i 's#^  path: ./data/edge.db$#  path: ${EDGE_DB_PATH}#' \"${CONFIG_PATH}\" || true\n\necho \"Install complete\"\n",
            "container": "ghcr.io/parkervcp/installers:debian",
            "entrypoint": "bash"
        }
    },
    "variables": [
        {
            "name": "Registration Code",
            "description": "Your VVBS-XXXX-XXXX-XXXX registration code from the Flitt dashboard.",
            "env_variable": "REGISTRATION_CODE",
            "default_value": "",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|string|min:8",
            "field_type": "text"
        },
        {
            "name": "SDK Download URL",
            "description": "Direct URL to the Linux Edge SDK binary.",
            "env_variable": "SDK_DOWNLOAD_URL",
            "default_value": "https://api.flitt.me/sdk-binaries/flitt-edge-sdk",
            "user_viewable": false,
            "user_editable": false,
            "rules": "required|string",
            "field_type": "text"
        },
        {
            "name": "Config file path",
            "description": "Config file used by the SDK (relative to the container). Default: config.yaml",
            "env_variable": "CONFIG_PATH",
            "default_value": "config.yaml",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|string",
            "field_type": "text"
        },
        {
            "name": "Edge DB Path",
            "description": "Local database path inside the container.",
            "env_variable": "EDGE_DB_PATH",
            "default_value": "./data/edge.db",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|string",
            "field_type": "text"
        }
    ]
}