What I would like is to use Obsidian from cmd line as I use for example VSCode or Sublime Text.
I am not sure of all of the use cases in here. But what I would like that obsidian works from cmd line just as any regular editor.
Opening the vault
This opens the vault in that path (if not already open) and closes the current vault.
obsidian myvault
This would open vault in new window.
obsidian -n myvault
Of course if you prefer the above behaviour could be flipped. So then you would specifically need to ask to open the new vault into the current window.
Opening individual files in the vault
Open specific file in that vault in current active pane
If vault is not already open, then also open the vault myvault
obsidian myvault/file.md
Opens file in new pane (so same as cmd+click on obsidian)
obsidian -np myvault/file.md
I guess we could have also possibility to open file in any current pane
with using a number to refer it
1 = first pane from left, 2 = second pane from left, 3 = third pane from left and so on
So this would open it in 2nd pane from the left.
obsidian -p 2 myvault/file.md
Summary
I would just recommend looking how code and subl commands work and improve from my suggested approach from that point of view.
What do you think? Can some of this actually already implemented?
I know Obsidian itself can be opened in macOS with
open -a 'Obsidian'