Open folders as vaults from the CLI

Use case or problem

Open folders via CLI that do not contain .obsidian folders in them or are not yet registered in ./config/obsidian/obsidian.json as a vault ( These are folders not opened via the GUI greeting screen )

**this also applies to opening folders via CLI in general

Proposed solution

In order to open a vault using uri callbacks ( Which is currently broken in Linux, and does not function correctly ) you must use xdg-open to get the callback to behave correctly.

You also need to have the vault defined in ./config/obsidian/obsidian.json with the vault name, vault path, a random ID, and a unix timestamp.

these are all you need to be able to open a vault via uri callbacks. I think it would be a great idea and help people if there was an implementation of a simple command like ā€˜obsidian ā€œ/path/to/folderā€ā€™ to initialize and open a vault. Otherwise, itā€™s almost undocumented and impossible to get to workā€¦ and when you do, it has to be a vault that was already opened via the GUIā€¦

Current workaround (optional)

using xdg-open to get callback uri to work

Related feature requests (optional)

I have seen many people post asking for help with this. I also recently needed the feature for a project.

1 Like

Three FRs that look similar and could probably be merged into one or two:

Iā€™ll have a good read-through later when Iā€™m at my desk to see if they are all indeed asking for the same thing or not.

1 Like

Thank you for replying and showing attention to these requests.

Just following up on this, had someone in the discord with a project and requesting this feature.

Thank you for your time.

Related issue: Open vault from command line using path not name or id

Consolidated into