Anything you can do in Obsidian you can do from the command line.

#Obsidian CLI is now available with 1.12 (early access).

@obsidian Wow! Can't wait to test this.