obsidian-cli
obsidian-cli copied to clipboard
"obs ." to open the current directory
Is your feature request related to a problem? Please describe. I'm frustrated by how slow and inconvenient it is to open vaults through the GUI
Describe the solution you'd like "obs ." to open the current directory as a vault
Thank you for the feedback! This is not currently in scope of the tool as its purpose is to open vaults which are already recognise by Obsidian (the tool reads from the Obsidian config itself which stores vault path). I am also taking a break from adding features to this tool (I am happy to do bug fixes if raised) so I will tag this as a feature request for the future.
Can you point me maybe to where I would need to edit code to do it myself? Or can you imagine an approach?
Obsidian-cli interacts with notes using Obsidian URI (besides moving and deleting which is handled separately), but this requires the obsidian config (managed by Obsidian) to have the vault already declared as the tool reads from this file.
Obsidian automatically adds a vault to the config once you open a folder with it. But if you want to open a folder which is not in the config, then you would need to add it somehow. Maybe this can be done by editing the Obsidian config and adding the current directory as a vault. Although this seems prone to errors, we shouldn't really write to this config, currently the tool only reads from it and writes another file for its own use. I think you'd need to investigate how to approach this as I can't think of a good solution from the top of my head. Once its added, then opening it would be quite simple, using already existing functionality in this file.