What is the best way to check that the current folder is a Trellis project?

I’m looking for a way to check if a given folder contains a Trellis project, with node or php or anything

1 Like

grep -rn "trellis"
That will literally just show you any occurrences of the word “trellis” in the current folder (including files).

The most foolproof way would probably be to search for a string in the README.md assuming people don’t delete it.

Adding to that then, easy command would be grep "trellis" README.md

I was thinking of checking for a wordpress_sites value in the yaml config since I’m parsing yaml anyway

Sounds like you have a tool your building. Can’t you just check for the existence of path/to/trellis/group_vars/development/wordpress_sites.yml?