I use Windows 10 local php 7.1 and execute the command in my Users Documents directory. cmd.php creates other files and directories with success. I would create a directory I just need to know where it should be.
php cmd.php xf-dev:generate-phpstorm-meta Addon Writing Addon... File could not be written to. Check directories exist and permissions.
php cmd.php xf-dev:generate-phpstorm-meta said:Generates a .phpstorm.meta.php file for dynamic return type hinting