How can I unlock the factory dungeons on cookie clicker?

The dungeon feature is still in alpha, but can't be accessed on the live version of the game as of now. You have to use this special beta version of Cookie Clicker to access them: http://orteil.dashnet.org/cookieclicker/betadungeons/ Once there, you can use that command to unlock them.