8 large eggs, at room temperature
3 to 4 medium-size ripe tomatoes, halved through their equators
3 tablespoons ghee, butter, safflower oil or grapeseed oil
3 tablespoons virgin coconut oil
2 cups finely chopped onions
6 garlic cloves, finely grated or minced
2 tablespoons grated fresh ginger
1/2 teaspoon cumin seeds
1 (3-inch) cinnamon stick
8 cardamom pods, lightly crushed with the flat side of a knife
2 teaspoons ground coriander
1 teaspoon ground cumin
1 teaspoon ground turmeric
1/4 teaspoon red pepper flakes
1/4 teaspoon ground black pepper
2 teaspoons kosher salt
1/2 cup boiling water
1 to 2 teaspoons garam masala, to taste
3 tablespoons finely chopped cilantro
Plain yogurt, for serving (optional)
Cooked basmati rice or flatbread, for serving (optional)
Hard-boil the eggs: Bring a large pot of water to a boil, then carefully lower eggs into water. Cook for 9 to 10 minutes, then transfer with a slotted spoon to an ice bath. Let cool, then crack and peel. Reserve.
Set a box grater over a bowl. Starting with their cut sides, grate the tomatoes through the large holes so tomato pulp falls into bowl. Discard skins. Measure out 2 cups tomato purée. (Save the rest for another purpose, such as adding to a vinaigrette.)
Heat ghee (or butter or oil) and coconut oil in a large skillet over medium-high heat. Stir in onions and cook until deeply golden brown, 15 to 20 minutes, stirring constantly to encourage even browning.
Stir in garlic, ginger and cumin seeds; cook until fragrant, about 2 minutes. Stir in cinnamon and cardamom and cook another 1 minute. Stir in coriander, cumin, turmeric, red pepper flakes and black pepper, then add tomato purée. Cook, stirring frequently, until sauce is thick and fat begins to separate, about 10 minutes. Stir in salt and boiling water. Reduce heat to medium and simmer, covered, until sauce is thick and has a satin sheen, 7 to 12 minutes. Remove from heat and let sit, covered, for another 20 minutes to let flavors meld.
When ready to serve, cut eggs in half lengthwise. Bring sauce back to a simmer over low heat, stir in garam masala, and gently add eggs to sauce. Simmer just long enough to heat eggs through. Top with cilantro and serve with yogurt and rice or flatbread if desired.