Composer scriptlerini kullanabilirsiniz.

https://getcomposer.org/doc/articles/scripts.md