cli
cli copied to clipboard
Add a `path` option pointing to the Kirby installation
Using kirby-cli during deployments it’s sometimes necessary to run kirby-cli commands for different websites on the same host that live in different folders. Currently kirby-cli expects the kirby installation in the current working directory.
This is why running kirby-cli commands for multiple installations involves a sequence of cd {{kirby_site_root}} && php kirby … commands.
While changing directories before each command does work, having a dedicated path options feels a lot cleaner to me. Not knowing how difficult this is to implement it’s a common parameter in php tools like composer (--working-dir) or the Wordpress Cli (--path).