code.pablomurad.com

prami-pet

Community virtual pet that lives as a Mastodon account

.env.example raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# --- Mastodon connection ---
MASTODON_BASE_URL=https://your.instance.social
MASTODON_ACCESS_TOKEN=your-access-token-here
BOT_ACCOUNT_ACCT=prami@your.instance.social

# --- Database ---
# Postgres (default for docker compose):
DATABASE_URL=postgresql+psycopg2://prami:prami@db:5432/prami
# Local SQLite alternative (no postgres needed):
# DATABASE_URL=sqlite:///prami.db

# --- Timing ---
POLL_INTERVAL_SECONDS=30
STATE_DECAY_INTERVAL_MINUTES=15
AUTOPOST_INTERVAL_MINUTES=240

# --- Posting behaviour ---
DEFAULT_VISIBILITY=unlisted
AUTOPOST_VISIBILITY=unlisted
AUTOPOST_ENABLED=true

# --- Pet identity ---
PET_NAME=Prami
PET_SPECIES=community critter
# Traits here bias which response templates Prami reaches for. Recognised words include:
# weird, affectionate, dramatic, suspicious, chaotic, calm, shy, clingy, grumpy, brave.
PET_PERSONALITY=weird, affectionate, slightly dramatic
# Template pack to use. Only "default" ships today; this is the hook for future packs.
PET_PERSONALITY_PACK=default

# --- Anti-abuse ---
MAX_COMMANDS_PER_USER_PER_HOUR=20
MAX_COMMANDS_GLOBAL_PER_HOUR=200
# Comma-separated accts to ignore, e.g. spammer@bad.social,troll@elsewhere.social
BLOCKED_USERS=

# --- Maintenance ---
# Processed status IDs older than this are pruned daily to keep the table small.
PROCESSED_RETENTION_DAYS=14

# --- Social: favourites (off unless enabled) ---
ENABLE_FAVOURITES=false
MAX_FAVOURITES_PER_HOUR=8
MAX_FAVOURITES_PER_USER_PER_DAY=3
# Favouriting private/direct statuses is off unless you opt in.
ALLOW_FAVOURITE_PRIVATE=false

# --- Social: boosts (off by default; kept extremely rare) ---
ENABLE_BOOSTS=false
MAX_BOOSTS_PER_DAY=1
MIN_HOURS_BETWEEN_BOOSTS=12
BOOST_ONLY_PUBLIC_STATUSES=true

# --- Teach / memory (moderated; off unless enabled) ---
ENABLE_TEACH_COMMAND=false
# Comma-separated admin accts, e.g. admin@example.com,mod@example.org
ADMIN_ACCOUNTS=
# If true, non-admins get a short refusal; if false they are ignored silently.
ADMIN_REFUSE_NONADMIN=false
MEMORY_MAX_LENGTH=180
MEMORY_ALLOW_URLS=false

# --- Community events ---
ENABLE_EVENTS=false
EVENT_CHANCE_PER_AUTOPOST=0.15
MAX_ACTIVE_EVENTS=1
EVENT_DURATION_HOURS=12
EVENT_COOLDOWN_HOURS=24

# --- Milestones ---
ENABLE_MILESTONE_POSTS=true
MILESTONE_POST_VISIBILITY=unlisted

# --- Misc ---
LOG_LEVEL=INFO