Skip to content

Yetenol/Obsidian-CLI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Obsidian CLI

Download script List releases

Obsidian CLI is a command line interface to create, open and delete Obsidian vaults and to share settings, plugins and layouts between vaults.

Usage

  • Open folder as Obsidian vault
    Setup vault if none exists
    obsidian $path
  • Remove all trace of Obsidian
    Forget and cleanup file system changes
    obsidian $path -RemoveVault
  • reapply workplace layout
    Repair the vault
    obsidian $path -Force
  • right-click any folder in Windows Explorer and click Open as Obsidian vault

Features

  • 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

Build instructions

  • 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

Implementation

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published