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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131 |
# Local testing (no Mastodon needed)
Prami ships with a local CLI so you can play with the pet as a game and personality
engine before ever connecting it to Mastodon. The CLI drives the **same** parser, game
engine, cooldowns, database and response generator the bot uses — it is not a separate
mock.
By default it uses whatever `DATABASE_URL` is set (SQLite is perfect locally):
```bash
export DATABASE_URL="sqlite:///prami.db" # Windows PowerShell: $env:DATABASE_URL="sqlite:///prami.db"
```
## One-shot commands
```bash
python -m prami.cli status
python -m prami.cli feed --user @alice@example.com
python -m prami.cli play --user @bob@example.com
python -m prami.cli pet --user @alice@example.com
python -m prami.cli clean --user @alice@example.com
python -m prami.cli sleep --user @alice@example.com
python -m prami.cli wake --user @alice@example.com
python -m prami.cli help
```
`--user` is optional; without it a default local user is used. Each user has its own
cooldowns, just like real accounts.
## Nicknames and relationships
Prami remembers lightweight, game-only data about each user (interaction counts, a
per-user trust score, and a bond level: stranger → familiar → trusted → friend →
beloved menace). Kind, frequent users bond faster; helping during a critical state is
worth extra trust.
```bash
python -m prami.cli nickname Soup Wizard --user @alice@example.com # set a nickname
python -m prami.cli nickname clear --user @alice@example.com # remove it
python -m prami.cli relationship --user @alice@example.com # inspect (dev only)
```
Nicknames are sanitized (max 32 chars, no URLs, mentions, HTML, or line breaks) and have a
short cooldown. Prami uses a set nickname occasionally in replies, a little more often for
high-bond users. Raw relationship numbers only show in `relationship`, never in normal
replies.
## Social features (teach, events, admin)
These need their flags on (`ENABLE_TEACH_COMMAND`, `ENABLE_EVENTS`). The CLI grants you local
admin. Full reference: [LOCAL_TESTING.md](LOCAL_TESTING.md).
```bash
python -m prami.cli teach '"Prami believes soup is weather."' --user @alice@example.com
python -m prami.cli admin memories
python -m prami.cli admin approve-memory 1
python -m prami.cli event-start snack_vote
python -m prami.cli vote soup --user @alice@example.com
python -m prami.cli event-complete
python -m prami.cli admin status
```
When an action is favourite/boost-worthy or hits a milestone, the CLI notes it under the reply.
## Interactive shell
```bash
python -m prami.cli shell
```
Then type interactions as if they were mentions:
```
@alice feed
@bob play
@alice status
@charlie pet
tick 2h
debug
exit
```
You can also set a nickname (`@alice call me Soup Wizard`) and inspect a user with
`whois @alice`.
Inside the shell: `tick`, `tick 30m`, `tick 3h` simulate time; `debug` prints raw state;
`exit` or `quit` leaves.
## Inspect raw state (dev only)
```bash
python -m prami.cli debug-state
```
Prints the raw numbers — hunger, happiness, energy, health, cleanliness, social, trust,
chaos, asleep, mood and the last updated timestamp. Normal users only ever see the
narrative `status`, never these numbers.
## Simulate time passing
```bash
python -m prami.cli tick # one decay step
python -m prami.cli tick --hours 3
python -m prami.cli tick --minutes 30
```
This applies the exact same decay logic the scheduler runs. One step equals
`STATE_DECAY_INTERVAL_MINUTES` of real time, so `--hours 3` applies as many steps as the
scheduler would over three hours.
## Reset
```bash
python -m prami.cli reset # asks for confirmation
python -m prami.cli reset --yes # no prompt
```
Resets the pet to defaults and clears interactions, cooldowns, events and processed
statuses. User records are kept.
## Inside Docker Compose
The same commands work in the container, against the Compose Postgres:
```bash
docker compose run --rm prami python -m prami.cli status
docker compose run --rm prami python -m prami.cli feed --user @alice@example.com
docker compose run --rm prami python -m prami.cli shell
docker compose run --rm prami python -m prami.cli tick --hours 4
docker compose run --rm prami python -m prami.cli debug-state
```
|