Getting started
20th Jun 2026
This guide is meant to be run with a coding agent. Open the repo in Claude Code (or any agent) and say “how do I get started” — it will walk you through these steps interactively, running the commands with you and checking each one works. You can also just follow them by hand.
By the end you’ll have the demo site running locally, understand the core loop, and have published your own first notebook.
Agent: drive this as an interactive session. Run each step’s commands yourself, show the user the result, and confirm before moving on. Don’t dump the whole guide at them — take it one step at a time.
0. Prerequisites
- A fork of this repo, cloned locally (see the README for the fork link).
uvfor Python andbunfor the site. The toolchain rule: never callpython/pip/npmdirectly — alwaysuvandbun(seeCLAUDE.md).
Agent: check
uv --versionandbun --versionfirst. If either is missing, stop and give the user the one-line install command for their platform before continuing.
1. Orient
This repo is a lab notebook system with one opinionated loop:
a CLI runs an experiment and drops a directory of artifacts → a notebook runner bundles those artifacts → an Astro site publishes a post for each notebook.
You operate it together with your agent. The full contract is in CONTRIBUTORS.md; you don’t need it yet.
2. Install and verify
uv sync
cd src/docs && bun install && cd ../..
Agent: run both, confirm they succeed.
3. See the loop work
Run an existing notebook end to end, then start the site and look at the result:
uv run python src/notebooks/nb000.py
cd src/docs && bun run dev
Open http://localhost:4321 and click into nb000. You’re looking at a post generated from the CLI run you just executed — the figure and the numbers in the prose came straight out of src/artifacts/neuron_cli/ via src/docs/public/notebooks/nb000/.
Agent: start the dev server in the background so the session can continue. Point the user at the nb000 post and explain, in one or two sentences, how the artifact they just generated became that page.
4. Make it yours — name the site
Make the site the user’s before filling it with their own work.
Agent — rename the site:
- Brand + github link: set
PUBLIC_SITE_NAME(the header wordmark, defaults toDEMOLAB) andPUBLIC_SITE_REPO_URL(the header “github” link). Either commit asrc/docs/.envwith these, or change their defaults insrc/docs/src/layouts/Base.astro.- Page titles still read “demolab” in a few
src/docs/src/pages/*.astrofiles (the browser-tab<title>s) — update them if that matters.- The site URL and base path are set when you publish (step 7).
5. Scaffold your first notebook
This is the point of the workflow: go from an idea to a published result in one session.
Agent: ask the user what they’d like to compute or simulate — keep it small (a function to plot, a tiny simulation, a parameter sweep). Then:
- Add a CLI command for it. Either add a subcommand to an existing CLI under
src/clis/<tool>_cli/cli.py, or create a new tool directory. Follow “Adding a new notebook” / “Adding a new CLI tool” inCONTRIBUTORS.mdexactly — writeconfig.json,output.json, a figure, and pass amanifesttowrite_outputdeclaring the headline figure and metrics. Model it onsrc/clis/neuron_cli/cli.py.- Create the notebook runner
src/notebooks/nbNNN.py(next free number), modeled onnb000.py(single tool) ornb002.py(mix of tools). Declare itsCOMMANDS.- Create the post
src/docs/content/notebooks/nbNNN.mdx— frontmattertitle+date(and optionaldescription,collection,status). Inline values from the generatednumbers.jsoninto a short prose explanation + a parameter table.- Run it:
uv run python src/notebooks/nbNNN.py, then refresh the site and open the new post with the user.Keep the first one minimal — the goal is for the user to watch their own idea become a published page, not to build something elaborate.
6. Clear the demo content
With your own notebook working, delete the shipped demo — the three Example: collections — so the site is yours, not a copy of demolab.
Agent: remove the example content (do this after the user’s first notebook works, so it’s there as a template while scaffolding):
- Example CLIs:
src/clis/neuron_cli,src/clis/mujoco_cli,src/clis/streamlit_cli- Demo notebooks:
src/notebooks/nb000.py–nb003.py, their postssrc/docs/content/notebooks/nb00*.mdx, the copied assets insrc/docs/public/notebooks/, and the runs undersrc/artifacts/- Example articles:
src/docs/content/articles/ar000.mdx(neuron) andar003.mdx(streamlit)Keep the Documentation articles if you want them as your site’s own docs —
ar001(intro, worth rewriting for your project),ar002(the SVG how-to), and the guidesar004–ar007. Note:ar004–ar007are wired to the triggers inCLAUDE.md, so if you delete a guide, drop its matching trigger too.
7. Publish it
The site deploys to GitHub Pages automatically on every push to main (.github/workflows/deploy.yml). Two one-time steps for your fork:
- Point the site at your fork. In
src/docs/astro.config.mjs, setsitetohttps://<your-username>.github.ioandbaseto/<your-repo-name>. - Enable Pages. On GitHub: Settings → Pages → Build and deployment → Source: GitHub Actions.
Then commit and push to main. Your notebook goes live at https://<your-username>.github.io/<your-repo-name>/.
Agent: make the
astro.config.mjsedit for the user (ask for their username/repo), then walk them through enabling Pages and pushing. Confirm the Actions run succeeds.
8. Where to go next
CONTRIBUTORS.md— the CLI ↔ notebook contract and the procedures for adding notebooks and tools.- The Migrating an existing repo doc (
ar005.md) — bring an existing script or simulation into this structure. - The Adopting features from upstream doc (
ar007.md) — pull new feature ideas from upstream demolab and have your agent reimplement the ones you want, your way.