{"id":16989808,"url":"https://github.com/alrikolson/robco-terminal","last_synced_at":"2025-04-15T13:53:47.675Z","repository":{"id":242181877,"uuid":"808877733","full_name":"AlrikOlson/robco-terminal","owner":"AlrikOlson","description":"A Fallout-inspired terminal emulator with retro CRT effects and AI-driven interactions using OpenAI, Anthropic, and Meta models.","archived":false,"fork":false,"pushed_at":"2024-06-10T08:47:33.000Z","size":1023,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T19:51:55.971Z","etag":null,"topics":["ai","crt","fallout","narrative","opengl","pygame","python","terminal-game"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlrikOlson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-01T03:44:05.000Z","updated_at":"2025-02-09T15:35:46.000Z","dependencies_parsed_at":"2024-11-28T12:38:15.945Z","dependency_job_id":null,"html_url":"https://github.com/AlrikOlson/robco-terminal","commit_stats":null,"previous_names":["alrikolson/robco-terminal"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlrikOlson%2Frobco-terminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlrikOlson%2Frobco-terminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlrikOlson%2Frobco-terminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlrikOlson%2Frobco-terminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlrikOlson","download_url":"https://codeload.github.com/AlrikOlson/robco-terminal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249085475,"owners_count":21210267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","crt","fallout","narrative","opengl","pygame","python","terminal-game"],"created_at":"2024-10-14T03:08:00.152Z","updated_at":"2025-04-15T13:53:47.659Z","avatar_url":"https://github.com/AlrikOlson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROBCO Termlink Emulator\n\nAs a fan of the Fallout series, I wanted to try my hand at recreating the iconic in-game terminal interface. This project is a simple attempt to capture some of the retro-style look and feel of those terminals using Python, Pygame, and OpenGL. It includes basic CRT effects and experimental AI functionality powered by models from OpenAI, Anthropic, and Meta (via NVIDIA Build).\n\nThis emulator is still a work in progress, and I've received a lot of helpful guidance from AI assistants like GPT-4 and Claude 3 Opus along the way. While it may not be perfect, I hope it provides a fun and nostalgic experience for fellow Fallout enthusiasts.\n\n## Preview\n\nhttps://github.com/AlrikOlson/robco-terminal/assets/10505065/3cec1842-9b21-4790-a30d-3e743224988d\n\n## Features\n\n- Recreation of some elements of the Fallout terminal interface\n- CRT effects for a retro look\n- Basic AI-driven interactions and content generation\n- YAML-based configuration for easy content management\n\n## Installation\n\nIf you'd like to give this a try, here are the steps to set it up:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/AlrikOlson/robco-terminal.git\n   ```\n\n2. Navigate to the project directory:\n   ```bash\n   cd robco-terminal\n   ```\n\n3. Install the required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. Set up the necessary API keys in the `.env` file:\n   ```bash\n   OPENAI_API_KEY=YOUR_OPENAI_API_KEY\n   ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY\n   ```\n\n5. Run the emulator:\n   ```bash\n   python src/app/main.py\n   ```\n\n## Usage\n\n- Use the arrow keys to navigate the terminal interface\n- Press Enter to select options or interact with the terminal\n- Modify the configuration files to tweak the emulator's behavior and appearance\n\n## Environment Variables\n\nYou can customize the emulator by setting these environment variables in the `.env` file:\n\n- `OPENAI_API_KEY` (required): The API key for OpenAI's GPT models.\n- `ANTHROPIC_API_KEY` (required): The API key for Anthropic's models.\n- `RESPONSE_PROVIDER` (optional, default: `anthropic`): The provider for generating responses. Options include `openai`, `anthropic`, `nvidia`, and `ollama`.\n- `TRACK_EVENTS_PROVIDER` (optional, default: `anthropic`): The provider for tracking narrative events. Options include `openai`, `anthropic`, and `nvidia`.\n- `UPDATE_STATE_TRACKER_PROVIDER` (optional, default: `anthropic`): The provider for updating state trackers. Options include `openai`, `anthropic`, and `nvidia`.\n- `UPDATE_MINDSET_PARAMETERS_PROVIDER` (optional, default: `anthropic`): The provider for updating mindset parameters. Options include `openai`, `anthropic`, and `nvidia`.\n- `OLLAMA_LLAMA3_API_URL` (optional, default: `http://localhost:11434`): The URL for the Ollama LLaMA3 model API.\n- `CONTEXT_FOLDER` (optional, default: `test`): The folder with context-related configuration files and narratives.\n\n## Customization\n\n- Adjust emulator settings in `src/app/config.py`\n- Implement custom AI handlers in `src/handlers/`\n- Modify terminal rendering and effects in `src/rendering/`\n- Define narrative content and interactions in `src/narrative/yaml/`\n\n## Narrative YAML System\n\nThe YAML narrative system allows for some customizable storytelling. Here's a brief overview.\n\n### Structure of a Narrative YAML File\n\nEach narrative YAML file consists of nodes that map out the story's flow. Here’s a simple example:\n\n```yaml\nnodes:\n  start:\n    content: |\n      [Overseer's Log - Entry 1]\n      The vault's main doors have been sealed. All residents are accounted for, and the initial orientation is underway. Today's priorities include finalizing the resource management plan and a routine inspection of the water purification system.\n    options:\n      - text: \"[Entry 2]\"\n        target: entry_2\n      - text: \"[Resource Management Plan]\"\n        target: resource_management\n  entry_2:\n    content: |\n      [Overseer's Log - Entry 2]\n      Everything is going smoothly. The residents are adjusting well to their new life underground, and our engineering team resolved a minor issue with the air filtration units.\n    options:\n      - text: \"[Entry 3]\"\n        target: entry_3\n      - text: \"[Back to Entry 1]\"\n        target: start\n  resource_management:\n    content: |\n      [Resource Management Plan]\n      - Food: Adequate supplies for 100 residents for 20 years\n      - Water: Purification system operational\n      - Energy: Reactor functioning normally\n      - Medical Supplies: Stocked as per needs\n    options:\n      - text: \"[Back to Entry 1]\"\n        target: start\n```\n\n### Elements of a Node\n\n- `content`: The text to show to the player for that node.\n- `options`: Choices for the player, each with:\n  - `text`: The option's text.\n  - `target`: The node to go to when selected.\n  - `conversational` (optional): Enables conversational mode if set to `true`.\n\n### Loading and Processing Narrative\n\nNarratives are managed using classes derived from `BaseNarrative`. Here's a general flow:\n\n1. **Loading from YAML**: The YAML content is parsed and loaded into nodes.\n2. **Navigating Nodes**: Selecting an option updates the content to reflect the new node.\n\n### Conversational Mode\n\nThis mode allows for dynamic, free-form text input and integrates with AI models to generate character responses. Here's a general overview:\n\n1. **Enabling Conversational Mode**: Set this mode in the YAML file for dynamic interactions using the `conversational` attribute.\n2. **Processing Input**: Player input is processed and sent to an AI model to generate responses.\n\nFor example, enabling conversational mode:\n\n```yaml\nnodes:\n  start:\n    content: |\n      [AI Support]\n      Welcome to the AI Support terminal. You can ask any questions you have.\n    options:\n      - text: \"[Start Conversation]\"\n        conversational: true  # Enabling conversational mode\n```\n\n## AI Context YAML Files\n\nThe AI context YAML files provide the necessary setup for character and setting definitions. They are located in the `src/handlers/ai_personalities` folder.\n\n### Characters YAML File\n\nDefines characters for AI conversations with attributes like:\n\n```yaml\ncharacters:\n  dr_jane_doe:\n    name: Dr. Jane Doe\n    backstory: \u003e\n      Dr. Jane Doe is a highly skilled scientist specializing in bioengineering and cybernetics. She has a calm demeanor and is often seen as a mentor figure within the vault. She remains dedicated to her research, working tirelessly to improve the quality of life for all vault residents.\n    base_emotions:\n      paranoia: 3\n      stress: 4\n      empathy: 8\n      confidence: 7\n      optimism: 6\n      curiosity: 9\n      caution: 5\n      morale: 6\n      focus: 8\n      sociability: 5\n      trust: 7\n      patience: 8\n      creativity: 7\n      resilience: 6\n      decisiveness: 7\n    triggers:\n      - unethical behavior\n      - scientific breakthroughs\n      - threats to the vault\n    coping_mechanisms:\n      - deep breathing exercises\n      - focusing on research\n      - mentoring others\n```\n\n### Setting YAML File\n\nDefines the background and setting for AI interactions:\n\n```yaml\nbackground: \u003e\n  The vault is a self-contained underground complex designed to house residents for extended periods. It features residential quarters, scientific research labs, communal dining areas, and recreational facilities. Life in the vault is structured and regulated to ensure the well-being of its inhabitants.\n\nsetting: \u003e\n  The setting of this interaction is Dr. Jane Doe's laboratory. The lab is well-lit and organized, with various scientific instruments and research materials neatly arranged. The hum of machinery and the soft glow of computer screens create an atmosphere of focused innovation.\n```\n\n## Contributing\n\nIf you’d like to contribute, here are some steps:\n\n1. Fork the repository\n2. Create a new branch for your feature or bug fix\n3. Commit your changes and push the branch to your fork\n4. Open a pull request with a detailed description of your changes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falrikolson%2Frobco-terminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falrikolson%2Frobco-terminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falrikolson%2Frobco-terminal/lists"}