Obsidian CLI is a command line interface to create, open and delete Obsidian vaults and to share settings, plugins and layouts between vaults.
- Open folder as Obsidian vault
Setup vault if none existsobsidian $path
- Remove all trace of Obsidian
Forget and cleanup file system changesobsidian $path -RemoveVault
- reapply workplace layout
Repair the vaultobsidian $path -Force
- right-click any folder in Windows Explorer and click Open as Obsidian vault
- synchronize settings and plugins between all vaults and via the cloud
- import the default workplace layout when creating new vaults.
- attachments will be placed into a separate folder
- templates can be created in separate folder
-
install dependency ps2exe using elevated command
Install-Module ps2exe
-
build an executable from the project folder
by packaging the Powershell scriptSet-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass Invoke-ps2exe -inputFile ".\obsidian.ps1" -outputFile ".\bin\obsidian.exe" -noConsole
-
add to PATH using elevated commands
$binaryPath = ".\bin" | Convert-Path -ErrorAction Stop $registryKey = 'HKLM:\System\CurrentControlSet\Control\Session Manager\Environment' $locations = $env:PATH -split ";" if ($locations -contains $binaryPath) { return } $locations + $binaryPath -join ";" | foreach { Set-ItemProperty -Path $registryKey -Name "PATH" -Value $_ }
-
add context menu entries
by importing Registry Keys
- create
.obsidian/
config folder with symbolic links to the global settings and plugins - hide and git ignore config folder
- insert
.obsidian/workspace.json
once to apply default workplace layout - create folders for templates and attachments
- open vault using Obsidian URI protokoll