Openvas control and scanning

I have a general, higher-level architectural question. If I were interested in using ONLY the openvas scanner without the web portal, etc… What is needed for that?

For example, I’d like to run openvas, issue a command with targets, policy options, etc… and dump the scan file out. Do I simply compile openvas scanner and using ospd-openvas? Or, do I need to write a custom opsd scanner?