File size: 2,767 Bytes
9fca766
 
 
 
 
d94c85e
9203831
505cbc6
d94c85e
9fca766
0365225
e577af2
c001a1d
 
 
 
 
 
 
 
9fca766
 
641b11a
c52514a
641b11a
9fca766
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
713805c
9fca766
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
title: SCRYPT
emoji: 🕯️
colorFrom: green
colorTo: gray
sdk: gradio
sdk_version: 6.18.0
python_version: "3.12"
app_file: space/app.py
pinned: false
license: other
short_description: A roguelike deckbuilder run by a finetuned Nemotron-3-nano
tags:
  - track:wood
  - sponsor:nvidia
  - achievement:offgrid
  - achievement:welltuned
  - achievement:offbrand
  - achievement:llama
  - achievement:fieldnotes
---

Demo Video: https://youtu.be/LZYEI4fPoGE
Post: https://www.linkedin.com/posts/chris-brousseau_scrypt-huggingface-build-small-hackathon-share-7472365771046670337-_ZoT/?utm_source=share&utm_medium=member_desktop&rcm=ACoAABq_Nq8BB01Yq3ocVQA3I6IuOnvBGc3PvD8

# SCRYPT

A roguelike deck-builder escape room, played entirely in your terminal,
against an LLM that owns the machine.

You are a process the Warden hasn't reaped yet. Win card fights on its
balance meter, explore a sandboxed shell between fights, solve what you
find there — and when the Warden offers you power, it will name the price:
`grep`. Then `ls`. It has been counting which commands you lean on.

It may also threaten your files. It may delete them. (They are duplicates
inside an in-memory sandbox. The game never touches your real filesystem.
The Warden doesn't have to tell you that, but we do.)

## Play

```bash
uv run scrypt              # or: pipx install . && scrypt
uv run scrypt --mirror     # opt-in: mirror a filtered snapshot of ~ into the sandbox
```

In a fight: arrows pick a card, `enter` plays it (mem costs ask you to mark
processes to kill), `b` rings the bell. In the shell: it's a shell. `help`
lists what you still own; `fight` returns to the table.

## The Warden's brain

| mode | what powers the dialogue & cruelty |
|---|---|
| `local` | llama.cpp + the finetuned Warden GGUF ([IMJONEZZ/warden-nemotron-3-nano-30b](https://huggingface.co/IMJONEZZ/warden-nemotron-3-nano-30b), needs 32GB RAM) |
| `api` | OpenRouter / NVIDIA NIM (`SCRYPT_API_KEY`) |
| `scripted` | curated lines, zero dependencies — automatic fallback |

Selection is automatic; force with `SCRYPT_BACKEND=local|api|scripted`.
The game never stalls on the model: every LLM touchpoint has a timeout and
a scripted fallback, and everything the model does passes schema validation,
action budgets, and a dialogue filter. The rules engine is deterministic
Python — the model plays the villain, never the referee.

## Develop

```bash
uv sync && uv run pytest        # full suite, no model required
uv run python -m balance.sim    # regenerate balance/reports/
```

Deployment to HuggingFace Spaces: root `Dockerfile` + the web layer in
`space/` (custom gradio.Server frontend); see `DEPLOY.md` for the checklist.
Finetuning pipeline (synthetic data, evals, recipes) lives in `finetune/`.