A plugin for Obsidian
Advanced URI allows you to control many different features in Obsidian just by opening some URIs. Because they are just text and don't require any mouse clicks or keyboard inputs, they are perfect to automate your Obsidian workflow.
You can for example
- open files, workspaces, headings, blocks, lines, and settings
- open files in tabs, splits, windows, popovers, or silently in the background
- switch between reading, source, and live preview mode
- edit, overwrite, append, prepend, and create files
- append or prepend content to a specific heading, block, or line
- write clipboard content to notes, including daily notes
- open bookmarks
- automated search and replace in a file, including RegEx
- call Obsidian commands and plugin commands
- edit, read, and focus frontmatter properties
- navigate using file paths, file names, aliases, daily notes, or frontmatter UIDs
- create robust links that keep working after notes are renamed using ID in properties
- focus canvas nodes and control the canvas viewport
- open Obsidian settings, plugin settings, themes, and community plugin pages
- check whether a file exists, update community plugins, or enable/disable plugins
Please read the documentation for a detailed explanation.
- Open
Settings -> Community plugins. - Disable
Restricted mode. - Install Advanced URI.
If the link does not work, open Browse community plugins and search for Advanced URI.
- Enable the plugin.
- Download the latest release.
- Move
manifest.json,styles.cssandmain.jsto<vault>/.obsidian/plugins/obsidian-advanced-uri. - Reload Obsidian.
- Open
Settings -> Community pluginsand disableRestricted mode. - Enable
Advanced URI.
Advanced URI uses the obsidian://adv-uri URI scheme. You pass parameters in the query string to tell Obsidian what to do.
For example, to open Home Index/today.md, encode the file path and use it as filepath:
obsidian://adv-uri?filepath=Home%20Index%2Ftoday
You can launch these URIs in several ways:
- Enter them in your browser address bar.
- Use them in markdown links inside Obsidian.
- Open them from scripts or a terminal.
- Use the plugin's helper commands to copy generated URIs for files, daily notes, search and replace actions, commands, and canvas views.
Example markdown link:
[Open note](obsidian://adv-uri?filepath=Home%20Index%2Ftoday)Example terminal command on Linux:
xdg-open "obsidian://adv-uri?filepath=Home%20Index%2Ftoday"For parameter details, encoding rules, and more actions, see the full documentation.
obsidian://adv-uri?vault=<your-vault>&daily=true&clipboard=true&mode=append
obsidian://adv-uri?vault=<your-vault>&filepath=<your-file>&commandid=workspace%3Aexport-pdf
obsidian://adv-uri?vault=<your-vault>&filepath=my-file&heading=Goal
obsidian://adv-uri?vault=<your-vault>&filename=Brain%20Dumps
obsidian://adv-uri?vault=<your-vault>&daily=true&heading=Inbox&data=-%20New%20idea&mode=append
obsidian://adv-uri?vault=<your-vault>&filepath=my-file&openmode=silent
obsidian://adv-uri?vault=<your-vault>&filepath=Attachments&reveal=true
obsidian://adv-uri?vault=<your-vault>&settingid=editor&settingsection=Behavior
obsidian://adv-uri?vault=<your-vault>&filepath=my-file&exists=true
If you find this plugin useful and would like to support its development, you can support me on Ko-fi.