### Install Community Theme Source: https://obsidian.md/help/cli Installs a theme from the community repository. Can optionally enable the theme immediately after installation. ```cli name= # (required) theme name enable # activate after install ``` -------------------------------- ### Task Update Examples Source: https://obsidian.md/help/cli Provides examples for showing, toggling, and setting the status of tasks using the `task` command. ```cli # Show task info task file=Recipe line=8 task ref="Recipe.md:8" # Toggle task completion task ref="Recipe.md:8" toggle # Toggle task in daily note task daily line=3 toggle # Set task status task file=Recipe line=8 done # → [x] task file=Recipe line=8 todo # → [ ] task file=Recipe line=8 status=-" # → [-] task daily line=3 done # Mark daily note task as done ``` -------------------------------- ### Install Community Plugin Source: https://obsidian.md/help/cli Installs a community plugin using its ID. Optionally enables the plugin immediately after installation. ```cli id= # (required) plugin ID enable # enable after install ``` -------------------------------- ### Install Obsidian Headless Source: https://obsidian.md/help/headless Install the Obsidian Headless client globally using npm. Requires Node.js 22 or later. ```bash npm install -g obsidian-headless ``` -------------------------------- ### List Themes Source: https://obsidian.md/help/cli Lists installed themes. Can optionally include version numbers. ```cli versions # include version numbers ``` -------------------------------- ### List Installed Plugins Source: https://obsidian.md/help/cli Lists all installed plugins, with an option to filter by type (core or community). Can include version numbers and specify output format. ```cli filter=core|community # filter by plugin type versions # include version numbers format=json|tsv|csv # output format (default: tsv) ``` -------------------------------- ### Task Management Examples Source: https://obsidian.md/help/cli Demonstrates various ways to list and manage tasks using the `tasks` command, including filtering, sorting, and verbose output. ```cli # List all tasks in the vault tasks # List incomplete tasks in the vault tasks todo # List completed tasks from a specific file tasks file=Recipe done # List tasks from today's daily note tasks daily # Count tasks in daily note tasks daily total # List tasks with file paths and line numbers tasks verbose # Filter by custom status (quote special chars) tasks 'status=?'' ``` -------------------------------- ### Get Plugin Information Source: https://obsidian.md/help/cli Retrieves detailed information about a specific plugin using its ID. ```cli id= # (required) plugin ID ``` -------------------------------- ### Get File Information Source: https://obsidian.md/help/cli Retrieves information about a specific file, such as its name, path, extension, size, and timestamps. Defaults to the active file if no file is specified. ```cli file= # file name path= # file path ``` ```cli path Notes/Recipe.md name Recipe extension md size 1024 created 1700000000000 modified 1700001000000 ``` -------------------------------- ### Get Folder Information Source: https://obsidian.md/help/cli Displays information about a specified folder. You can choose to retrieve details about its files, subfolders, or total size. ```cli path= # (required) folder path info=files|folders|size # return specific info only ``` -------------------------------- ### Uninstall Theme Source: https://obsidian.md/help/cli Uninstalls a previously installed theme from the vault. ```cli name= # (required) theme name ``` -------------------------------- ### Getting Hotkey for a Command Source: https://obsidian.md/help/cli Requires the 'id' parameter for the command ID. Optionally show if the hotkey is custom or default. ```bash id= # (required) command ID verbose # show if custom or default ``` -------------------------------- ### List Tags with Counts Source: https://obsidian.md/help/cli Get a list of all tags used in your vault, along with the count of notes associated with each tag. ```bash # List all tags in your vault with counts obsidian tags counts ``` -------------------------------- ### Get Tag Information Source: https://obsidian.md/help/cli Retrieves information about a specific tag, including its occurrence count and optionally a list of files containing the tag. ```cli name= # (required) tag name total # return occurrence count verbose # include file list and count ``` -------------------------------- ### List Properties in Vault Source: https://obsidian.md/help/cli Lists properties in the vault. Can filter by file, show properties for the active file, or get counts and sort results. ```bash file= # show properties for file ``` ```bash path= # show properties for path ``` ```bash name= # get specific property count ``` ```bash sort=count # sort by count (default: name) ``` ```bash format=yaml|json|tsv # output format (default: yaml) ``` ```bash total # return property count ``` ```bash counts # include occurrence counts ``` ```bash active # show properties for active file ``` -------------------------------- ### Create Note and Open, Overwrite Existing Source: https://obsidian.md/help/cli Create a new note, open it immediately after creation, and overwrite it if a file with the same name already exists. This demonstrates the use of boolean flags. ```bash # Create a note and open it obsidian create name=Note content="Hello" open overwrite ``` -------------------------------- ### Copy and Make Obsidian CLI Executable on Linux Source: https://obsidian.md/help/cli Manually copy the Obsidian CLI binary to ~/.local/bin and set execute permissions if it is missing on Linux. ```bash cp /path/to/Obsidian/obsidian-cli ~/.local/bin/obsidian chmod 755 ~/.local/bin/obsidian ``` -------------------------------- ### Create or Overwrite File Source: https://obsidian.md/help/cli Creates a new file or overwrites an existing one. Allows setting initial content, using a template, and optionally opening the file after creation. ```cli name= # file name path= # file path content= # initial content template= # template to use overwrite # overwrite if file exists open # open file after creating newtab # open in new tab ``` -------------------------------- ### Show Theme Info Source: https://obsidian.md/help/cli Displays information about the currently active theme or a specific theme by name. ```cli name= # theme name for details ``` -------------------------------- ### Open Obsidian CLI TUI and Run Help Source: https://obsidian.md/help/cli Launch the Obsidian CLI's terminal user interface (TUI) and then execute the help command within it. The TUI offers interactive features like autocomplete and command history. ```bash # Open the TUI, then run help obsidian help ``` -------------------------------- ### Run Obsidian CLI Help Command Source: https://obsidian.md/help/cli Execute the help command to see available Obsidian CLI commands without opening the TUI. ```bash # Run the help command obsidian help ``` -------------------------------- ### Create Note with Name and Content Source: https://obsidian.md/help/cli Create a new note with a specified name and content. If the content contains spaces, it must be enclosed in quotes. ```bash # Create a new note called "Note" with content "Hello world" obsidian create name=Note content="Hello world" ``` -------------------------------- ### Check Obsidian CLI Binary on Linux Source: https://obsidian.md/help/cli Verify that the Obsidian CLI binary exists in the ~/.local/bin directory on Linux. ```bash ls -l ~/.local/bin/obsidian ``` -------------------------------- ### Compare File Versions Source: https://obsidian.md/help/cli Compare two specific versions of a file. Replace 'README' with the file name and adjust 'from' and 'to' versions as needed. ```bash # Compare two versions of a file obsidian diff file=README from=1 to=3 ``` -------------------------------- ### Open Today's Daily Note Source: https://obsidian.md/help/cli Quickly open the daily note for the current day using the CLI. ```bash # Open today's daily note obsidian daily ``` -------------------------------- ### Targeting a File with Obsidian CLI Source: https://obsidian.md/help/cli Demonstrates equivalent ways to target a specific file using 'file' or 'path' parameters. Ensure the file name is unique when using 'file'. ```bash # These are equivalent if "Recipe.md" is the only file with that name obsidian read file=Recipe obsidian read path="Templates/Recipe.md" ``` -------------------------------- ### Creating a New Base Item Source: https://obsidian.md/help/cli Parameters for creating a new item in a base file. Defaults to the active base view if no file is specified. Options include specifying file, path, view, name, content, and how to open the file. ```bash file= # base file name path= # base file path view= # view name name= # new file name content= # initial content open # open file after creating newtab # open in new tab ``` -------------------------------- ### Open Developer Tools Source: https://obsidian.md/help/cli Launch Obsidian's developer tools directly from the command line. This is useful for debugging plugins and themes. ```bash # Open developer tools obsidian devtools ``` -------------------------------- ### Listing Hotkeys Source: https://obsidian.md/help/cli Options for listing hotkeys. Can return the total count, show if a hotkey is custom, and specify the output format. ```bash total # return hotkey count verbose # show if hotkey is custom format=json|tsv|csv # output format (default: tsv) ``` -------------------------------- ### Take Screenshot Source: https://obsidian.md/help/cli Takes a screenshot and returns it as a base64 PNG. Specify the output file path. ```bash path= # output file path ``` -------------------------------- ### Create Unique Note Source: https://obsidian.md/help/cli Creates a new unique note with optional initial content and specifies how it should be opened. Can also open the file after creation. ```cli name= # note name content= # initial content paneType=tab|split|window # pane type to open in open # open file after creating ``` -------------------------------- ### Listing Bookmarks Source: https://obsidian.md/help/cli Options for listing bookmarks. Can return the total count or include bookmark types and specify the output format. ```bash total # return bookmark count verbose # include bookmark types format=json|tsv|csv # output format (default: tsv) ``` -------------------------------- ### Create New Note with Default Name Source: https://obsidian.md/help/cli Create a new note using the default 'Untitled' name. This command demonstrates the use of a command without required parameters. ```bash # Create a new note using the default "Untitled" name obsidian create ``` -------------------------------- ### Show Workspace Tree Source: https://obsidian.md/help/cli Displays the workspace tree, with an option to include item IDs. ```bash ids # include workspace item IDs ``` -------------------------------- ### search:open Source: https://obsidian.md/help/cli Opens the search view in Obsidian with an initial search query. ```APIDOC ## search:open ### Description Open search view. ### Parameters #### Query Parameters - **query** (string) - Optional - The initial search query to populate the search view with. ``` -------------------------------- ### sync:open Source: https://obsidian.md/help/cli Opens the sync history view for a file in Obsidian. Defaults to the active file. ```APIDOC ## sync:open ### Description Open sync history (default: active file). ### Parameters #### Query Parameters - **file** (string) - Optional - The name of the file to open sync history for. - **path** (string) - Optional - The path of the file to open sync history for. ``` -------------------------------- ### Prepend Content to File Source: https://obsidian.md/help/cli Prepends specified content to the beginning of a file, after the frontmatter. Supports prepending without a preceding newline. ```cli file= # file name path= # file path content= # (required) content to prepend inline # prepend without newline ``` -------------------------------- ### Open File Source: https://obsidian.md/help/cli Opens a specified file in Obsidian. Can be configured to open in a new tab. ```cli file= # file name path= # file path newtab # open in new tab ``` -------------------------------- ### List Tasks from Daily Note Source: https://obsidian.md/help/cli Retrieve and display all tasks listed in your daily note. ```bash # List all tasks from your daily note obsidian tasks daily ``` -------------------------------- ### Adding a Bookmark Source: https://obsidian.md/help/cli Parameters for adding a bookmark. Can bookmark a file, subpath, folder, search query, or URL, and allows specifying a custom title. ```bash file= # file to bookmark subpath= # subpath (heading or block) within file folder= # folder to bookmark search= # search query to bookmark url= # URL to bookmark title= # bookmark title ``` -------------------------------- ### List Sync Version History for a File Source: https://obsidian.md/help/cli Lists the version history for a specified file, defaulting to the active file. Can return the total count of versions. ```bash file=<name> # file name ``` ```bash path=<path> # file path ``` ```bash total # return version count ``` -------------------------------- ### Open New Tab Source: https://obsidian.md/help/cli Opens a new tab, optionally specifying the group ID, file path, and view type. ```bash group=<id> # tab group ID file=<path> # file to open view=<type> # view type to open ``` -------------------------------- ### List Templates Source: https://obsidian.md/help/cli Lists available templates in the vault. Can return the total count of templates. ```cli total # return template count ``` -------------------------------- ### Create New Note from Template Source: https://obsidian.md/help/cli Generate a new note using a specified template. Replace 'Travel' with the name of your desired template. ```bash # Create a new note from a template obsidian create name="Trip to Paris" template=Travel ``` -------------------------------- ### Take Screenshot Source: https://obsidian.md/help/cli Capture a screenshot of the Obsidian application and save it to a specified path. Ensure the path is valid. ```bash # Take a screenshot of the app obsidian dev:screenshot path=screenshot.png ``` -------------------------------- ### publish:open Source: https://obsidian.md/help/cli Opens a published file in the browser. Defaults to the active file. ```APIDOC ## publish:open ### Description Open file on published site (default: active file). ### Parameters #### Query Parameters - **file** (string) - Optional - The name of the file to open. - **path** (string) - Optional - The path of the file to open. ``` -------------------------------- ### publish:add Source: https://obsidian.md/help/cli Publishes a file or all changed files to Obsidian Publish. Defaults to the active file. ```APIDOC ## publish:add ### Description Publish a file or all changed files (default: active file). ### Parameters #### Query Parameters - **file** (string) - Optional - The name of the file to publish. - **path** (string) - Optional - The path of the file to publish. - **changed** (boolean) - Optional - Publish all changed files. ``` -------------------------------- ### Create Note with Multiline Content Source: https://obsidian.md/help/cli Create a note with content that spans multiple lines. Use '\n' for newlines and '\t' for tabs to format the content. ```bash obsidian create name=Note content="# Title\n\nBody text" ``` -------------------------------- ### Open Search View Source: https://obsidian.md/help/cli Opens the Obsidian search view, optionally pre-filled with an initial search query. ```bash query=<text> # initial search query ``` -------------------------------- ### Create Obsidian CLI Symlink on macOS Source: https://obsidian.md/help/cli Manually create a symlink for the Obsidian CLI if it is missing on macOS. This requires administrator privileges. ```bash sudo ln -sf /Applications/Obsidian.app/Contents/MacOS/obsidian-cli /usr/local/bin/obsidian ``` -------------------------------- ### property:set Source: https://obsidian.md/help/cli Sets a property on a file. Defaults to the active file if no file is specified. ```APIDOC ## property:set ### Description Set a property on a file (default: active file). ### Parameters #### Query Parameters - **name** (string) - Required - The name of the property to set. - **value** (string) - Required - The value of the property. - **type** (string) - Optional - The type of the property. Allowed values: `text`, `list`, `number`, `checkbox`, `date`, `datetime`. - **file** (string) - Optional - The name of the file to set the property on. - **path** (string) - Optional - The path of the file to set the property on. ``` -------------------------------- ### Run Chrome DevTools Protocol Command Source: https://obsidian.md/help/cli Executes a specified Chrome DevTools Protocol method with optional JSON parameters. ```bash method=<CDP.method> # (required) CDP method to call params=<json> # method parameters as JSON ``` -------------------------------- ### Enable CSS Snippet Source: https://obsidian.md/help/cli Enables a specific CSS snippet, applying its styles to Obsidian. ```cli name=<name> # (required) snippet name ``` -------------------------------- ### Show Outline Headings Source: https://obsidian.md/help/cli Displays the headings structure for a given file. Supports different output formats (tree, markdown, JSON) and can return the total heading count. ```cli file=<name> # file name path=<path> # file path format=tree|md|json # output format (default: tree) total # return heading count ``` -------------------------------- ### List Published Files on Obsidian Publish Source: https://obsidian.md/help/cli Lists all files currently published on your Obsidian Publish site. Can return the total count of published files. ```bash total # return published file count ``` -------------------------------- ### Show or Update a Task Source: https://obsidian.md/help/cli Displays information about a specific task or allows updating its status. Tasks can be referenced by file and line number, or a unique reference string. ```cli ref=<path:line> # task reference (path:line) file=<name> # file name path=<path> # file path line=<n> # line number status="<char>" # set status character toggle # toggle task status daily # daily note done # mark as done todo # mark as todo ``` -------------------------------- ### List Recent Files Source: https://obsidian.md/help/cli Lists recently opened files, with an option to return the total count. ```bash total # return recent file count ``` -------------------------------- ### Prepending Content to Daily Note Source: https://obsidian.md/help/cli Prepends specified content to the daily note. Options include prepending inline, opening the file after, and specifying the pane type. ```bash content=<text> # (required) content to prepend paneType=tab|split|window # pane type to open in inline # prepend without newline open # open file after adding ``` -------------------------------- ### publish:list Source: https://obsidian.md/help/cli Lists all files that have been published to Obsidian Publish. ```APIDOC ## publish:list ### Description List published files. ### Parameters #### Query Parameters - **total** (boolean) - Optional - Return the total count of published files. ``` -------------------------------- ### Querying a Base File Source: https://obsidian.md/help/cli Parameters for querying a base file. Supports specifying the base file, view, and output format. ```bash file=<name> # base file name path=<path> # base file path view=<name> # view name to query format=json|csv|tsv|md|paths # output format (default: json) ``` -------------------------------- ### Insert Template Source: https://obsidian.md/help/cli Inserts a specified template into the currently active file. ```cli name=<template> # (required) template name ``` -------------------------------- ### Show Obsidian Publish Site Info Source: https://obsidian.md/help/cli Displays information about your Obsidian Publish site, including its slug and URL. -------------------------------- ### Log in to Obsidian Headless Source: https://obsidian.md/help/headless Log in to your Obsidian account using the command line. Credentials can be provided interactively or via flags. Supports multi-factor authentication. ```bash ob login ``` ```bash ob login [--email <email>] [--password <password>] [--mfa <code>] ``` -------------------------------- ### Opening Daily Note in Different Panes Source: https://obsidian.md/help/cli Specifies the pane type (tab, split, or window) in which to open the daily note. ```bash paneType=tab|split|window # pane type to open in ``` -------------------------------- ### Check Obsidian CLI Symlink on macOS Source: https://obsidian.md/help/cli Verify that the symlink for the Obsidian CLI exists at the standard location on macOS. ```bash ls -l /usr/local/bin/obsidian ``` -------------------------------- ### Execute JavaScript Source: https://obsidian.md/help/cli Executes arbitrary JavaScript code and returns the result. ```bash code=<javascript> # (required) JavaScript code to execute ``` -------------------------------- ### Save Current Workspace Source: https://obsidian.md/help/cli Saves the current layout as a workspace with a specified name. ```bash name=<name> # workspace name ``` -------------------------------- ### Publish File or Changes Source: https://obsidian.md/help/cli Publishes a specific file or all changed files to Obsidian Publish. Defaults to publishing the active file. ```bash file=<name> # file name ``` ```bash path=<path> # file path ``` ```bash changed # publish all changed files ``` -------------------------------- ### sync:read Source: https://obsidian.md/help/cli Reads a specific version of a file from Obsidian Sync. Defaults to the active file. ```APIDOC ## sync:read ### Description Read a sync version (default: active file). ### Parameters #### Query Parameters - **file** (string) - Optional - The name of the file to read. - **path** (string) - Optional - The path of the file to read. - **version** (integer) - Required - The version number to read. ``` -------------------------------- ### List Outgoing Links Source: https://obsidian.md/help/cli Lists all outgoing links from a specified file. Supports returning just the total count of links. ```cli file=<name> # file name path=<path> # file path total # return link count ``` -------------------------------- ### Load Saved Workspace Source: https://obsidian.md/help/cli Loads a previously saved workspace by its name. The name is a required parameter. ```bash name=<name> # (required) workspace name ``` -------------------------------- ### Toggle Mobile Emulation Source: https://obsidian.md/help/cli Toggles mobile emulation mode on or off. ```bash on # enable mobile emulation off # disable mobile emulation ``` -------------------------------- ### Toggle Developer Tools Source: https://obsidian.md/help/cli Toggles the Electron developer tools for debugging. ```bash devtools ``` -------------------------------- ### List Saved Workspaces Source: https://obsidian.md/help/cli Lists saved workspaces, with an option to return the total count. ```bash total # return workspace count ``` -------------------------------- ### Enable a Plugin Source: https://obsidian.md/help/cli Enables a specific plugin using its ID. Can filter by plugin type (core or community). ```cli id=<id> # (required) plugin ID filter=core|community # plugin type ``` -------------------------------- ### Read Template Content Source: https://obsidian.md/help/cli Reads the content of a specified template. Supports resolving template variables like date, time, and title. ```cli name=<template> # (required) template name title=<title> # title for variable resolution resolve # resolve template variables ``` -------------------------------- ### Read a Random Note with Path Source: https://obsidian.md/help/cli Reads and returns the content and path of a random note. Can limit the search to a specific folder. ```bash folder=<path> # limit to folder ``` -------------------------------- ### List Orphaned Files Source: https://obsidian.md/help/cli Lists files that have no incoming links. Supports returning just the total count of orphaned files. ```cli total # return orphan count ``` -------------------------------- ### Add ~/.local/bin to PATH on Linux Source: https://obsidian.md/help/cli Ensure the ~/.local/bin directory is included in your system's PATH environment variable on Linux. Add this line to your .bashrc or .zshrc file. ```bash export PATH="$PATH:$HOME/.local/bin" ``` -------------------------------- ### Set Property on a File Source: https://obsidian.md/help/cli Sets a property on a specified file or the active file. Requires property name and value, and optionally accepts type and file/path. ```bash name=<name> # (required) property name ``` ```bash value=<value> # (required) property value ``` ```bash type=text|list|number|checkbox|date|datetime # property type ``` ```bash file=<name> # file name ``` ```bash path=<path> # file path ``` -------------------------------- ### publish:site Source: https://obsidian.md/help/cli Shows information about the Obsidian Publish site, including its slug and URL. ```APIDOC ## publish:site ### Description Show publish site info (slug, URL). ``` -------------------------------- ### sync:restore Source: https://obsidian.md/help/cli Restores a specific version of a file from Obsidian Sync. Defaults to the active file. ```APIDOC ## sync:restore ### Description Restore a sync version (default: active file). ### Parameters #### Query Parameters - **file** (string) - Optional - The name of the file to restore. - **path** (string) - Optional - The path of the file to restore. - **version** (integer) - Required - The version number to restore. ``` -------------------------------- ### Read File Contents Source: https://obsidian.md/help/cli Reads and displays the content of a specified file. Defaults to the active file if no file is specified. ```cli file=<name> # file name path=<path> # file path ``` -------------------------------- ### Copying Command Output to Clipboard Source: https://obsidian.md/help/cli Append the `--copy` flag to any command to automatically copy its output to the system clipboard. ```bash read --copy search query="TODO" --copy ``` -------------------------------- ### List Files in Vault Source: https://obsidian.md/help/cli Lists all files within the Obsidian vault. Supports filtering by folder path and file extension. Can also return just the total count of files. ```cli folder=<path> # filter by folder ext=<extension> # filter by extension total # return file count ``` -------------------------------- ### Open URL in Web Viewer Source: https://obsidian.md/help/cli Opens a specified URL within Obsidian's built-in web viewer. Can also open the URL in a new tab. ```cli url=<url> # (required) URL to open newtab # open in new tab ``` -------------------------------- ### sync Source: https://obsidian.md/help/cli Pauses or resumes Obsidian Sync. ```APIDOC ## sync ### Description Pause or resume sync. ### Parameters #### Query Parameters - **on** (boolean) - Optional - Resume sync. - **off** (boolean) - Optional - Pause sync. ``` -------------------------------- ### List Backlinks Source: https://obsidian.md/help/cli Lists all backlinks pointing to a specific file. Supports including link counts, total counts, and custom output formats. ```cli file=<name> # target file name path=<path> # target file path counts # include link counts total # return backlink count format=json|tsv|csv # output format (default: tsv) ``` -------------------------------- ### Diffing File Versions Source: https://obsidian.md/help/cli Commands for comparing versions of a file using local File recovery and Sync. Allows specifying files, version ranges, and filtering by source (local or sync). ```bash # List all versions of the active file diff # List all versions of a specific file diff file=Recipe # Compare the latest version to the current file diff file=Recipe from=1 # Compare two versions diff file=Recipe from=2 to=1 # Only show Sync versions diff filter=sync ``` ```bash file=<name> # file name path=<path> # file path from=<n> # version number to diff from to=<n> # version number to diff to filter=local|sync # filter by version source ``` -------------------------------- ### search:context Source: https://obsidian.md/help/cli Searches the vault with matching line context, returning grep-style output. ```APIDOC ## search:context ### Description Search with matching line context. Returns grep-style `path:line: text` output. ### Parameters #### Query Parameters - **query** (string) - Required - The search query text. - **path** (string) - Optional - Limit the search to this folder. - **limit** (integer) - Optional - Maximum number of files to return. - **format** (string) - Optional - Output format. Allowed values: `text`, `json`. - **case** (boolean) - Optional - Perform a case-sensitive search. ``` -------------------------------- ### sync:status Source: https://obsidian.md/help/cli Shows the current status and usage information for Obsidian Sync. ```APIDOC ## sync:status ### Description Show sync status and usage. ``` -------------------------------- ### List Open Tabs Source: https://obsidian.md/help/cli Lists currently open tabs, with an option to include tab IDs. ```bash ids # include tab IDs ``` -------------------------------- ### sync:history Source: https://obsidian.md/help/cli Lists the version history for a specific file in Obsidian Sync. Defaults to the active file. ```APIDOC ## sync:history ### Description List sync version history for a file (default: active file). ### Parameters #### Query Parameters - **file** (string) - Optional - The name of the file to list version history for. - **path** (string) - Optional - The path of the file to list version history for. - **total** (boolean) - Optional - Return the total count of versions. ``` -------------------------------- ### Search with Line Context Source: https://obsidian.md/help/cli Searches the vault for a query and returns results with matching line context in a grep-style format. Supports folder limits, count limits, and case sensitivity. ```bash query=<text> # (required) search query ``` ```bash path=<folder> # limit to folder ``` ```bash limit=<n> # max files ``` ```bash format=text|json # output format (default: text) ``` ```bash case # case sensitive ``` -------------------------------- ### List Deleted Files in Sync Source: https://obsidian.md/help/cli Lists files that have been deleted within Obsidian Sync. Can return the total count of deleted files. ```bash total # return deleted file count ``` -------------------------------- ### sync:deleted Source: https://obsidian.md/help/cli Lists files that have been deleted in Obsidian Sync. ```APIDOC ## sync:deleted ### Description List deleted files in sync. ### Parameters #### Query Parameters - **total** (boolean) - Optional - Return the total count of deleted files. ``` -------------------------------- ### Reading a Local History Version Source: https://obsidian.md/help/cli Parameters for reading a specific version of a file from local history. Requires file name and path, and optionally a version number. ```bash file=<name> # file name path=<path> # file path version=<n> # version number (default: 1) ``` -------------------------------- ### Log out of Obsidian Headless Source: https://obsidian.md/help/headless Log out of your Obsidian account and clear stored credentials from the command-line client. ```bash ob logout ``` -------------------------------- ### Pause or Resume Sync Source: https://obsidian.md/help/cli Controls Obsidian Sync. Use 'on' to resume and 'off' to pause sync operations. ```bash on # resume sync ``` ```bash off # pause sync ``` -------------------------------- ### Executing an Obsidian Command Source: https://obsidian.md/help/cli Requires the 'id' parameter to specify the command ID to execute. ```bash id=<command-id> # (required) command ID to execute ``` -------------------------------- ### Read Active File Content Source: https://obsidian.md/help/cli Display the content of the currently active file in Obsidian via the CLI. ```bash # Read the active file obsidian read ``` -------------------------------- ### Inspect CSS with Source Locations Source: https://obsidian.md/help/cli Inspects CSS using a CSS selector, with an option to filter by property name. ```bash selector=<css> # (required) CSS selector prop=<name> # filter by property name ``` -------------------------------- ### Set Active Theme Source: https://obsidian.md/help/cli Sets the active theme for Obsidian. Can be used to set a specific theme or revert to the default. ```cli name=<name> # (required) theme name (empty for default) ``` -------------------------------- ### properties Source: https://obsidian.md/help/cli Lists properties in the vault. Supports filtering by file, sorting, and different output formats. ```APIDOC ## properties ### Description List properties in the vault. Use `active` or `file`/`path` to show properties for a specific file. ### Parameters #### Query Parameters - **file** (string) - Optional - Show properties for the specified file. - **path** (string) - Optional - Show properties for the specified path. - **name** (string) - Optional - Get the count for a specific property name. - **sort** (string) - Optional - Sort the properties by count. Allowed values: `count`. - **format** (string) - Optional - Output format. Allowed values: `yaml`, `json`, `tsv`. - **total** (boolean) - Optional - Return the total count of properties. - **counts** (boolean) - Optional - Include occurrence counts for each property. - **active** (boolean) - Optional - Show properties for the currently active file. ``` -------------------------------- ### List Publish Changes Source: https://obsidian.md/help/cli Shows changes made to files that are relevant to Obsidian Publish. Can filter to show only new, changed, or deleted files. ```bash total # return change count ``` ```bash new # show new files only ``` ```bash changed # show changed files only ``` ```bash deleted # show deleted files only ``` -------------------------------- ### search Source: https://obsidian.md/help/cli Searches the vault for a given query and returns matching file paths. Supports limiting results and case sensitivity. ```APIDOC ## search ### Description Search vault for text. Returns matching file paths. ### Parameters #### Query Parameters - **query** (string) - Required - The search query text. - **path** (string) - Optional - Limit the search to this folder. - **limit** (integer) - Optional - Maximum number of files to return. - **format** (string) - Optional - Output format. Allowed values: `text`, `json`. - **total** (boolean) - Optional - Return the total count of matches. - **case** (boolean) - Optional - Perform a case-sensitive search. ``` -------------------------------- ### List Tags in Vault Source: https://obsidian.md/help/cli Lists all tags in the vault. Options include filtering by file, sorting, including counts, and specifying output format. ```cli file=<name> # file name path=<path> # file path sort=count # sort by count (default: name) total # return tag count counts # include tag counts format=json|tsv|csv # output format (default: tsv) active # show tags for active file ``` -------------------------------- ### Add Task to Daily Note Source: https://obsidian.md/help/cli Append a new task to your daily note. This is useful for quickly adding to-dos. ```bash # Add a task to your daily note obsidian daily:append content="- [ ] Buy groceries" ``` -------------------------------- ### List Folders in Vault Source: https://obsidian.md/help/cli Lists all folders within the Obsidian vault. Can filter by a parent folder to show only its direct subfolders. Supports returning just the total count of folders. ```cli folder=<path> # filter by parent folder total # return folder count ``` -------------------------------- ### Opening File Recovery Source: https://obsidian.md/help/cli Opens the file recovery interface. Can optionally target a specific file by name and path. ```bash file=<name> # file name path=<path> # file path ``` -------------------------------- ### List Aliases in Vault Source: https://obsidian.md/help/cli Lists aliases in the vault. Can filter by a specific file using 'file' or 'path', or show aliases for the active file using 'active'. ```bash file=<name> # file name ``` ```bash path=<path> # file path ``` ```bash total # return alias count ``` ```bash verbose # include file paths ``` ```bash active # show aliases for active file ``` -------------------------------- ### Appending Content to Daily Note Source: https://obsidian.md/help/cli Appends specified content to the daily note. Options include appending inline, opening the file after, and specifying the pane type. ```bash content=<text> # (required) content to append paneType=tab|split|window # pane type to open in inline # append without newline open # open file after adding ``` -------------------------------- ### Show Vault Information Source: https://obsidian.md/help/cli Displays information about the current vault. Can be filtered to show specific details like name, path, file count, folder count, or size. ```cli info=name|path|files|folders|size # return specific info only ``` -------------------------------- ### Restoring a Local History Version Source: https://obsidian.md/help/cli Restores a specific version of a file from local history. Requires file name, path, and the version number to restore. ```bash file=<name> # file name path=<path> # file path version=<n> # (required) version number ``` -------------------------------- ### List Tasks in Vault Source: https://obsidian.md/help/cli Lists tasks within the vault. Supports filtering by file, status, and showing only completed or incomplete tasks. Can also display tasks from the daily note. ```cli file=<name> # filter by file name path=<path> # filter by file path status="<char>" # filter by status character total # return task count done # show completed tasks todo # show incomplete tasks verbose # group by file with line numbers format=json|tsv|csv # output format (default: text) active # show tasks for active file daily # show tasks from daily note ``` -------------------------------- ### Uninstall a Community Plugin Source: https://obsidian.md/help/cli Use this command to uninstall a specific community plugin by its ID. ```bash id=<id> # (required) plugin ID ``` -------------------------------- ### List Dead-End Files Source: https://obsidian.md/help/cli Lists files that have no outgoing links. Supports returning just the total count of dead-end files. ```cli total # return dead-end count ``` -------------------------------- ### Toggle Restricted Mode Source: https://obsidian.md/help/cli Enables or disables restricted mode for plugins. Use `on` to enable and `off` to disable. ```cli on # enable restricted mode off # disable restricted mode ``` -------------------------------- ### Query DOM Elements Source: https://obsidian.md/help/cli Queries DOM elements using a CSS selector, with options to retrieve attributes, CSS properties, text content, or inner HTML. Can also return all matches instead of the first. ```bash selector=<css> # (required) CSS selector attr=<name> # get attribute value css=<prop> # get CSS property value total # return element count text # return text content inner # return innerHTML instead of outerHTML all # return all matches instead of first ``` -------------------------------- ### Filtering Available Command IDs Source: https://obsidian.md/help/cli Use the 'filter' parameter to narrow down the list of available command IDs by a prefix. ```bash filter=<prefix> # filter by ID prefix ``` -------------------------------- ### Reload Community Plugin Source: https://obsidian.md/help/cli Reload a specific community plugin during development. Replace 'my-plugin' with the actual plugin ID. ```bash # Reload a community plugin you're developing obsidian plugin:reload id=my-plugin ``` -------------------------------- ### Append Content to File Source: https://obsidian.md/help/cli Appends specified content to the end of a file. Supports appending without a trailing newline. ```cli file=<name> # file name path=<path> # file path content=<text> # (required) content to append inline # append without newline ``` -------------------------------- ### List Known Vaults Source: https://obsidian.md/help/cli Lists all vaults that Obsidian is aware of. Can optionally display the full paths to each vault. ```cli total # return vault count verbose # include vault paths ``` -------------------------------- ### random Source: https://obsidian.md/help/cli Opens a random note in the vault. Can optionally limit the search to a specific folder. ```APIDOC ## random ### Description Open a random note. ### Parameters #### Query Parameters - **folder** (string) - Optional - Limit the random note selection to this folder. - **newtab** (boolean) - Optional - Open the random note in a new tab. ``` -------------------------------- ### property:read Source: https://obsidian.md/help/cli Reads the value of a property from a file. Defaults to the active file if no file is specified. ```APIDOC ## property:read ### Description Read a property value from a file (default: active file). ### Parameters #### Query Parameters - **name** (string) - Required - The name of the property to read. - **file** (string) - Optional - The name of the file to read the property from. - **path** (string) - Optional - The path of the file to read the property from. ``` -------------------------------- ### aliases Source: https://obsidian.md/help/cli Lists aliases in the vault. Can filter by a specific file or show alias counts. ```APIDOC ## aliases ### Description List aliases in the vault. Use `active` or `file`/`path` to show aliases for a specific file. ### Parameters #### Query Parameters - **file** (string) - Optional - The name of the file to list aliases for. - **path** (string) - Optional - The path of the file to list aliases for. - **total** (boolean) - Optional - Return the total count of aliases. - **verbose** (boolean) - Optional - Include file paths in the output. - **active** (boolean) - Optional - Show aliases for the currently active file. ``` -------------------------------- ### random:read Source: https://obsidian.md/help/cli Reads the content of a random note, including its path. Can optionally limit the search to a specific folder. ```APIDOC ## random:read ### Description Read a random note (includes path). ### Parameters #### Query Parameters - **folder** (string) - Optional - Limit the random note selection to this folder. ``` -------------------------------- ### Delete File Source: https://obsidian.md/help/cli Deletes a file. By default, files are moved to the trash. Use the `permanent` flag to delete files permanently. ```cli file=<name> # file name path=<path> # file path permanent # skip trash, delete permanently ``` -------------------------------- ### Search Vault for Text Source: https://obsidian.md/help/cli Searches the entire vault for a given query. Returns matching file paths and supports limiting results by folder, count, and case sensitivity. ```bash query=<text> # (required) search query ``` ```bash path=<folder> # limit to folder ``` ```bash limit=<n> # max files ``` ```bash format=text|json # output format (default: text) ``` ```bash total # return match count ``` ```bash case # case sensitive ``` -------------------------------- ### Open a Random Note Source: https://obsidian.md/help/cli Opens a random note in the vault. Can limit the search to a specific folder or open the note in a new tab. ```bash folder=<path> # limit to folder ``` ```bash newtab # open in new tab ``` -------------------------------- ### publish:status Source: https://obsidian.md/help/cli Lists changes made to published files, including new, changed, and deleted files. ```APIDOC ## publish:status ### Description List publish changes. ### Parameters #### Query Parameters - **total** (boolean) - Optional - Return the total count of changes. - **new** (boolean) - Optional - Show only new files. - **changed** (boolean) - Optional - Show only changed files. - **deleted** (boolean) - Optional - Show only deleted files. ``` -------------------------------- ### List Unresolved Links Source: https://obsidian.md/help/cli Lists all unresolved links found within the vault. Can provide counts, link counts, verbose output including source files, and custom output formats. ```cli total # return unresolved link count counts # include link counts verbose # include source files format=json|tsv|csv # output format (default: tsv) ``` -------------------------------- ### plugin:uninstall Source: https://obsidian.md/help/cli Uninstalls a community plugin by its ID. ```APIDOC ## plugin:uninstall ### Description Uninstall a community plugin. ### Parameters #### Query Parameters - **id** (string) - Required - The ID of the plugin to uninstall. ``` -------------------------------- ### publish:remove Source: https://obsidian.md/help/cli Unpublishes a file from Obsidian Publish. Defaults to the active file. ```APIDOC ## publish:remove ### Description Unpublish a file (default: active file). ### Parameters #### Query Parameters - **file** (string) - Optional - The name of the file to unpublish. - **path** (string) - Optional - The path of the file to unpublish. ``` -------------------------------- ### Manage Captured Console Messages Source: https://obsidian.md/help/cli Displays captured console messages with options to limit the number of messages or filter by log level. Can also clear the buffer. ```bash limit=<n> # max messages to show (default 50) level=log|warn|error|info|debug # filter by log level clear # clear the console buffer ``` -------------------------------- ### plugin:reload Source: https://obsidian.md/help/cli Reloads a community plugin, primarily for development purposes. ```APIDOC ## plugin:reload ### Description Reload a plugin (for developers). ### Parameters #### Query Parameters - **id** (string) - Required - The ID of the plugin to reload. ``` -------------------------------- ### Target Specific Vault by Name Source: https://obsidian.md/help/cli Execute a command against a specific vault identified by its name. This is useful when your terminal's current directory is not a vault folder. ```bash obsidian vault=Notes daily obsidian vault="My Vault" search query="test" ``` -------------------------------- ### Count Words and Characters Source: https://obsidian.md/help/cli Counts words and characters in a file, defaulting to the active file. Can be configured to return only word count or character count. ```cli file=<name> # file name path=<path> # file path words # return word count only characters # return character count only ``` -------------------------------- ### property:remove Source: https://obsidian.md/help/cli Removes a property from a file. Defaults to the active file if no file is specified. ```APIDOC ## property:remove ### Description Remove a property from a file (default: active file). ### Parameters #### Query Parameters - **name** (string) - Required - The name of the property to remove. - **file** (string) - Optional - The name of the file to remove the property from. - **path** (string) - Optional - The path of the file to remove the property from. ``` -------------------------------- ### Run JavaScript in App Console Source: https://obsidian.md/help/cli Execute arbitrary JavaScript code within the Obsidian app's console. This is powerful for scripting and debugging. ```bash # Run JavaScript in the app console obsidian eval code="app.vault.getFiles().length" ``` -------------------------------- ### Search Vault Contents Source: https://obsidian.md/help/cli Perform a search within your Obsidian vault for specific content. Replace 'meeting notes' with your desired search query. ```bash # Search your vault obsidian search query="meeting notes" ``` -------------------------------- ### Rename File Source: https://obsidian.md/help/cli Renames a file, preserving its extension. Use the `move` command to rename and move simultaneously. Automatically updates internal links if configured in vault settings. ```cli file=<name> # file name path=<path> # file path name=<name> # (required) new file name ``` -------------------------------- ### Switch Vault Source: https://obsidian.md/help/cli Switches Obsidian to a different vault. This command is only available in the TUI (Text User Interface). ```cli name=<name> # (required) vault name ``` -------------------------------- ### Debug with Chrome DevTools Protocol Source: https://obsidian.md/help/cli Attaches or detaches the Chrome DevTools Protocol debugger. Use 'on' to attach and 'off' to detach. ```bash on # attach debugger off # detach debugger ``` -------------------------------- ### Move or Rename File Source: https://obsidian.md/help/cli Moves or renames a file to a new location or name. Automatically updates internal links if configured in vault settings. ```cli file=<name> # file name path=<path> # file path to=<path> # (required) destination folder or path ``` -------------------------------- ### Manage Captured JavaScript Errors Source: https://obsidian.md/help/cli Displays captured JavaScript errors or clears the error buffer. ```bash clear # clear the error buffer ``` -------------------------------- ### Remove Property from a File Source: https://obsidian.md/help/cli Removes a specified property from a file, defaulting to the active file. Requires the property name. ```bash name=<name> # (required) property name ``` ```bash file=<name> # file name ``` ```bash path=<path> # file path ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.