# Séance Shell: A Local Ghost That Haunts Your Terminal

> Source: <https://dev.to/0shuvo0/seance-shell-a-local-ghost-that-haunts-your-terminal-9a1>
> Published: 2026-11-01 01:45:01+00:00

*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine](https://dev.to/challenges/hacktoberfest-week4-2026-10-26)*

Séance Shell is a haunted terminal. A small ghost lives in your Bash or Zsh session, watches for the moments that matter, and murmurs a single eerie sentence about what just happened.

It reacts to two kinds of events:

`git reset --hard`, `git clean -fd`, or `rm`
`pytest`, `npm run build`, or `cargo build`
Once the command has finished, the ghost speaks:

``` bash
$ git reset --hard HEAD~1
ghost: the past has accepted your changes, and forgotten your future.
```

That's the whole product. The ghost is a companion for reflection, not an assistant for execution. It never suggests commands, never runs anything, and never offers advice.

**How I read the theme:** the prompt suggested "a haunted terminal that possesses your shell and whispers back eerie commentary." I wanted that, but with restraint. Most AI tools are loud and eager to help. A good ghost lingers at the edge of the room, says one unsettling thing, and goes quiet. Séance Shell is a ghost that knows its place.

A quiet, local-AI terminal companion that offers one short reflection after selected commands. The ghost is atmospheric, not an assistant: it gives no advice, runs no generated text, and never retries a command.

``` bash
$ git reset --hard HEAD~1
ghost: the past has accepted your changes, and forgotten your future
```

Reflections are generated independently by Ollama on your machine with `gemma3:latest`. Model output is validated before display. If the local model is unavailable, the reflection is skipped.

`seance reflect --context` request—short sanitized context. Shell hooks do not send the command text to the model.
To run it locally you need Ollama and the `gemma3:latest` model. The shell hook works without the model, so the ghost only goes silent if Ollama isn't running.

The open-source pieces are what make this work:

`gemma3:latest`)
No cloud API, no hosted inference, no account. Three design decisions shaped the build.

The shell doesn't send the raw command string to the model. It sends a structured description:

The model gets enough to set a mood but nothing it could be tricked by or leak. It is not a coding agent and can't be steered by arbitrary shell content.

The model is asked for one sentence, at most 15 words and 180 characters. If the response is malformed, multi-line, or too long, it's discarded and the ghost stays silent. The text on screen is a constrained artifact, not whatever the model felt like saying.

Séance Shell never retries commands, never executes anything, and never reinterprets what you did. It's a passive observer. That modesty is what makes it usable in a place where you're making decisions at speed.

A terminal is about as personal as software gets. It holds your file paths, repo names, half-finished experiments, and the commands you'd rather not explain. An always-on ghost watching that is only acceptable if it lives on your own machine.

Open-weight models made that possible in three ways:

A closed API could have written the sentences. It couldn't have given me a ghost that is private, offline, and mine, and that's the part that makes it feel like a haunting rather than a service.

The first time it fired, I ran `git reset --hard HEAD~1` on a throwaway branch and the ghost answered: *"the past has accepted your changes, and forgotten your future."* It was a small moment, but the one-line reminder that I had just erased something did what no warning dialog ever has. It made me pause.

**Best Use of Gemma:** Gemma 3 runs locally through Ollama as the model behind every one of the ghost's reflections.
