Peel and cut in half the onions. Finely slice the onions.
Wash and drain the chicken livers.
Prepare the livers by trimming and discarding any visible trace of fat, any green bits or membrane (I discarded about 80 g from the chicken livers in this process).
Add a large pan to medium heat, then add the onions, a bit of salt and 1/2 cups of warm water. Leave to simmer with the lid on until the onions are tender (stir from time to time) ~10 minutes.
Add livers and the butter. Season with salt and pepper to taste, then leave to simmer together for 5 minutes, while stirring from time to time so that the livers are cooked on all sides. If the liver chunks are large, you can break them with a spoon so that they are cooked too.
Add the ground thyme and the cognac, simmer for 3-4 minutes, then remove from the heat. The livers should be cooked, but the insides should still be juicy and not dry. Leave to cool down for 2-3 minutes.
In a food processor/ vertical blender bowl, add the content of the pan (juices included) and process until a smooth composition is obtained.
Melt the butter that will be used for topping the containers, then leave to cool for 2 minutes before using.
Add the obtained pâté into small containers and be careful to remove any trapped bubble of air inside the jars, otherwise it will oxidize the composition and become bitter when serving.
Top every container with a few rosemary leaves and the melted butter. If you choose to eat the butter, it will be nicely aromatized and ready for spreading on top of toast, if you choose to discard the butter, then the rosemary is optional.
Leave to cool down at room temperature, then add the lids on each container (if you have them) or use cling foil to tightly wrap them.
Store in the fridge before serving.