Code Dungeon · The User Guide

Chapter XI

Quick start

Code Dungeon is free, under the MIT licence. It runs on your own computer, and the coders work on your own GitHub projects with your own Claude subscription.

Two short videos show it: Introduction to Code Dungeon (2 minutes 23), what it is and how the guild works, and Getting started (2 minutes 35), installing it and your first project.

What to have ready

  • A Windows 10 or 11 computer. Linux works too; macOS has not been tried yet.
  • Node.js 22 or newer, from nodejs.org.
  • git, from git-scm.com.
  • A GitHub account (github.com) and the GitHub command line, from cli.github.com. Sign it in with gh auth login. Every project in the dungeon lives on GitHub.
  • A Claude subscription, from claude.ai. The coders run Claude Code, which comes with the dungeon; you sign it in once.
  • Google Chrome, from google.com/chrome, so the testers can try your app in a real browser.
  • A Vercel account, from vercel.com, only if you want to put your apps on the internet from the dungeon (chapter VIII).

On Windows, one command installs Node.js, git, the GitHub command line and Chrome together, with winget, Windows' own installer. Run it in PowerShell or Command Prompt and accept what it asks. Leave out any you already have; for one that's there, winget offers to update it instead. Then close the window and open a new one, so it finds them:

winget install OpenJS.NodeJS.LTS Git.Git GitHub.cli Google.Chrome

Install it and start it

Open PowerShell anywhere. Command Prompt works too; on Linux, open a terminal. Run these two commands one at a time, each with its own Copy button:

1. Sign Claude in, once. A browser window asks you to allow it:

npx codedungeon@latest login

2. Start the dungeon. It opens in your browser at http://localhost:4417; press Enter the dungeon:

npx codedungeon@latest

The first time, npm asks whether it may fetch codedungeon: answer y. In the dungeon, a short setup asks your name, names your hold and your DungeonMaster, and brings in your first project. Your projects, your guild and your settings are kept in a codedungeon-home folder in your home folder.

If PowerShell says running scripts is disabled on this system, Windows is blocking npm's own PowerShell helper, which it does on a new computer. Run this once, then run the command again. It lets PowerShell run scripts you have installed yourself, and Command Prompt never needs it:

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

If something is missing, npx codedungeon@latest doctor checks Node.js, git, the GitHub command line and the Claude sign-in, and says what to fix. To walk round with pretend projects and pretend coders first, start it with npx codedungeon@latest --demo. Nothing touches GitHub and nothing uses your subscription.

Or from a copy of the code

To change Code Dungeon itself, fetch its code instead. The code on GitHub is private for now, so this works only if you have been given access to it. Open PowerShell or Command Prompt in the folder where you keep your projects and run these five commands one at a time, letting each one finish before the next:

1. Fetch Code Dungeon into a folder called codedungeon:

git clone https://github.com/brainit-consulting/codedungeon.git

2. Go into that folder:

cd codedungeon

3. Install what it needs (about a minute):

npm install

4. Sign Claude in. A browser window asks you to allow it:

npm run login

5. Start the dungeon:

npm run dev

Then open http://localhost:5417 in your browser and press Enter the dungeon. Run this way, its data lives in the codedungeon-home folder beside the codedungeon folder. npm run doctor checks what is missing, and npm run dev -- --demo starts the pretend dungeon.

Starting it again

The dungeon runs while its window is open. Another day, run npx codedungeon@latest again. From a copy of the code, run npm run dev in its folder and open http://localhost:5417. Your projects, your guild and your settings are where you left them.

Restarting it

To stop it, press Ctrl + C in its window; that stops the coders' sessions too. To start it again, run the command you started it with. When the dungeon restarts by itself, after a change to its own code, the coders keep working through it.

Updating it

Started with npx, there is nothing to do: npx codedungeon@latest fetches the newest version each time it starts. From a copy of the code, the ledger's Chambers tab shows when a newer Code Dungeon is on GitHub. Stop it with Ctrl + C, then in its folder run git pull, then npm install, then npm run dev, one at a time. Your projects, guild and settings stay as they are.