How can I explore obsidian's API through the javascript console? What's available and what maps to the API documentation?

For context, from the gems, I tried Obsidian: Archive current file and then open next file in folder (Templater script) · GitHub which archives/moves a note then moves to the next note in the folder, which is great for processing, but it’s really slow to bring up the file dialog. File explorer has a “Move file” action that is much faster in bringing in the dialog. I was wondering how hard it would be to write a JS template to replace the above one that gets the list of files in the current directory, invokes Move file from File explorer, and then move the file explorer to the next file.

I’ve been looking for a guide that explains how to use obsidian’s console to access internals, but the API guide is really just the source code for the interface with very little documentation to guide you. I can’t tell how I’d get access to functionality from specific components. If someone has followed a good starting guide to exploring the API or the console, can you point me to it?

1 Like