Obsidian CLI is a command line interface to create, open and delete Obsidian vaults and to share settings, plugins and layouts between vaults.
obsidian $path
obsidian $path -RemoveVault
obsidian $path -Force
install dependency ps2exe using elevated command
Install-Module ps2exe
build an executable from the project folder
by packaging the Powershell script
Set-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
.obsidian/
config folder with symbolic links to the global settings and plugins.obsidian/workspace.json
once to apply default workplace layout