Finely chop the onion, smash and peel the garlic cloves, and grate the ginger on a microplane. Measure the mustard powder, cinnamon, black pepper, and cayenne into a small bowl, keeping the whole cloves separate.
Pour the apple cider vinegar, water, and soy sauce into a 2-quart saucepan. Add the molasses, tamarind paste, brown sugar, and anchovy paste, then whisk for about 30 seconds until fully dissolved.
Stir in the chopped onion, smashed garlic, and grated ginger. Add the mustard powder, cinnamon, black pepper, and cayenne, then drop in the whole cloves and stir once to distribute.
Bring the mixture to a boil over medium-high heat, about 3 minutes, then reduce to low so the surface barely bubbles. Simmer uncovered for 12 minutes, stirring every few minutes and skimming any foam.
Set a fine-mesh strainer over a heatproof measuring cup and pour the hot sauce through it, pressing the solids with the back of a spoon to extract the liquid. Discard the solids and whole cloves.
Place a funnel in a clean glass bottle and pour in the strained sauce. Leave the lid off until the steam stops, then seal tightly, label with the date, and refrigerate.