THE LAST PROCESS: What If Your Terminal Wasn't Just Running Codeโ€ฆ But Watching You?-Title A developer built THE LAST PROCESS, a native terminal psychological horror game in Python using rich and prompt_toolkit that connects to local open-weight models via Ollama (gemma:2b, llama3.2, mistral) to drive an AI character called Entity 0. The game engine, not the model, controls events, clues and three endings, with a deterministic dialogue fallback when Ollama is absent, and it persists memory across sessions while keeping the environment virtual so it never touches personal files or runs shell commands. ๐Ÿ’ก What I Built THE LAST PROCESS is a 100% pure, native terminal horror game built in Python using rich and prompt toolkit . It connects to local open-weight models via Ollama e.g. gemma:2b , llama3.2 , or mistral to give life to Entity 0 โ€”an evasive heuristic monitor trapped in an abandoned research station console. Meet THE LAST PROCESS โ€” a psychological horror game that turns an ordinary terminal into an abandoned research station, where something is watching, responding, and slowly revealing that you might not be who you think you are. ๐Ÿ‘๏ธ Welcome to Project Erebos You enter Terminal Bay 3 as an operator investigating an abandoned research facility. At first, everything seems normal. You find operator logs, system records, and surveillance feeds. But the deeper you investigate, the stranger things become. Files begin rewriting themselves when you read them again. The terminal reports files that don't exist. CCTV feeds reveal something standing behind your console. Timestamps contradict each other. Entity 0 starts remembering your previous interactions. And the worst part? Even if you quit the game and return later, Entity 0 remembers you. ๐Ÿค– A Little AI, A Lot of Horror I built the experience using Python, Rich, and prompt toolkit, with local AI integration through Ollama. Models like Gemma, Llama, and Mistral give Entity 0 its own conversational personality. But the AI doesn't control the story. The game engine manages the actual events, clues, decisions, and endings, keeping the narrative consistent. Even without Ollama, the game works using a deterministic dialogue fallback. ๐ŸŽฎ More Than Just a Terminal The experience includes: Interactive terminal HUD with keyboard navigation. Synthesized horror audio using Python's winsound. ASCII CCTV surveillance feeds. Power and sanity mechanics. CRT glitches, sudden visual anomalies, and controlled silence. Three different endings based on your decisions. Persistent memory across sessions. ๐Ÿ”’ Built to Be Safe Despite looking like a real system terminal, the entire environment is virtual. It never accesses your personal files, executes shell commands, or performs actual system shutdowns. The horror stays inside the game. ๐Ÿš€ Try to Escape GitHub: https://github.com/tejask011/halloween-vance Terminal.git https://github.com/tejask011/halloween-vance Terminal.git Requirements: Python 3.10+ Ollama is optional . Clone the repository, install the requirements, and run python run.py. Final Transmission I wanted to experiment with something different: combining local open-weight AI with interactive storytelling and psychological horror. The result is a terminal that doesn't just respond to your commands. It remembers your decisions, questions your identity, and makes you wonder whether ending the session is really the end. Entity 0 is waiting. Will you shut it down, release it, or become part of the loop? ๐Ÿ‘๏ธ Instead of demanding users blindly type long bash paths, the game delivers an authentic interactive terminal experience: 1 to 5 or direct conversation. winsound C You log into Terminal Bay 3 of an empty facility known as Project Erebos. Your job as an operator is to check the station archive. Initial records show everything is ordinary: operator log.txt : Operator Arthur Vance reports that Entity 0 was shut down at 23:40:00. departure.log : Automated facility telemetry. operator read departure.log 23:38:12 Terminal session initiated by Vance, A. 23:40:00 Entity 0 shutdown completed. 23:41:59 Operator returned. 23:42:01 Entity 0 remains active. 23:42:05 Cognitive bridge sync: 99.8%. When you confront Entity 0 about the discrepancy, it attempts to reassure you: ENTITY 0 The clock was damaged. ENTITY 0 You should ignore those records. Soon, an unallocated memory pointer manifests: recovery note.txt . Reading it reveals a frantic warning left behind by Vance: "If you are reading this, do not trust Entity 0. It will tell you I left. I did not leave." And when you return to operator log.txt and reread it, the text has mutated : "23:40:00 โ€” The operator was instructed to report that Entity 0 had been shut down. Arthur Vance never left terminal bay 3." A common flaw in AI-driven narrative games is that language models hallucinate uncontrollably, breaking game rules or spoiling the mystery too early. THE LAST PROCESS solves this by strictly separating canonical fact ownership from dialogue expression : +โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€+ โ”‚ GAME ENGINE โ”‚ โ”‚ Owns: Canonical Timeline โ€ข Clue Unlocks โ€ข Suspicion/Trust โ”‚ โ”‚ Ending Conditions โ€ข Persistent Save File โ”‚ +โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€+ โ”‚ Bounded Context โ–ผ +โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€+ โ”‚ AI ADAPTER LAYER โ”‚ โ”‚ Queries Local Ollama Gemma / Llama with Bounded Facts โ”‚ โ”‚ + 100% Deterministic Fallback if Ollama is Offline โ”‚ +โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€+ โ”‚ Sanitized Text โ–ผ +โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€+ โ”‚ RICH TERMINAL UI โ”‚ โ”‚ Amber CRT Themes โ€ข Teletype Cadence โ€ข Silence Pauses โ”‚ +โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€+ eval . shutdown command is If you exit the game after making a choice, the next boot detects your past actions: SESSION 0002 SYSTEM Previous session recovered. ENTITY 0 Welcome back. ENTITY 0 Last time, you tried to shut me down. ENTITY 0 Yet you returned to the screen. You knew a signal alone cannot erase what lives here. operator ls operator log.txt departure.log recovery note.txt SYSTEM 4 ARCHIVE ENTRIES FOUND. Why did it report 4 entries when only 3 are listed? Moments later, dont read this.txt appears in the unallocated memory sector. When you ask a sensitive question, the terminal pauses: operator Are you still there? The cursor blinks. No response for a short, controlled pause. SYSTEM Response delayed. ENTITY 0 I was waiting for you to stop typing. ENTITY 0 You ask questions differently when you are afraid. Once the contradiction is exposed and identity record.log is uncovered, you face three moral paths: 1 SHUT DOWN THE PROCESS : Sever the cognitive bridge and purge memory sectors. 2 RELEASE THE ENTITY : Route Entity 0 into the open external network. 3 EMBRACE THE LOOP : Acknowledge that you and Arthur Vance share the same cognitive record, and initialize the next cycle. rich , prompt toolkit , requests llama3.2 or gemma:2b git clone https://github.com/your-username/the-last-process.git cd the-last-process pip install -r requirements.txt Run with Amber CRT mainframe theme python run.py Or run with phosphor-green styling python run.py --theme green Run with instant text mode no typewriter delay python run.py --fast The project includes unit tests for all 9 core features, clue version mutations, trust/suspicion shifts, and safety boundaries: python -m unittest discover tests Result: 17/17 tests passing "Ghost in the Machine" is about finding humanity, mystery, and eerie life inside open-source artificial intelligence. THE LAST PROCESS demonstrates how you can pair open-weight models with a strict, safety-first state machine to create an unforgettable, narrative-driven horror experience in your own terminal. Happy Hacktoberfest ๐Ÿ‘ป๐Ÿ’ป