If toasting the coconut in an oven: preheat the oven to 325 °F (165 °C). Line a sheet pan with parchment paper. Place the shredded coconut evenly on the pan and pop it in the oven for 3 minutes. Then, gently stir with a spatula so that it gets evenly toasted, and bake until it is golden brown (up to 3 or 4 minutes more). It will toast more around the edges, so be sure to stir it well and keep an eye on it because there is a very fine line between toasted coconut and burnt coconut.
If toasting the coconut on the stove: use a clean, dry skillet. No oil or butter is needed. Place it over medium-low heat. Add the shredded coconut and spread it out in an even layer. Cook, stirring or shaking the pan often, until the coconut is golden brown and smells nutty, about 3–5 minutes. Immediately transfer to a plate or parchment paper to stop the cooking.
Once it’s perfectly golden, let it cool completely. If you don’t, it’ll cause the oil in the peanut butter to separate in the cookies.
Prepare a cookie sheet with a piece of parchment paper.
In a 1-quart saucepan (or something similar) over medium heat, stir together the maple syrup, sugar, milk, cocoa powder, vanilla and salt.
Stir almost continuously until you see bubbles forming on the bottom of the pan. Remove from the heat and stir in the peanut butter. If it’s thick and firm, add up to another 2 tbsp milk. It needs to be thin enough that you can add the coconut and nuts without an arm workout.
Stir in the coconut and chopped peanuts.
Use a 1 1/2 tbsp cookie scoop to scoop out the cookies onto the parchment paper. Work quickly, as rewarming the mixture to ease scooping can cause the nut butter's oil to separate, making the cookies greasy.
Chill them for about 1 1/2 hours so they firm up. Refrigerate in an airtight container for up to 2 weeks or freeze for up to 3.