public function interactive()
    {
        echo "welcome! please input command('quit' or 'exit' to Quit).\n ";

        while (true) {
            echo '> ';
            if ($cmd = trim(fgets(\STDIN))) {
                // echo "input command: $cmd\n";
                if ($cmd === 'quit' || $cmd === 'exit') {
                    echo "Quit. Bye\n";
                    break;
                }

                echo $this->command($cmd) . PHP_EOL;
            }

            usleep(50000);
        }

        $this->close();
    }