update docs

This commit is contained in:
Izalia Mae 2025-02-20 09:59:03 -05:00
parent ef7109e321
commit 2e9a8a99e5
5 changed files with 23 additions and 88 deletions

View file

@ -92,27 +92,6 @@ Delete a user.
activityrelay user delete <username> activityrelay user delete <username>
### List Tokens
List all API tokens for a user.
activityrelay user list-tokens <username>
### Create Token
Generate a new API token for a user.
activityrelay user create-token <username>
### Delete Token
Delete an API token.
activityrelay user delete-token <code>
## Inbox ## Inbox
Manage the list of subscribed instances. Manage the list of subscribed instances.
@ -193,81 +172,37 @@ Add all current inboxes to the whitelist.
activityrelay whitelist import activityrelay whitelist import
## Instance ## Ban
Manage the instance ban list. Manage the domain and software bans.
### List ### List
List the currently banned instances. List the current bans. Use `--only-domains` to display just the banned domains and `--only-software`
to just list the banned software. Specifying both will result in an error. `--expanded-format` will
put the reason on the next line.
activityrelay instance list activityrelay instance list --only-domains --only-software --expanded-format
### Ban ### Add
Add an instance to the ban list. If the instance is currently subscribed, it will be removed from Add a domain or software to the ban list. If the instance is currently subscribed, it will be removed
the inbox list. from the relay.
activityrelay instance ban <domain> --reason <text> --note <text> activityrelay ban add <name> --reason <text> --note <text> --software --fetch-nodeinfo
### Unban ### Remove
Remove an instance from the ban list. Remove a ban.
activityrelay instance unban <domain> activityrelay ban remove <name> --software
### Update ### Update
Update the ban reason or note for an instance ban. Either `--reason` and/or `--note` must be Update the reason or note for a ban. Either `--reason` and/or `--note` must be specified.
specified.
activityrelay instance update bad.example.com --reason <text> --note <text> activityrelay ban update <name> --reason <text> --note <text> --software
## Software
Manage the software ban list. To get the correct name, check the software's nodeinfo endpoint.
You can find it at `nodeinfo['software']['name']`.
### List
List the currently banned software.
activityrelay software list
### Ban
Add a software name to the ban list.
If `-f` or `--fetch-nodeinfo` is set, treat the name as a domain and try to fetch the software
name via nodeinfo.
If the name is `RELAYS` (case-sensitive), add all known relay software names to the list.
activityrelay software ban [-f/--fetch-nodeinfo] <name, domain, or RELAYS> --reason <text> --note <text>
### Unban
Remove a software name from the ban list.
If `-f` or `--fetch-nodeinfo` is set, treat the name as a domain and try to fetch the software
name via nodeinfo.
If the name is `RELAYS` (case-sensitive), remove all known relay software names from the list.
activityrelay software unban [-f/--fetch-nodeinfo] <name, domain, or RELAYS>
### Update
Update the ban reason or note for a software ban. Either `--reason` and/or `--note` must be
specified.
activityrelay software update relay.example.com --reason <text> --note <text>

View file

@ -16,8 +16,7 @@ Hostname the relay will be hosted on.
#### Listener #### Listener
The address and port the relay will listen on. If the reverse proxy (nginx, apache, caddy, etc) The address and port the relay will listen on. If the reverse proxy (nginx, apache, caddy, etc)
is running on the same host, it is recommended to change `listen` to `localhost` if the reverse is running on the same host, it is recommended to change `listen` to `localhost`.
proxy is on the same host.
listen: 0.0.0.0 listen: 0.0.0.0
port: 8080 port: 8080
@ -40,14 +39,14 @@ SQL database backend to use. Valid values are `sqlite` or `postgres`.
#### Cache type #### Cache type
Cache backend to use. Valid values are `database` or `redis` Cache backend to use. Valid values are `database` or `redis`.
cache_type: database cache_type: database
#### Sqlite File Path #### Sqlite File Path
Path to the sqlite database file. If the path is not absolute, it is relative to the config file. Path to the sqlite database file. If the path is not absolute, it is relative to the config file
directory. directory.
sqlite_path: relay.jsonld sqlite_path: relay.jsonld
@ -102,14 +101,14 @@ Password for the specified user.
Hostname, IP address, or unix socket the server is hosted on. Hostname, IP address, or unix socket the server is hosted on.
host: /var/run/postgresql host: localhost
#### Port #### Port
Port number the server is listening on. Port number the server is listening on.
port: 5432 port: 6379
#### Username #### Username

View file

@ -6,7 +6,7 @@ from ..state import State
# remove this in 0.4.0 # remove this in 0.4.0
@cli.group("instance") @cli.group("instance", hidden = True)
def cli_instance() -> None: def cli_instance() -> None:
""" """
Manage instance bans (deprecated) Manage instance bans (deprecated)

View file

@ -7,7 +7,7 @@ from ..state import State
# remove this in 0.4.0 # remove this in 0.4.0
@cli.group("software") @cli.group("software", hidden = True)
def cli_software() -> None: def cli_software() -> None:
""" """
Manage software bans (deprecated) Manage software bans (deprecated)

View file

@ -112,6 +112,7 @@ class State:
return return
from .views import ROUTES, middleware as mw from .views import ROUTES, middleware as mw
logging.info( logging.info(
"Starting webserver at %s (%s:%d)", "Starting webserver at %s (%s:%d)",
self.config.domain, self.config.domain,