Heat the butter in a large casserole over a medium heat and add the onions. Season with sea salt and cook gently, stirring frequently until they are a rich dark brown colour- this can take up to 30 minutes so have patience.
Stir in the flour and thyme until the flour is evenly combined. Season with sea salt and ground black pepper.
Pour over the stock and cover.
Cook gently for about 30 minutes. Stir through the brandy and check the seasoning.
Meanwhile, lightly toast the bread under a medium grill, remove and rub all over with the garlic clove.
Ladle the soup into oven proof bowls set on a heavy baking sheet, place a slice of bread in each one and place a mound of grated cheese in the centre of each one.
Notes
A true French classic that is wonderfully satisfying to make at home.