Saute onions until translucent, approximately 3-5 minutes.
Add green chiles, garlic, cumin, and salt. Stir to combine and cook until fragrant, approximately 1 minute.
Stir in rice and let cook for 2-3 minutes, stirring occasionally.
Add chicken or vegetable stock. Raise heat to high and bring to a boil. Once boiling, reduce heat to low and cover. Let the rice cook until all liquid is absorbed and rice is done, approximately 20 minutes.
When rice is ready, fluff with a fork. Add the fresh cilantro (if using0 and juice from 1/2 lime. Stir to combine. Season with salt.
Notes
Use any heat of diced green chiles that you prefer.Canned, fresh, or frozen chiles will work well.