To a food processor, add the cashews, garlic, basil, nutritional yeast, lemon juice, salt, olive oil (if using) and 1/4 cup water. Process until smooth, adding more water as needed for a thinner consistency. If you are not using the oil, you will likely need an extra 1/4 cup water.
If serving with pasta, cook according to package instructions, then toss with the pesto, adding more water or olive oil as needed until it coats the pasta well.
Store in the refrigerator for up to 1 week. Pesto also freezes well for up to 6 months. We like to freeze it in an ice cube tray, then pop the cubes out and stick them in a ziplock freezer bag or container.