| `<nick>: <question>` | Ask the bot anything (AI) |
## Installation
```sh
make install
```
Installs to `$(PREFIX)/bin` (default: `/usr/local/bin`).
Override the prefix:
```sh
make install PREFIX=$HOME/.local
```
## Database
Data is stored in `calc.db` (SQLite3) in the working directory. The bot creates two tables:
-`calc` — key-value pairs with nick and timestamp metadata
-`ai_pending` — single-row table for managing in-flight AI queries
## Architecture
`calc` uses a single `poll()` loop with a 100ms timeout. AI queries fork a child process that runs the `opencode` CLI; the parent picks up the result on the next poll iteration. SQLite3 is loaded at runtime via `dlopen` to avoid a compile-time dependency.
## License
Unlicense — public domain. See `calc.c` for details.