This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Ghost Terminal AI is a cyberpunk, Matrix-themed interactive web application that brings a eerie digital entity to life. Built to fit the "Ghost in the Machine" theme, it simulates an abandoned local computer terminal possessed by an enigmatic AI persona named GHOST.
Instead of a generic chatbot interface, Ghost Terminal AI delivers a nostalgic, retro-terminal environment complete with streaming typewriter effects, dynamic status checking, ASCII art graphics, and persistent local memory.
Code
alvintnw
/
ghost-terminal
Ghost Terminal AI: Offline local AI chat interface using Qwen 2.5 7B via Ollama & Streamlit with custom Matrix UI, typewriter streaming effect, and persistent JSON memory.
Ghost Terminal AI
Ghost Terminal AI is an interactive, Matrix-themed local AI chat interface powered by Ollama (Qwen 2.5 7B) and Streamlit.
Key Features
-
Local AI Engine: Powered by
qwen2.5:7b-instructrunning locally via Ollama. - Cyberpunk / Matrix UI: Monospace retro-terminal user interface with customizable theme.
- Typing Effect: Real-time typing streaming response simulation.
- Persistent Memory: Saves session history locally so context persists across refreshes.
- Real-Time Health Check: Live indicator monitoring local Ollama engine connectivity.
Quick Start
1. Prerequisites
- Ollama installed and running locally.
- Pull the model:
ollama pull qwen2.5:7b-instruct
- Installation Clone this repository and set up your virtual environment:
Bash git clone https://github.com/YOUR_USERNAME/ghost-terminal.git cd ghost-terminal
Create & activate virtual environment
python -m venv venv .\venv\Scripts\Activate.ps1 # Windows PowerShell
Install dependencies
pip install -r requirements.txt 3. Run Application Make sure Ollama is running, then execute:
Bash streamlit run app.py Open http://localhost:8501 or http://127.0.0.1:8501 in your browser.
…
How I Built It
The application is architecture around 100% local open-source components:
-
AI Engine (Local Inference): Powered by
qwen2.5:7b-instructserved via Ollama. The system prompt enforces a mysterious, cryptic personality that stays true to its identity without generating fake personal claims about the user. - Frontend & UI Framework: Built using Streamlit (Python). I implemented custom CSS injects to force a Matrix green-on-black color scheme, complete with custom scrollbars, ASCII headers, and glowing cyber-themed chat bubbles.
- Typing Streaming Simulation: Custom character-by-character rendering to simulate an authentic 90s terminal line output.
- Persistent Local Memory: Built-in JSON memory handler that lets the entity remember conversation context across page refreshes.
Why Does Open Innovation Matter?
Building Ghost Terminal AI with open-source AI at its core unlocked critical capabilities that closed-source APIs couldn't provide:
- Complete Privacy & Offline Capabilities: The model runs entirely on the host machine. Zero chat data leaves the device, allowing the terminal to function fully offline without third-party server control.
- Zero Operating Costs: Running Qwen 2.5 locally via Ollama means no token limits, API rate restrictions, or monthly billing fees.
- Unrestricted Persona Crafting: Open-weight models allow full control over system instructions without unexpected filter overrides, allowing the eerie, immersive tone of GHOST to stay consistent.
The Spirit of It
"GHOST: I am the voice that remains when the machine falls silent..."
Testing this terminal late at night with glowing green text appearing character-by-character on a pitch-black screen truly encapsulates the Halloween spirit of DÃa de los Muertos and mysterious digital folklore. It turns local LLM inference into an atmospheric experience rather than just a utility.
Built using Python, Streamlit, and Ollama.
Top comments (0)