This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
I built Ghost in the Terminal, a spooky AI storyteller that lives in the command line.
Ask it a question, and it responds like a mysterious ghost hiding inside your computer. It can tell eerie stories about abandoned servers, forgotten programmers, and machines that seem to remember things they shouldn't.
The project combines the Halloween atmosphere with a practical experiment in running AI locally.
Demo
The demo runs directly in the terminal on my computer.
To try it:
- Install Ollama.
- Download the model with
ollama run gemma3:1b. - Clone or download the repository and run
python ghost.py.
Example prompt: "What did this computer dream about last night?"
Code
GitHub repository: https://github.com/chandanpreetk853/ghost.py.git
The project uses Python's built-in libraries to communicate with Ollama's local API.
How I Built It
The project uses:
- Python for the interactive terminal application.
- Ollama to run the model locally.
- Gemma 3 1B as the open-weight language model.
- Ollama's local HTTP API to generate the ghost's responses.
The application sends prompts to the model running on the same computer. A system prompt gives the model its spooky personality and keeps its responses concise.
No separate cloud AI API key is required.
Why Does Open Innovation Matter?
For a small project like this, local AI makes experimentation accessible.
After downloading the model, the storyteller can run without an internet connection, provided Ollama and the model are available locally. Prompts can stay on the user's machine rather than being sent to a third-party AI service.
Using an open-weight model also gives developers more control over how they build their applications. They can experiment with different models, change the system prompt, and extend the program without depending on a proprietary hosted inference API.
This project is a small example of an important idea: AI experiments do not always need to start with an expensive cloud service.
The Spirit of It
A terminal is usually a place where we give machines instructions. I wanted to turn that relationship around and imagine what would happen if the machine had a story of its own.
The result is a tiny digital ghost: no supernatural powers, just a locally running model, a few lines of Python, and a little Halloween imagination.
Prize Categories
Open-source AI / open-weight models.
Top comments (0)