Skip to content

Command line

The abilian-analytics command administers an instance. It reads the same configuration as the app: run it where the app runs. On Hop3, quote the whole command: hop3 run --app abilian-analytics 'abilian-analytics …'.

abilian-analytics user create EMAIL [--username NAME] [--superuser] [--generate]
abilian-analytics user list
abilian-analytics user set-password EMAIL [--generate]
abilian-analytics token issue EMAIL [--days N]
abilian-analytics purge
abilian-analytics rules reapply [--project PROJECT] [--since YYYY-MM-DD]
abilian-analytics icons fetch [--project PROJECT]
abilian-analytics import umami|matomo DUMP --owner EMAIL [--dry-run]
abilian-analytics geoip update [--max-age DAYS]

abilian-analytics --help, and --help after any command, say the same.

Users and tokens

user create
Creates an account. --username defaults to the email's local part; --superuser makes it an administrator.
user list
Lists the accounts, by email: username, role (user, staff or superuser), whether it is active, and when it was created.
user set-password
Sets an account's password.
token issue
Issues an API token for an account, valid --days days (365 by default), and prints it, once.

Passwords are read from a prompt, or from standard input when it isn't a terminal. With --generate, a password is made up and printed once: use it where there is neither, as in a command run on the server through hop3.

Data

purge
Deletes the data past its retention period. The server also does it once a day.
rules reapply
Classifies the stored visits again, with today's filtering rules: every project's whole history, or one project's (by name or id), since a date.
icons fetch
Fetches the projects' favicons. Icons uploaded by hand stay.
import umami
import matomo
Import a tool's history from a dump of its database: see importing. --owner owns the projects created for the tool's websites; --dry-run reports what would be imported, and changes nothing.

GeoIP

geoip update
Downloads DB-IP's country and network databases into GEOIP_DIR; with --max-age, only those missing or older than that many days. The app reloads them.

The app's background jobs keep them current on their own: there is no command to run for that. They run in the app's process (myxo serve layout.toml), each on its schedule: GeoIP updates daily, alerts and monitoring checks every 5 minutes, email reports every 15 minutes.