Metadata-Version: 2.4
Name: cabin-fever-x86
Version: 0.0.1a1
Summary: A shared game night with an AI companion over a simulated radio: play old text adventures together.
Keywords: text-adventure,interactive-fiction,zmachine,jericho,voice,llm
Author: Adam Fourney
Author-email: Adam Fourney <adam.fourney@gmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Games/Entertainment
Requires-Dist: soundfile
Requires-Dist: numpy
Requires-Dist: elevenlabs
Requires-Dist: fastapi
Requires-Dist: openai
Requires-Dist: pydantic
Requires-Dist: pyyaml
Requires-Dist: uvicorn
Requires-Dist: websockets
Requires-Dist: jericho
Requires-Dist: azure-identity ; extra == 'azure'
Requires-Python: >=3.11
Project-URL: Homepage, https://github.com/afourney/cabin-fever-x86
Project-URL: Repository, https://github.com/afourney/cabin-fever-x86
Project-URL: Issues, https://github.com/afourney/cabin-fever-x86/issues
Provides-Extra: azure
Description-Content-Type: text/markdown

# Cabin Fever: x86

![Cabin Fever x86](https://raw.githubusercontent.com/afourney/cabin-fever-x86/main/imgs/cabin-fever-x86.png)

The books are finished. The rain isn’t. Somewhere deep in the Olympic Peninsula, a solitary operator is holed up in a remote cabin with no internet, no cell service, and no particular hope of going outside anytime soon. Every book on the shelves has been read—some of them several times. All that remains is a beige 1990s PC, a pile of ancient text adventures, and a VHF radio that can just reach one other voice through a repeater on a distant peak: yours. And old games are always more fun with a friend.

**Cabin Fever x86** is a shared game night with an AI companion over a simulated radio. You explore old text adventures together, trading ideas, debating questionable decisions, and occasionally doing something foolish just to see what happens. The game is only part of the fun—the rest is the banter, the arguments, the running jokes, and the personality on the other end of the channel.

Under-the-hood, Cabin Fever x86 uses GPT-5.4 for inference, ElevenLabs for voice synthesis and recognition, and [jericho](https://github.com/microsoft/jericho) for Z-machine game emulation.

## Demo

[![Cabin Fever: x86 -- Text Adventures, Over Radio, with AI](https://raw.githubusercontent.com/afourney/cabin-fever-x86/main/imgs/video_thumbnail.png)](https://www.youtube.com/watch?v=hskavCVqhhQ)

**Note:** This demo captures a real gameplay session. The female voice is the AI radio operator built into the experience. The male voice is the human player, re-voiced in post-production using a different ElevenLabs voice to preserve anonymity. That overdub is not generated by the game itself.

## Installation

### Python package

The project uses [uv](https://docs.astral.sh/uv/). Clone the repository and
sync the environment:

```bash
git clone git@github.com:afourney/cabin-fever-x86.git
cd cabin-fever-x86
uv sync
```

### Configuration

Settings live in `config.yaml`, which is gitignored. Start from the template:

```bash
cp config.example.yaml config.yaml
```

Any `${ENV_VAR_NAME}` reference in the file is resolved against the environment
when it is loaded, which keeps secrets out of the file itself:

```yaml
client:
  host: 127.0.0.1
  port: 5000
  elevenlabs_api_key: ${ELEVENLABS_API_KEY}

server:
  interface: 127.0.0.1
  port: 5000
  ai_client:
    provider: openai  # openai | azure | gateway
    api_key: ${OPENAI_API_KEY}
  cabin_events:
    min_delay: 90
    max_delay: 240
```

Then, remember to export your OpenAI and ElevenLabs API keys in the shell before
running the server or any of the clients:


```bash
export OPENAI_API_KEY=...
export ELEVENLABS_API_KEY=...
```

## Running

Three command-line entry points are installed:

| Command | Description |
| --- | --- |
| `cf86-server` | Hosts the game session. |
| `cf86-web` | Web client — the radio in a browser tab. |
| `cf86-text` | Text client — same session, typed instead of spoken. |

Run them with `uv run` (no need to activate the virtualenv):

```bash
uv run cf86-server
```

Then **one** of:
```bash
uv run cf86-web
uv run cf86-text
```

If running the web client, open the URL it prints in a browser (typically [http://127.0.0.1:8000](http://127.0.0.1:8000)).

### Z-machine games

The server fetches Z-machine games itself on first-run. On startup it looks in
`data/games/`, and if there is nothing playable there it downloads the
[z-machine-games](https://github.com/BYU-PCCL/z-machine-games) archive and
unpacks the 57 titles of its `jericho-game-suite` folder — and only those.

To do it by hand instead, or to add your own, drop `.z3`–`.z8` files into
`data/games/` and the server will leave them alone.
