Preheat the oven to 400 degrees F.
Line a baking sheet with parchment paper or a reusable silicone baking mat.
In a large bowl or standing mixer, cream together the butter and sugar. Add the egg and vanilla and mix until well blended.
In a separate bowl, whisk together the flour, cocoa, and baking powder. Add to the wet ingredients and work together until a smooth dough is formed.
Transfer the dough to a clean counter. Divide the dough into four equal pieces. Form each into a long log, the length of the baking sheet, and then transfer to the lined baking sheet.
Use your hands/fingers to flatten the logs and then brush with the beaten egg. Sprinkle with pearl sugar (or almonds).
Bake for 10-12 minutes, until just cooked through. (Edges will harden a little but the middle will be soft). Slice while still hot on the diagonal into 3/4-inch wide pieces. Let cool on the baking sheets. Enjoy!