Preheat oven to 375°F (190°C). Line a baking sheet with parchment paper or lightly grease a loaf pan and set aside.
Heat butter in a large skillet over medium high heat.
Add onions, sprinkle with salt, and cook slowly, stirring often and adding beef broth to deglaze the pan every 5 minutes. Cook for 15-20 minutes or until deep golden brown. Reserve about ½ cup for topping and let the rest cool for the meat mixture.
In a large mixing bowl, whisk together eggs, mushrooms, Dijon, tamari, fish sauce if using, garlic powder, smoked paprika and salt.
Add ground beef, all but 1/2 cup caramelized onions, and Gruyère cheese. Mix gently with your hands until combined. Shape the mixture into the prepared loaf pan. Bake uncovered for 40 minutes or until meatloaf reaches 160°F (71°C) internally.
Remove meatloaf from oven and allow to rest. Meanwhile make the french onion sauce by placing the broth, cheese, cream cheese and butter into a saucepot and heat over medium high heat. Once the cheese is melted, use a stick blender to puree until smooth.
Pour the sauce over the top of the meatloaf, then top with reserved caramelized onion. Garnish with fresh thyme or parsley.
Store extras in an airtight container in the fridge for up to 6 days. Can be frozen for up to a month.