Creating vault dynamically on the fly

Hello. Can I create a vault dynamically on the fly (from blank folder or folder with md-files) via command line and then open it in Obsidian? Is there any way to do that? Thanks.

I’m not sure I understand, but if you create new files/folders outside of Obsidian in a vault, then Obsidian will detect the new stuff automatically.

And if you’ve got a folder already with files, you can open that as a vault using open folder as vault option.

Do either of these solve your issue?

I seem to remember a very old thread about that. Someone was trying to generate a large number of vaults based on projects or something.

I am not aware of any built in ways to do this. All that defines a vault is the folder/files, and the .obsidian folder of settings.

So if you had a template vault, you could easily copy that via command line, and then name things appropriately. As one idea.

Opening it automatically in Obsidian? That I don’t know. You can open vaults via the Obsidian URI scheme. So if you generate a known name, you could likely use that. But the vault would likely have to be appended to the list of known vaults first. (Unless you can use a full path.)

I can’t understand, how to open vault via command line. How to make a shortcut.
steps:

  1. creating a template vault (from prepared empty folder), naming it (via script, it’s on my own)
  2. put in folder a bunch of md-files.
  3. run a command like “obsidian.exe -vault”.
    Can I do like that?

Have a look at the documentation for

and

Combining some scripting on your own and either of these, it seems doable.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.