This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
👻 Arquivo Fantasma (Ghost Archive): Giving Forgotten Digital Fragments a Voice
What if an abandoned file could tell you a story? What if a mysterious commit, an old note, or a forgotten line of text was the beginning of something that should never have been remembered?
Arquivo Fantasma is a local-first, command-line micro-horror generator inspired by the idea of a ghost haunting a machine. It transforms user-provided text fragments into eerie short stories, exploring the thin line between digital memory, forgotten history, and the supernatural.
I interpreted Ghost in the Machine literally: the ghost doesn't haunt a house — it haunts the archive.
The project supports three narrative styles:
- 🕯️ Horror: psychological tension and unsettling endings.
- 🌼 Folklore: ancestral memories, legends, and the atmosphere of remembrance.
- 🌐 Cyberpunk: haunted repositories, abandoned systems, and digital ghosts.
The goal is to keep the project lightweight, transparent, and easy to run, while making local AI inference an optional part of the experience.
Code
🔗 GitHub repository: kalebers/Ghost-Archive
The project is built in Python and includes a command-line interface, sample text fragments, automated tests, documentation, and an MIT license.
Example:
python3 ghost.py \ --file samples/fragmento.txt \ --style cyberpunk When an approved local model is available, the application can also use Ollama for inference:
python3 ghost.py \ --model <YOUR_LOCAL_MODEL> \ --text "A commit appeared ten years after its author disappeared." The model must already be installed and available locally. No hosted AI fallback is used.
How I Built It
I built Arquivo Fantasma around a simple principle: the story should belong to the person who provides the fragment, not to a remote service.
The core is Python, with no mandatory third-party Python dependencies. For AI-powered generation, the project integrates with the local Ollama API, allowing a compatible open-weight model to generate stories on the user's own machine.
The architecture separates the narrative prompt, the local inference interface, and a deterministic offline fallback. This keeps the application usable in restricted environments while making the AI integration explicit and replaceable.
Privacy and simplicity were design priorities:
- No hosted LLM API or API key is required.
- The application does not scan directories or execute commands from supplied text.
- Only explicitly selected text or files are processed.
- The AI integration targets localhost rather than sending prompts to an external inference endpoint.
- The fallback works without a model, network connection, or additional Python packages.
I also included automated tests for prompt construction, offline generation, CLI behavior, and rejection of remote inference endpoints.
Why Does Open Innovation Matter?
A closed AI API would have made the first prototype easy, but it would also have introduced a dependency on an external provider, network access, service availability, and potentially additional costs.
Open innovation makes a different approach possible.
Privacy: A local inference workflow can keep personal stories, private notes, and other sensitive fragments on the user's own machine instead of sending them to a third-party AI service.
Freedom to experiment: A compatible local model can be replaced with another model, allowing developers to compare writing styles, performance, resource requirements, and model behavior.
Offline resilience: Once the runtime and model are installed, the AI-powered experience can operate without an internet connection, subject to the local environment's configuration.
Transparency and ownership: The code can be inspected, modified, tested, and extended by anyone. The project does not depend on a proprietary hosted inference endpoint to define its architecture.
For me, the most interesting part is that open AI can turn a playful Halloween experiment into something more meaningful: a private, customizable way to give forgotten digital fragments a new life.
The offline fallback is also intentional. The application remains usable when local AI is unavailable, without pretending that deterministic text generation is the same as running an LLM.
The machine may be silent, the network may be gone, and the original author may have disappeared. But the archive can still tell a story.
The ghost is local. The data stays yours. 👻
