Thinly slice the onions from root to stem.
In a heavy-bottomed pot, melt the ghee over medium-low heat and add the onions with sea salt.
Cook the onions slowly for 25-30 minutes, stirring occasionally, until they are deep golden brown and caramelized.
Add the minced garlic and fresh thyme, sautéing for 1 minute until fragrant.
Stir in the balsamic vinegar to deglaze the pot, scraping up any browned bits from the bottom.
Pour in the beef bone broth and add the shredded lean beef, then bring to a gentle simmer for 10 minutes.
Season with black pepper and adjust salt if needed.
While the soup simmers, lightly toast the sourdough slice.
Ladle the soup into an oven-safe crock, place the toast on top, and cover with the shredded Gruyère cheese.
Place under a broiler for 2-3 minutes until the cheese is melted, bubbling, and slightly browned.