Once enabled, you will unlock all recipes and be able to craft anything, regardless of if you have sufficient recources. Note that if you have recources, they will be consumed. This effect will wear off once you reload the world.
To enable console commands, go to:
for Windows, Mac: Documents\Klei\DoNotStarve\settings.ini
for Linux: ~/.klei/DoNotStarve/settings.ini
Change the following:
ENABLECONSOLE = true
Players can open a console menu by pressing ~