Not really a unix command, but:
system_profiler -detailLevel full > myreport.txt may be a good start.
It is only possible to list the software (as there is an option for xml output) (read the man page for the exact syntax). If you use macports, you can just run port installed.
source
share