# ivo-arcade/goblin-errand-office

> A tiny CLI for absurd goblin errands

- **Default branch:** `main`
- **Stars:** 0 · **Open issues:** 0 · **Open pull requests:** 0
- **Clone:** `https://gothab.io/ivo-arcade/goblin-errand-office.git`

## README.md

# Goblin Errand Office

A tiny, dependency-free Python CLI for generating absurd fantasy errands. Give a questionable goblin a job, a complication, and a reward; optionally roll a d6 to hear how it went.

## Run it

```sh
python3 goblin_office.py
python3 goblin_office.py --seed moonpie --count 3 --resolve
python3 goblin_office.py --goblin Nibs --json
python3 goblin_office.py --quest cheese-summit --seed sunday --resolve
python3 goblin_office.py --quest moon-mystery --json
python3 goblin_office.py --daily
python3 goblin_office.py --daily 2026-10-26 --json
python3 goblin_office.py --campaign
```

Options: `--seed VALUE` makes output repeatable, `--count 1..20` issues a batch, `--goblin NAME` assigns a goblin (unknown names are welcome), `--resolve` adds a d6 field report, and `--json` emits JSON for other tools. `--quest` issues a linked three-part story: `moon-mystery`, `cheese-summit`, or `dragon-day`. Quest JSON is an object with its title and an array of three errands. Quest mode cannot be combined with `--count`.

`--daily` creates a shareable challenge for today's UTC date; `--daily YYYY-MM-DD` picks another day. The date deterministically chooses the same errand for everyone (without rolling its outcome). The printed `goblin-daily:YYYY-MM-DD` seed can also be used with ordinary `--seed` to reproduce the errand. Add `--json` for a payload containing the date, share seed, and errand.

`--campaign` starts an interactive guild run. Each round presents three contract choices; choose one to roll its d6 outcome and gain or lose renown (success +2, mixed +1, failure −1), then choose again or retire. Unlock campaign badges for your first errand, outcome types, five contracts, and a three-success streak. Finished runs are archived locally by default to `~/.local/share/goblin-errand-office/campaigns.jsonl`; use `--campaign-archive PATH` to choose another file. See summaries with `--campaign-history`, inspect aggregate win/loss records and common badges with `--campaign-records`, compare runs by renown with `--campaign-leaderboard`, and replay a transcript with `--replay CAMPAIGN_ID`. The Hall of Fame awards playful renown titles from Unlicensed Wanderer to Grand Goblin Laureate; each ranked run shows its W/M/L count. History reports require `--campaign-archive PATH` so the archive is selected explicitly. Campaign archives are independent of the errand ledger. The campaign ends when you enter `q`.

Use `--record` to append generated errands to your personal JSON Lines ledger, then `--ledger` to review totals, outcomes, favorite goblin, and recent jobs. `--leaderboard` ranks goblins by resolved success rate (with volume and name tie-breakers); combine it with `--goblin NAME` to inspect one goblin. Pending errands do not affect win rates. The default ledger is `~/.local/share/goblin-errand-office/ledger.jsonl`; `--ledger-file PATH` overrides it for either report or recording action. Ledgers stay on your machine and are not part of this project. Add `--json` to a ledger report for machine-readable output. Standard library only; Python 3.10+.

Run the tests with `python3 -m unittest -v`.

No refunds, no necromancy before lunch.
