craftcms / nitro

Speedy local dev environment for @craftcms.
https://getnitro.sh
MIT License
178 stars 24 forks source link

[FR] Add "nitro php" as command #276

Closed naboo closed 3 years ago

naboo commented 3 years ago

Description

It would be nice to be able to run the php command through the nitro command as you would with "nitro craft".

Why?

As an example. I had this Craft site with a Laravel independent "module". In Laravel you have this "artisan" CLI as you do with Yii/Crafts "craft" CLI. I had to locally install PHP in my distro to run it. It would be nice to have this native inside Nitro from the start - since the php library is there existing.

jasonmccallister commented 3 years ago

Thank you for the suggestion, I think this makes a lot of sense to add. You can still run the artistan command by adding another step:

  1. nitro ssh
  2. php artisan

Ideally this would work exactly the same as the craft and queue commands by being "site aware" and defaulting to a help style output (e.g. nitro php would run php -v).

We will take a look at setting this up and testing locally!