#!/usr/bin/env php
<?php

use boru\qdrant\cli\QdrantCLI;

$cd = getcwd();
if(isset($GLOBALS['_composer_bin_dir'])) {
    $rootDir = realpath($GLOBALS['_composer_bin_dir']."/../../");
} else {
    $dir = __DIR__;
    $myParent = "/vendor/boru/openai/bin";
    if(substr($dir,-strlen($myParent))==$myParent) {
        //included as a dependency
        $rootDir = realpath($dir."/../../../../");
    } else {
        //in the dhfw repository
        $rootDir = realpath($dir."/../");
    }
}
require_once $rootDir."/vendor/autoload.php";
QdrantCLI::parse();