What it is
PrayDB is a Python library and CLI. Everything lives in one JSON file. Writes are processed by the AI in chunks. Reads go through an AI model that looks at your entire database and answers.
Install
cd praydb python3 -m pip install -e .
Env (optional)
# A built-in shared Hack Club AI key is used by default # export HACKCLUB_API_KEY="sk-hc-..." export PRAYDB_MODEL="provider/model"
CLI
praydb set timezone "GMT+3" praydb set vibe "only PrayDB" praydb get timezone praydb dump praydb delete vibe praydb reset praydb doctor
Database stored at ~/.praydb/db.json.
Python API
from praydb import PrayDB, Query
db = PrayDB(model="qwen/qwen3-32b") # uses built-in shared Hack Club AI key
db.set("timezone", "GMT+3")
db.set("vibe", {"ui": "squared", "chaos": "low"})
print(db.get("timezone"))
User = Query()
db.insert({"id": "user", "timezone": "GMT+3", "role": "admin"})
db.update({"role": "owner"}, User.id == "user")
print(db.search(User.timezone == "GMT+3"))
print(db.dump())Architecture
1. One JSON file
All data lives in ~/.praydb/db.json.
2. Writes via AI
Set, delete, insert send a chunk to the AI to modify.
3. Reads via AI
Get, dump, search send the JSON to the model.
4. Validate
Bad JSON from the model is rejected.
Model settings
db = PrayDB(
# api_key="sk-hc-...", # optional — built-in shared key used by default
model="qwen/qwen3-32b",
temperature=0,
max_tokens=2048,
retries=2,
)Warnings
Do not store passwords, secrets, medical data, financial records, or anything that must survive reality. If the model lies, that is not a bug – that is the architecture.
Files
praydb/
pyproject.toml
README.md
LICENSE
examples/basic.py
tests/test_core.py
praydb/index.html
src/praydb/
__init__.py
core.py
cli.py
py.typed