Obsidian Executable Link Setup
Section titled “Obsidian Executable Link Setup”Obsidian doesn’t natively execute external scripts from links, but you can create clickable links that run Windows commands using Advanced URI + Shell Commands plugins. This guide creates a link to run: uv run d:\FSS\Software\Utils\PythonUtils\generate_folder_structure.py 3.12
Prerequisites
Section titled “Prerequisites”- Obsidian installed on Windows
uvcommand available in your PATH (test first in PowerShell)- Vault name noted (replace “YourVaultName” below)
Step-by-Step Setup
Section titled “Step-by-Step Setup”1. Install Required Plugins
Section titled “1. Install Required Plugins”Settings → Community Plugins → Browse- Install "Advanced URI"- Install "Shell Commands"- Enable both plugins2. Test Your Command in Terminal
Section titled “2. Test Your Command in Terminal”Open PowerShell/Command Prompt:
uv run d:\FSS\Software\Utils\PythonUtils\generate_folder_structure.py 3✅ If it works → proceed
❌ If it fails → fix uv PATH first
3. Configure Shell Commands Plugin
Section titled “3. Configure Shell Commands Plugin”1. Settings → Shell Commands → Add New Command2. Command Name: "Generate Folder Structure"3. Command: `uv run d:\FSS\Software\Utils\PythonUtils\generate_folder_structure.py 3`4. Shell: `cmd` (Windows default)5. Working Directory: `d:\FSS\Software\Utils\PythonUtils` (or vault root)6. Save4. Find Your Command ID
Section titled “4. Find Your Command ID”1. Open Command Palette (Ctrl+P)2. Type "Generate Folder Structure"3. Right-click the command → "Developer: Reload without compiling" OR check plugin settings for "Copy Command ID"4. Note the ID (looks like: `obsidian-shellcommands:shell-command-123`)5. Create the Executable Link
Section titled “5. Create the Executable Link”Replace YourVaultName and YOUR_COMMAND_ID:
[🔄 Generate Folder Structure](obsidian://advanced-uri?vault=YourVaultName&commandid=YOUR_COMMAND_ID)Example with real values:
[🔄 Generate Folder Structure](obsidian://advanced-uri?vault="My Knowledge Vault"&commandid=obsidian-shellcommands%3Ashell-command-99)6. Test the Link
Section titled “6. Test the Link”- Paste link into any Obsidian note
- Click it while Obsidian is open
- Script should execute automatically
Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
uv: command not found | Use full path: "C:\Users\YourName\.cargo\bin\uv.exe" run ... |
| Nothing happens on click | Check command ID is URL-encoded (: → %3A, / → %2F) |
| Script fails silently | Enable “Show in terminal” in Shell Commands settings |
| Path with spaces | Wrap entire path in quotes: uv run "d:\path with spaces\script.py" 3 |
Security Warning ⚠️
Section titled “Security Warning ⚠️”- Links execute code on your machine
- Only use in trusted vaults
- Review commands before clicking
- Disable plugins when sharing vaults
Alternative: Shell Commands Direct URI
Section titled “Alternative: Shell Commands Direct URI”Shell Commands plugin often provides its own URI format:
obsidian://shellcommands/execute?command=Generate%20Folder%20StructureCheck plugin settings for “Copy URI” button.
Pro Tips
Section titled “Pro Tips”Pass dynamic arguments: Some command plugins support ${file}, ${selection} variables
Multiple scripts: Create separate commands for each script
Keyboard shortcut: Bind command to hotkey via Command Palette
Created: March 31, 2026 | Compatible with Obsidian v1.6+ and latest plugins 213
Save this as obsidian-executable-link-setup.md for your Obsidian vault!