DEV Community

Vishal Desai
Vishal Desai

Posted on Edited on

Wisp: A Terminal Ghost That Never Runs Your Commands

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

What I Built

Wisp is a tiny haunted-terminal companion. Give it command text and, optionally, an exit code; a local open-weight model responds with one spooky-but-friendly line.

I took the challenge's haunted-terminal idea and made the ghost deliberately harmless: Wisp never executes the command, watches the shell, reads shell history, or installs hooks. It only reacts to the text I explicitly pass in. That makes it a little less like possession and a little more like a ghostly rubber duck.

Demo

Wisp is a CLI, so there is no hosted web demo. Here are two real runs:

$ node dist/src/cli.js "git status"
The files whisper of changes you've forgotten...

$ node dist/src/cli.js --exit-code 1 "npm test"
The shadows whisper of unfinished cycles...
Enter fullscreen mode Exit fullscreen mode

Code

Wisp on GitHub

How I Built It

Wisp is written in TypeScript for Node.js 22 or newer. It has no runtime npm dependencies. It sends the supplied text and optional exit code to Ollama's local /api/generate endpoint and asks Gemma 3 4B to answer in character. The model response is constrained to a short, single line; the CLI also handles missing models, invalid responses, and server timeouts.

The tests use Node's built-in test runner and a mocked HTTP response, so they don't need a running model. GitHub Actions builds and tests the project across Node 22, 24, and 26.

Why Does Open Innovation Matter?

With the default Ollama URL, inference happens on my machine. After the one-time model download, Wisp can generate its replies without sending command text to a hosted model API or needing an API key. I can also switch the model instead of being locked to one provider.

That local boundary depends on the configuration: if I point OLLAMA_URL at a remote server, the command text goes there instead. And the model's line is creative output, not a report of what the command actually did; Wisp never sees the command's output.

Prize Categories

  • Best Use of Gemma: Wisp uses Gemma 3 4B locally through Ollama.

The Spirit of It

A failed test usually gives you a stack trace. Wisp gives you a tiny ghost story instead. Under the spooky voice, it is still just a local model responding to text I chose to share with it.

Top comments (0)