HeadlinesBriefing favicon HeadlinesBriefing.com

Earth Game: Offline Life‑Goal CLI with SQLite

Hacker News •
×

Earth Game is a private, offline companion for setting and tracking life quests. Built with Python 3.8 and the standard library, it relies on SQLite; no third‑party packages, accounts, or outbound traffic. Commands run in a Unix‑like terminal and prompt for missing text.

To start, earth init creates a local database. Users manage personal data with earth character edit, and craft quests via earth quest add or the non‑interactive flag form. earth quest list displays all quests, earth quest start 1 activates the first one, and earth today reports the current goal, next action, and open‑loop count.

For a browser experience, earth web launches a local HTTP server that serves http://127.0.0.1:8765/. It shares the same SQLite database as the CLI, never binds to a LAN address, and requires a private session URL shown on start. The UI mirrors CLI commands and supports non‑interactive usage.

Data resides in ${XDG_DATA_HOME:-$HOME/.local/share}/earth-game/earth.db, with file permissions set to private on Unix. Exporting via earth export writes JSON without overwriting existing files, and the application supports unit tests with `python3 -m unittest -v`. Backing up the database is as simple as copying the file while Earth Game is idle.