Getting started¶
Install¶
The supported install is the linux/amd64 release archive. phpbotscout is an internal tool
that happens to be open source; it is not built for macOS or Windows.
From a release¶
Every release publishes the archive and a checksum file to the release store, and the
releases page links both. Set version
to the release you want:
$ version=vX.Y.Z
$ base=https://pkg.phpboyscout.uk/phpbotscout/$version
$ curl -fsSLO "$base/phpbotscout_Linux_x86_64.tar.gz"
$ curl -fsSLO "$base/checksums.txt"
$ sha256sum --check --ignore-missing checksums.txt
$ tar -xzf phpbotscout_Linux_x86_64.tar.gz phpbotscout
$ ./phpbotscout version
The checksum proves the archive arrived intact. It does not prove who built it: releases are not signed.
Runtime requirements¶
glibc 2.34 or newer, and nothing else. The binary links only the C library and the maths library that comes with it, so Debian 12, Ubuntu 22.04 and anything newer run it as it comes.
v0.5.0 also needed libdave.so
v0.5.0 linked Discord's voice encryption library, which phpbotscout never calls, and would not start without it. Later releases leave it out. Upgrading from v0.5.0 needs no action; a copy you installed for it can stay or go.
Building from source¶
From a checkout:
which puts the binary in bin/. go install also works, and needs both build tags:
$ go install -tags sqlite_fts5,discord_novoice gitlab.com/phpboyscout/phpbotscout/cmd/phpbotscout@latest
Building needs Go 1.27.2 or newer and a C toolchain, because the SQLite driver is the native one, under cgo. The two tags follow from that:
sqlite_fts5compiles the driver with full-text search, which retrieval depends on.discord_novoicekeeps the Discord adapter's voice support out of the build. It would otherwise come in with cgo and linklibdave.so, which phpbotscout never calls and which would then be needed wherever the binary runs.
Leave either off and the build stops with an error naming it, such as
undefined: phpbotscoutRequiresTheSqliteFTS5BuildTag. just build sets both for you.
@latest is the newest release. Releases up to v0.5.0 predate discord_novoice, ignore it, and
link libdave.so whatever you pass.
Create a configuration file¶
Most commands refuse to run without one:
ERRO failed to load configuration: no config file found hints="Run 'phpbotscout init' to create a configuration."
Two ways to satisfy that:
or drop a .phpbotscout.yaml in the directory you are working in. Either is enough on its own. See
where configuration is read from for
which wins when both exist.
First run¶
Fifteen commands, of which four are this tool's: serve, ask, index and review. The rest
come from the framework; the command reference lists them all.
What you can actually do with it¶
Two things, and it is worth knowing which before you start:
- Answer a question from the indexed documentation, at the command line, with citations. Start with answer your first question from the docs.
- Run the daemon, which watches Discord channels, answers questions addressed to it, and keeps the index current. It posts only in a server that opts in, and does not moderate. See run the bot.
Everything else the bot is designed to do is not built yet. What phpbotscout does not do is the honest list.
What you will need¶
| For | You need |
|---|---|
| Building or refreshing the index | A GitLab token with the Maintainer role on the phpboyscout group, because discovery reads Pages settings and GitLab gates them behind that role |
| Composing an answer | ANTHROPIC_API_KEY, or a locally installed and authenticated claude binary |
Retrieval only (ask --retrieval-only) |
Nothing beyond an index |
Running serve |
A registered Discord application; see set up the Discord application |