I made an extension a while back that fully exposes all of Firefox so it's CLI-accessible. It's actually not that much effort.