Crack your eggs into a small bowl. Add ½ teaspoon each of salt and pepper, and use a fork to lightly whisk the eggs. Set aside
Fill a medium saucepan with water and bring it to the boil over a high heat. Add the spinach and cook for 3 minutes, then drain in a fine mesh sieve
With the back of a wooden spoon, press down on the drained spinach (still in the sieve) to get as much moisture out as possible. Set aside
Melt the ghee or butter in a medium non-stick sauté pan (or a well-seasoned cast-iron pan) for which you have a lid over a medium heat
Add the onion, along with ¼ teaspoon each of the salt and black pepper
Cook, stirring occasionally, for 5–7 minutes, or just long enough for the onion to turn golden brown
Meanwhile, see if you can press down some further on the spinach to get some more liquid out; if it’s cool enough, you can try and squeeze with your (clean) hands. If you can’t get any more liquid out, that’s OK too
Reduce the heat to low, and add the spinach to the browning onions, along with the final ¼ teaspoon of salt. Mix the spinach and onions together well, and cook them for a further 2 minutes, stirring frequently, before flattening out the mixture across the centre of the pan
Add the eggs to the pan, spreading them out evenly across and through the spinach in the centre. Cover the pan and cook until the eggs are set, 6–7 minutes
Transfer to a serving plate and top with flaky sea salt and chilli flakes to taste