Preheat your oven to 350°F (175°C). Grease a 9x13 inch baking dish with butter or olive oil.
Blanch the green beans: Bring a large pot of salted water to a boil. Add the green beans and cook for 3 minutes until bright green and slightly tender. Immediately plunge them into an ice bath to stop the cooking process. Drain well.
In a large skillet over medium heat, melt the butter. Add the diced onion and minced garlic, and sauté until translucent and fragrant. It's tempting to rush, but slow-cooking the onions until they're caramelized unlocks a depth of flavor that's truly worth the wait.
Stir in the almond flour and cook for about 2 minutes to form a roux. This will thicken our sauce without the need for traditional flour, keeping it keto-friendly.
Gradually whisk in the chicken broth and heavy cream. Bring the mixture to a simmer and let it thicken for about 5 minutes. Remember, patience is key here; a common mistake is not simmering it long enough.
Add the shredded cheddar cheese to the skillet and stir until melted and smooth. Season with salt, pepper, and fresh thyme. The first time I made this, I used dried thyme, but the fresh herbs make all the difference.
Add the drained green beans to the skillet and toss to coat evenly with the sauce. Transfer the green bean mixture to the prepared baking dish.
In a small bowl, mix together the toasted almond slices, grated Parmesan cheese, garlic powder, and paprika. Sprinkle this topping over the green bean mixture in the baking dish.
Bake in the preheated oven for 20-25 minutes, or until the topping is golden brown and the sauce is bubbly. Watch it closely—I've learned that the difference between perfectly toasted and burnt can be a matter of minutes.
Let the keto green bean casserole rest for 5 minutes before serving. This allows the flavors to meld together and the sauce to set slightly.