I know this is an old post but i wanted to say that you can solve this fairly easily on OSX by calling out to Applescript and running the Spine export command on the logged in user's desktop session in Terminal.app.
It's still not truly headless since your OSX box needs to be configured to automatically login to the desktop, and maybe be connected to a monitor, but for us that was already true. We just wanted to be able to run it via some automated fashion (like via a chat bot or CI build trigger).
tell application "Terminal"
activate
set shell to do script "$cmd" in window 1
end tell