To expound a bit on what @kpa is saying –-
Aliases defined on the FIREWALL >> ALIASES tab in pfSense eventually wind up defined as pf tables. The table name matches the alias name, and the table's content will be the IP address or addresses the alias resolves to at run time. So the CLI command he gave an example of is used to dump out the contents of a specific table name. In the example given, the table name is "bogons".
If you don't know the table name in advance, you can do this to get a list of all the tables –
/sbin/pfctl -s Tables
You could code all this in a shell script to list the tables and then grab the contents (IP addresses) of each table.