Step 1
Heat oil in a frying pan over medium-high heat. Add the onions and curry leaves (if using). Sauté until the edges of the onions turn golden brown.
Step 2
Add the garlic, tomatoes, salt, cayenne, coriander, and turmeric to the pan. Continue to cook over medium heat until any liquid mostly evaporates and the spice paste gets a sheen on top.
Step 3
Use your cooking utensil to make two wells in the mixture. Crack an egg into each well. Cover the pan and cook on low for 1 to 3 minutes until the eggs are cooked as desired.
Step 4
Season with additional salt, if desired. Garnish with cilantro and green chilies. Serve hot with toast or a paratha, if desired.