Add the red onions, olive oil and spices to the pan and cook slowly for about 10 minutes until the onion has softened and the spices are aromatic. Add the peppers if using and garlic cloves and toss in the spiced oil. After another few minutes tip both tins of cherry tomatoes into the pan, add the vinegar and maple syrup and bring to a simmer.
Simmer gently for 15 minutes. Taste and add more harissa or chilli if needed and remove the garlic cloves. Make a small dent in the sauce and break the eggs into them. Season each egg generously with salt and black pepper. Turn the heat right down as low as possible on your smallest burner and cover the pan tightly. Continue to cook for 7 to 10 minutes until eggs are just set. Sprinkle generously with parsley and coriander and serve with bread or pittas.