Skip to main content

🌍 Terrella — Personal AI Stack

License: Apache-2.0 OpenSSF Scorecard

A terrella ("little Earth") is the small magnetized model of Earth that early scientists ran lab experiments on. This one is a homelab-scale AI stack — born on a desktop PC named earth (ADR-0008 has the naming story).

A reproducible setup for a personal AI workstation — Fedora Linux (primary) or WSL2/Ubuntu (supported) with an NVIDIA RTX 5080 — running local LLMs (via ollama) for everyday coding, with paid cloud APIs (Anthropic / Gemini / OpenAI) reserved for hard problems. Every API call is logged to Postgres and visualized in Grafana, so total spend across local + paid services is always one chart away.

🧭 Direction & roadmap

This project is evolving from a workstation blueprint into an installable open-source tool — a terrella CLI that provisions and manages a personal AI stack on any Linux box, running on Podman + Quadlets, with a multi-node homelab as the end state. The plan lives in ROADMAP.md (phases M0–M7), architectural decisions in docs/adr/, and work tracking in docs/project-management.md.

Transition note: earth (the reference machine) now runs Fedora 44; the docs below still describe the WSL-era setup and are being migrated as part of M0. The stack/ and provision/ trees remain the working reference until the CLI reproduces them (see the transition policy in ROADMAP.md).

Open WebUI (chat for humans)  ──┐
                                ├──►  ollama  ──►  RTX 5080
LiteLLM (proxy for programs)  ──┘     :11434
       │
       ├─►  Anthropic / Gemini / OpenAI  (per-call cost logged)
       └─►  Postgres → Grafana          (one dashboard, all spend)

📚 Full documentation: docs/

The whole guide lives under docs/ and is structured for someone building this from scratch.

Section What's inside
docs/01-overview.md Architecture, glossary, and what's in the repo. Start here.
docs/setup/ Six-phase installation guide (Windows host → WSL → ollama → Open WebUI → Aider → observability stack).
docs/reference/ Look-up docs: machines, installed models, subscriptions, per-tool inventory, and the model-routing decision table.
docs/operations/ Day-2: cross-machine (Tailscale) access, backups, gaming toggle, model benchmarking, monthly billing entry, troubleshooting.

Repo contents

Path Purpose
docs/ All documentation.
provision/ Machine provisioner (provision.sh), model manager (sync-models.sh), and the model catalog (models.list). Run them independently.
stack/ docker-compose project: all runtime services — Open WebUI + LiteLLM + Postgres + Prometheus + Grafana. Config files mounted into containers live under stack/observability/.

Quickstart for a fresh install

  1. On Windows: install the NVIDIA driver, wsl --install -d Ubuntu-24.04, create %UserProfile%\.wslconfig (template in docs/setup/01-windows-host.md), then wsl --shutdown.
  2. In WSL: clone this repo and run the provisioner:
    cd ~/src/jomkz/terrella
    bash provision/provision.sh
    
    Details: docs/setup/README.md.
  3. Bring up the full stack:
    cd stack
    ./scripts/generate-env.sh   # first time only — writes .env with random secrets
    docker compose up -d
    ./scripts/init-billing-table.sh   # first time only — creates monthly_costs table
    ./scripts/init-benchmark-table.sh # first time only — creates benchmark_results table
    
    → Open WebUI http://127.0.0.1:8080 · LiteLLM http://127.0.0.1:4000 · Grafana http://127.0.0.1:3000.

Already set up — common tasks

Task Doc
Pick a model for the task at hand docs/reference/routing.md
Use the workstation from jupiter / Mac mini docs/operations/cross-machine-access.md
Measure how fast local models run (tok/s, TTFT, VRAM) docs/operations/benchmarking.md
Stop everything before launching a game docs/operations/maintenance.md#gaming-toggle
Back up Open WebUI chats docs/operations/maintenance.md#backup--restore-open-webui
Log this month's Copilot / Claude bill deploy/earth/manual-billing.md
Something broke docs/operations/troubleshooting.md

Metadata

Release files for terrella 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for terrella 0.0.1
File Size Uploaded
terrella-0.0.1.tar.gz 107.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for terrella 0.0.1
File Interpreter ABI Platform
terrella-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 114.9 kB

Release files / terrella-0.0.1.tar.gz

Download URL terrella-0.0.1.tar.gz
Size 107.1 kB
Tags Source
SHA-256 checksum
How to use checksums
45680f496ba551c61d2211739ae0273545b5a2f8441e15441f0ee3d69722fb38
BLAKE2b-256 checksum
How to use checksums
a040452ad4209a3d5652b8ca96b55b0b99c9cd6b8fcbd1a1e6961867a0cd24c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Release files / terrella-0.0.1-py3-none-any.whl

Download URL terrella-0.0.1-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81c123c0b6a77e15a268e7e87e20c020ad24bdcf8c535ea8af457145559e31f0
BLAKE2b-256 checksum
How to use checksums
5bbf1661e1afc7ffd9abdc2db5c14ff7ab5a6f94c2148da05b42e10b227b5e02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page