Anything you can do in Obsidian you can do from the command line.
#Obsidian CLI is now available with 1.12 (early access).