Chat with ELIZA, Joseph Weizenbaum's 1966 "therapist" chatbot, recreated in the browser with a retro typewriter interface.
Live: https://eliza.pknspace.com
- The original ELIZA (DOCTOR script), via Norbert Landsteiner's faithful
elizabotport. - Extra keywords and synonyms for more natural modern conversation.
- Replies type out letter by letter, like a 1960s terminal.
- Saying goodbye ends the session, and a new one can be started.
React 19 · TypeScript · Vite · Tailwind CSS v4 · shadcn/ui · Framer Motion · elizabot · Vitest. No backend.
Requires Node 22.18+ (.nvmrc pins 22).
npm install
npm run dev| Command | What it does |
|---|---|
npm run dev |
Dev server at http://localhost:5173 |
npm run build |
Typecheck and production build into dist/ |
npm run typecheck |
TypeScript check (tsc -b) |
npm run preview |
Serve the built dist/ locally |
npm run lint |
ESLint |
npm test |
Unit tests (Vitest): deterministic replies, extra keywords, goodbye |
npm run check |
Typecheck, lint and tests |
npm run deploy |
Checks, builds and uploads to the VPS |
npm run deploy:dry |
Same, but only previews the upload |
The site is static: npm run build writes dist/, which is synced to a VPS where
Caddy serves it directly (no restart needed).
- One-time setup: copy
.env.exampleto.env.prod.local(git-ignored) and fill inDEPLOY_HOST,DEPLOY_PORTandDEPLOY_DIR. You also need SSH key access to the server. - Deploy:
npm run deploy:dry # preview what would change npm run deploy # checks, build, upload
src/eliza/eliza.tswrapselizabotwithout changing its engine. Before the first bot is created it merges the extra keywords and synonyms fromextraKeywords.tsinto elizabot's data, because elizabot parses that data only once.- ELIZA matches keywords in what you type, picks a decomposition rule, and reassembles your own words into a reply ("I feel sad" → "Do you often feel sad?").
eliza.test.tsruns the bot in non-random mode so replies are deterministic.- UI. shadcn/ui components live in
src/components/ui/(vendored, added withnpx shadcn add, not linted). The theme tokens insrc/index.cssmake them green-on-black with an amber input, like a terminal.