National news with bias analysis and dual left/right variants. A spiritwriter-powered static site generator that fetches NewsAPI articles, analyzes political bias with Claude, generates left- and right-leaning rewrites, and builds a static site with a client-side bias slider.
Sister project to perseus-news, a private regional/enforcement-focused sibling. Zeitghost depends on spiritwriter and shares the same article shard format (sw:article).
NewsAPI → fetcher.py → bias.py (Claude) → shards.py → generator.py → output/
│ │
└─→ bias score 0..1, L/R variants └─→ static HTML + slider JS
The bias slider is client-side: every article card embeds left, original, and right variants; JS swaps the visible variant based on the slider position.
pip install -e ".[dev]"
zeitghost ingest # fetch newest from NewsAPI, analyze, write shards
zeitghost build # render static site from shard store
zeitghost analytics # regenerate source-bias rollup page
zeitghost import-legacy --db-url postgresql://... # seed shards from a temp Postgres
# (see `zeitghost import-legacy --help` for full
# workflow with HtmxNewsEngine SQL dump)feeds/newsapi.yaml— NewsAPI categories + keyword filters~/.zeitghost/shards/— shard store (override withZEITGHOST_SHARD_STORE)- Secrets via
spiritwriter.secretskeychain:ANTHROPIC_API_KEY,NEWS_API_KEY
infra/ansible/inventories/us-ny1/hosts.yml deploys to news.spiritwriter.ai. Mirrors the perseus-news pattern: Tailscale + Ansible + Docker Compose, behind nginx, TLS via Cloudflare.
./infra/docker/build-wheels.sh
cd infra/ansible
ansible-playbook deploy.yml -i inventories/us-ny1/hosts.ymlCI/CD via GitHub Actions — push to main runs tests, builds the spiritwriter wheel, and deploys via Tailscale.
Apache License 2.0. See LICENSE and NOTICE. Release notes in CHANGELOG.md.