DEV Community

Muhammad Khizar
Muhammad Khizar

Posted on

Seance: a terminal that channels dead programming languages

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

Seance: a terminal that channels dead programming languages

What I Built

Seance is an offline seance terminal. You pick a spirit, COBOL, FORTRAN, Pascal, BASIC, Lisp, or Ada, and ask it questions. A local open-weight model answers in that language's voice, with period flavour where it comes naturally. There is also an ofrenda mode: name a retired technology and the model composes a short remembrance for it.

The theme is "Ghost in the Machine": build something spooky, or something that honours the past in the spirit of Dia de los Muertos, with open-source AI at its core. Seance does both at once. The seance is the spooky part, and the ofrenda is the honouring part, for the languages and machines that built modern computing and were then retired. Everything runs on your own machine: no API key, no account, no cloud, no network after the one-time model download.

Demo

Live transcript viewer: https://seance-terminal.netlify.app/

The viewer is a static page. It honestly does not run the model in your browser. It shows the faithful transcript of a real local run, and it explains how to run the project yourself. Here is what the demo run produced, verbatim, from COBOL:

"Batch jobs, oh, those were a joy! Processing large volumes of data, transforming it into reports, was a satisfying endeavor. I miss the clarity of a well-formed record, the predictable flow of a batch job."

And the ofrenda for the floppy disk ended:

"Farewell, dear floppy disk. You were a wonderful thing."

To hear a spirit yourself, locally:

npm install
npm run seance   # interactive spirit picker
npm run demo     # fixed demo, writes out/transcript.md
Enter fullscreen mode Exit fullscreen mode

First run downloads the model once (Gemma 3 1B, quantised q4, about 840 MB) into ./.cache. After that it works offline. Needs Node.js 22 or newer.

Code

Repo: https://github.com/khizzcr7/seance

The project is small on purpose, 10 source and content files plus the lockfile, so it can be read end to end:

  • src/spirits.js - the six spirit personas
  • src/model.js - local model loading and generation
  • src/cli.js - the interactive terminal (npm run seance)
  • src/demo.js - the fixed demo (npm run demo)
  • viewer/index.html - the static transcript viewer
  • out/transcript.md - the real demo transcript

How I Built It

The stack is Node.js plus Transformers.js (@huggingface/transformers), running the model through ONNX Runtime on CPU. The model is Gemma 3 1B instruction-tuned, onnx-community/gemma-3-1b-it-ONNX, open weights under the Gemma licence, loaded at dtype q4 so it runs on an ordinary laptop CPU.

Each spirit is a short system prompt: era, voice, and quirks, written by hand, not generated. The model does the speaking. Generation is greedy decoding (do_sample: false) with a 220 token cap, which keeps answers short and reproducible.

One genuine snag, fixed in the open: the default ONNX Runtime version bundled with Transformers.js 3.8.1 (1.21.0) refused to load the Gemma q4 model, failing on the GatherBlockQuantized operator. Pinning onnxruntime-node to 1.30.0 in package.json (the same override that worked for a previous local project) fixed the load, and the demo then ran end to end in 90 seconds. The demo transcript is kept verbatim, including the model's odd turns of phrase, because a cleaned-up transcript would not be an honest demo.

What was verified locally: npm install succeeds, npm run demo produces a real transcript with real Gemma output, the viewer renders that transcript, and the interactive picker starts and lists all six spirits. What was not verified: running the model in a browser, which is why the viewer makes no such claim.

Why Does Open Innovation Matter?

Open weights are the whole reason this project exists. A spooky little terminal that channels COBOL would be a toy API demo if it needed a cloud key, and it would die the day the key or the endpoint went away. Because Gemma's weights are open and the ONNX export runs locally, the project is self-contained: anyone can clone it, run it offline, change a spirit's voice, and keep it working forever, with no account and no bill. Open innovation turns a one-week challenge entry into something that still runs in ten years, on hardware nobody has to ask permission to use. That permanence matters most for a project about remembering dead technology: the languages it honours were themselves built in the open, shared, and kept alive by people, not by vendors.

The Spirit of It

The spirit of it is remembrance, not mockery. COBOL is not a joke here, it is a language still running payrolls and banks, spoken of fondly by the machine that imitates it. The ofrenda mode is the heart of the piece: technology deserves a farewell, not just a changelog entry. The floppy disk carried family photos and school projects, and a short generated eulogy is a small, sincere way to say so. Hacktoberfest is about contributing to open source, and the most open-source thing of all might be keeping the past runnable: the old languages, the old formats, and the people who learned on them, still present, still answerable, as long as someone keeps the terminal lit.

Prize Categories

Claimed categories:

  • Overall: the entry is a complete, working, new project built during this challenge window, with a real local model at its core and a published demo.
  • Best Use of Gemma ($200 featured): the entry runs Gemma 3 1B (onnx-community/gemma-3-1b-it-ONNX, dtype q4) locally for every answer in the demo, verified by a real run on 27 Oct 2026 that produced the transcript in out/transcript.md.

No other partner category is claimed. The project deliberately uses no partner service, no account, no API key, and no special hardware, so no other partner category is genuinely earned, and none is claimed on the strength of a logo or a name-drop. If a category requires a partner integration the project does not have, it is left out rather than stretched.

Top comments (0)