Melt the butter in a large stainless steel saucepan, cast iron skillet or pot over medium-high heat.
4 Tbsp. unsalted butter
Add 1-2 large handfuls of the onions at a time. Stir for a few minutes, and then add more onions in, a few handfuls at a time, until they are all added. Season with a small pinch of salt.
4 yellow onions, sliced 1/8th inch thick
Stir until the onions have softened, about 5 minutes. Then turn the heat down to medium-low and cook until the onions are sweet and have a deep golden brown color. This will take about 45 minutes to an hour. Stir the onions every 3 minutes or so to prevent them from sticking or burning. Add a splash of white wine as needed to deglaze the pan if brown residue on the bottom of the pan begins to form, and continue to deglaze as necessary.
1/2 cup dry white wine
Meanwhile, cook the pasta al dente according to package directions. Reserve 2 cups of the pasta water. Drain and set aside.
16 oz. cavatappi pasta
Once the onions are browned and sweet, add the garlic, thyme, salt and chili flakes. Stir to combine.
4 cloves garlic, minced, 1 Tbsp. fresh thyme, chopped, 1/2 tsp. salt, 1/4 tsp. chili flakes
Add the flour and stir to coat the onions. Then add in the beef broth. Simmer for 2-3 minutes.
2 Tbsp. flour, 1 cup beef broth
Add the cooked pasta to the onions, with 1/2 cup of the reserved pasta water. Stir to combine.
2 cups reserved pasta water
Add the cream cheese with another 1/2 cup of pasta water and stir until the cheese has melted and coated the pasta.
8 oz. cream cheese, softened
Taste and adjust seasonings as desired and add more pasta water to create a creamier sauce. Serve with cheese and parsley on top and enjoy.
1/3 cup Gruyere or Parmesan cheese, shredded, parsley for garnish