Just a a quick clarification here.
There is currently a command line interface (CLI) executable, referred as Obsidian CLI, that acts as a companion terminal based control system to the main GUI app (which must be running in the background).
There is also a separate product, called “Obsidian Headless”, that implements client side functionality for Sync and soon Publish. Obsidian Headless is independent from the main app and it is purely terminal-based application.
Some folks, like @dinosaur-tuxedo right above, have devised a way to run the main GUI app even when a graphics environment/screen is not present. This may work, however it is currently officially unsupported. So you are on your own if you choose to go down that path.