A simpler alternative to the AUR RPC.
GPL-3.0 License
A faur
instance is a mirror of all package data on the AUR. faur
is...
info
and search
).For instance, visit:
There is only a single endpoint: packages
.
Endpoint | Function | Big-O Efficiency |
---|---|---|
packages?names=<TOKENS> |
Look up m -many packages by name |
O(mlogn) |
packages?names=<TOKEN>&by=prov |
Find packages that satisfy TOKEN
|
O(logn) |
packages?names=<TOKENS>&by=desc |
Find packages that contain all TOKENS in their names / descriptions / keywords |
O(mlogn) |
Where multiple TOKENS
are accepted, these are separated by commas, as in:
packages?names=spotify,teams,zoom
Caveat: by=desc
is term-based, not regex based. This is for performance
reasons. So, packages?names=aura&by=desc
will match on aura-bin
but not on
auralcap
.
faur
InstanceRunning a personal faur
instance is simple. First, you'll need package data.
From the top-level of the project repo:
wget https://aur.archlinux.org/packages-meta-ext-v1.json.gz
gzip -d packages-meta-ext-v1.json.gz
Then simply:
clojure -M -m faur
This will run a local faur
server on http://0.0.0.0:8080 . To run in TLS mode,
pass --key
and --cert
as well and HTTPS requests will be accepted on port
443. For example, here is how the official faur instance itself is invoked:
clojure -M -m faur --key /etc/letsencrypt/live/faur.fosskers.ca/privkey.pem --cert /etc/letsencrypt/live/faur.fosskers.ca/fullchain.pem
For live debugging, an nREPL server is embedded and ran on
localhost:7888
. If running faur
on a remote server, you can access this
nREPL remotely by first doing an SSH port-forward on your local machine:
ssh -NL 7888:localhost:7888 root@<IP-OF-REMOTE-SERVER> -v
and then performing a cider-connect-clj
(or similar), selecting
localhost:7888
as the target. Once connected, you're free to inspect the
various Atoms or redefine functions.