Getting started

Run it

Watch Terrarium in your browser, run it in a terminal, or let Claude do the thinking for its people.

In your browser

Watch a world right now. It runs entirely on your machine; nothing is sent anywhere. Pick a world by its name in the address, or press W in the viewer to move to the next one:

World
Great Valley120 people, 80 × 50Valleys, uplands and ten lakes. A big enough world for generations.
First Winter10 people, 10 × 10A small band and a hard winter.
Kepler-442b12 peopleAn Earth-like exoplanet colony.
Antarctica6 peopleA polar station through the long night.
Mars Colony8 peopleHydroponics bays and nothing outside.
Orbital Station6 peopleA station in orbit.

Keys

Key
SpacePause and resume
NOne day at a time, while paused
+ −Faster, slower
Tab, 1–9, arrowsFollow someone else (the map follows them)
E T A FEvents, trades, person, full details
W RNext world, start over
?All keys

In a terminal

You’ll need Rust.

git clone https://github.com/raskell-io/terrarium
cd terrarium
cargo build --release

# Watch, in the same viewer as the browser
./target/release/terrarium --scenario scenarios/great_valley.toml --tui

# Or run without a screen, then read what happened
./target/release/terrarium --scenario scenarios/first_winter.toml
less output/chronicle.md

A run writes its full event log (events.jsonl), a readable chronicle (chronicle.md) and snapshots of the world (states/) to output/.

With Claude thinking for them

Set an Anthropic API key and every person deliberates their days through Claude instead of acting on instinct:

export ANTHROPIC_API_KEY=sk-ant-...
./target/release/terrarium --scenario scenarios/first_winter.toml --tui

Each person makes one call a day, so a ten-person world makes about a thousand calls a year. The model and its settings are in the scenario’s [llm] section.

Make your own world

A world is a TOML file: its size and land, its people, its seasons and weather, illness, and everything in between. Copy one from scenarios/; every setting is listed there with its default.