### Obsidian Headless Installation and Quick Start Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Obsidian Publish/Headless Publish.md Instructions for installing the Obsidian Headless client and a quick start guide for common publishing tasks. ```APIDOC ## Installation ```shell npm install -g obsidian-headless ``` ## Quick Start 1. **Login:** ```shell ob login ``` 2. **List Publish Sites:** ```shell ob publish-list-sites ``` 3. **Connect a Local Vault to a Publish Site:** ```shell cd ~/vaults/my-vault ob publish-setup --site "my-site" ``` 4. **Preview Changes (Dry Run):** ```shell ob publish --dry-run ``` 5. **Publish Changes:** ```shell ob publish ``` ``` -------------------------------- ### Obsidian Headless Client Installation and Setup Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Obsidian Sync/Headless Sync.md Instructions for installing the Obsidian Headless client and performing initial setup, including login and listing remote vaults. ```APIDOC ## Installation Install Obsidian Headless using npm: ```shell npm install -g obsidian-headless ``` ## Authentication and Initial Setup Before using sync commands, you need an active Obsidian Sync subscription and to log in to your account. ### Login ```shell ob login ``` ### List Remote Vaults View all remote vaults associated with your account: ```shell ob sync-list-remote ``` ### Set Up a Vault for Syncing Navigate to your local vault directory and set it up for syncing with a remote vault. ```shell cd ~/vaults/my-vault ob sync-setup --vault "My Vault" ``` ``` -------------------------------- ### Example Callout Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Editing and formatting/Callouts.md Use the `[!example]` type to provide illustrative examples. ```markdown > [!example] > Lorem ipsum dolor sit amet ``` -------------------------------- ### Install Community Theme Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Installs a theme from the community themes repository. Can optionally enable the theme immediately after installation. ```bash name= # (required) theme name enable # activate after install ``` -------------------------------- ### Install a community plugin Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Install a community plugin by ID, with an option to enable it immediately. ```bash id= # (required) plugin ID enable # enable after install ``` -------------------------------- ### Complete Base File Example Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Bases/Bases syntax.md An example demonstrating the structure of a .base file, including filters, formulas, properties, summaries, and views. This serves as a template for creating your own bases. ```yaml filters: or: - file.hasTag("tag") - and: - file.hasTag("book") - file.hasLink("Textbook") - not: - file.hasTag("book") - file.inFolder("Required Reading") formulas: formatted_price: 'if(price, price.toFixed(2) + " dollars")' ppu: "(price / age).toFixed(2)" properties: status: displayName: Status formula.formatted_price: displayName: "Price" file.ext: displayName: Extension summaries: customAverage: 'values.mean().round(3)' views: - type: table name: "My table" limit: 10 groupBy: property: note.age direction: DESC filters: and: - 'status != "done"' - or: - "formula.ppu > 5" - "price > 2.1" order: - file.name - file.ext - note.age - formula.ppu - formula.formatted_price summaries: formula.ppu: Average ``` -------------------------------- ### Task Management Examples Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Provides examples for listing all tasks, incomplete tasks, tasks from a specific file, tasks from the daily note, counting tasks, and displaying tasks with verbose output or filtered by custom status. ```bash # 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=?' ``` -------------------------------- ### Property Value Examples Source: https://github.com/obsidianmd/obsidian-help/blob/master/Release notes/v1.9.3.md Examples of property syntax changes for tags and aliases. ```yaml tags: 'my-tag' ``` ```yaml tags: 'tag1, tag2' ``` -------------------------------- ### Example Study Note Template Source: https://github.com/obsidianmd/obsidian-help/blob/master/zh/插件/模板.md This markdown template includes frontmatter with dynamic variables for topic, date, and course, along with sections for core concepts, details, examples, questions, and related topics. Use this as a starting point for your study notes. ```markdown --- topic: date: "{{date}}" course: tags: - studies --- # {{title}} ## 核心概念 ## 重要细节 ## 示例 ## 问题 - ## 总结 ## 相关主题 - [[]] ``` -------------------------------- ### Install Obsidian using Snap on Linux Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Getting started/Download and install Obsidian.md Use this command to install the Obsidian Snap package. The `--dangerous` flag is required because the package hasn't been reviewed by Canonical. The `--classic` flag allows Obsidian to access files outside of the sandbox. ```bash snap install obsidian__.snap --dangerous --classic ``` -------------------------------- ### Install Obsidian Headless Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian Headless.md Installs the Obsidian Headless client globally using npm. Requires Node.js 22 or later. ```shell npm install -g obsidian-headless ``` -------------------------------- ### Example x-callback-url response Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian URI.md Demonstrates the structure of a callback response when using x-success parameters. ```text obsidian://.....x-success=myapp://x-callback-url ``` ```text myapp://x-callback-url?name=...&url=obsidian%3A%2F%2Fopen...&file=file%3A%2F%2F... ``` -------------------------------- ### Basic Prompt Examples Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Obsidian Web Clipper/Interpreter.md Examples of natural language prompts that can be used with the Interpreter. These prompts leverage variable syntax. ```text {{"a summary of the page"}} ``` ```text {{"a three bullet point summary, translated to French"}} ``` ```text {{"un resumé de la page en trois points"}} ``` -------------------------------- ### List installed plugins Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md List plugins with optional filtering and version information. ```bash filter=core|community # filter by plugin type versions # include version numbers format=json|tsv|csv # output format (default: tsv) ``` -------------------------------- ### Run Obsidian using Flatpak on Linux Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Getting started/Download and install Obsidian.md Launch Obsidian after installing it with Flatpak. This command runs the installed application. ```bash flatpak run md.obsidian.Obsidian ``` -------------------------------- ### List Installed Themes Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Lists all installed themes in the vault. Can optionally include version numbers for each theme. ```bash versions # include version numbers ``` -------------------------------- ### Create a new note content Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Getting started/Create your first note.md Example text to paste into a newly created Obsidian note. ```markdown Obsidian is the private and flexible writing app that adapts to the way you think. ``` -------------------------------- ### Simple URL Matching Example Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Obsidian Web Clipper/Templates.md Use simple URL matching to trigger a template if the current page URL starts with the specified text. This is useful for broad matching of sites. ```text https://obsidian.md ``` -------------------------------- ### Install Obsidian using Flatpak on Linux Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Getting started/Download and install Obsidian.md Install Obsidian using the Flatpak package manager. This command installs the application from the Flathub repository. ```bash flatpak install flathub md.obsidian.Obsidian ``` -------------------------------- ### Create Note via URI Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian URI.md Examples of using the new action to create files within a vault. ```text obsidian://new?vault=my%20vault&name=my%20note ``` ```text obsidian://new?vault=my%20vault&file=path%2Fto%2Fmy%20note ``` -------------------------------- ### Formula Division Example Source: https://github.com/obsidianmd/obsidian-help/blob/master/Release notes/v1.9.3.md Demonstrates support for multiple division operations in formulas. ```text 10 / 5 / 2 ``` -------------------------------- ### Obsidian URL Decoding Example Source: https://github.com/obsidianmd/obsidian-help/blob/master/Release notes/v0.9.4.md This example demonstrates how Obsidian handles URL decoding for obsidian:// URLs, specifically showing the correct decoding of a comma character. ```url obsidian://some/path?query=%2C ``` -------------------------------- ### Example Conflict File Name Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Obsidian Sync/Troubleshoot Obsidian Sync.md An example of how a conflict file might be named, illustrating the pattern described above. This helps users recognize conflict files in their vault. ```text Meeting notes (Conflicted copy MyMacBook2 202411281430).md ``` -------------------------------- ### Open Daily Note via URI Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian URI.md Example of using the daily action to trigger the Daily notes plugin. ```text obsidian://daily?vault=my%20vault ``` -------------------------------- ### Open Note via URI Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian URI.md Examples of using the open action to access vaults and files. ```text obsidian://open?vault=my%20vault ``` ```text obsidian://open?vault=ef6ca3e3b524d22f ``` ```text obsidian://open?vault=my%20vault&file=my%20note ``` ```text obsidian://open?path=%2Fhome%2Fuser%2Fmy%20vault%2Fpath%2Fto%2Fmy%20note ``` -------------------------------- ### GET obsidian://choose-vault Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian URI.md Opens the Obsidian vault manager interface. ```APIDOC ## GET obsidian://choose-vault ### Description Opens the vault manager. ### Method GET ### Endpoint obsidian://choose-vault ``` -------------------------------- ### Implement callouts Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Contributing to Obsidian/Style guide.md Use specific callout types to highlight tips, info, warnings, and examples. ```md > [!tip]- Use keyboard shortcuts > You can speed up your workflow by memorizing the most-used shortcuts. > [!info]+ This is a paid addon > This feature requires a paid subscription to use. > [!warning]+ This action cannot be undone > Deleting a vault is permanent. Consider exporting your notes first. > [!example]- Advanced usage > You can also configure this setting via the Graph menu. ``` -------------------------------- ### Example Filenames.txt Format Source: https://github.com/obsidianmd/obsidian-help/blob/master/scripts/README.md Defines the format for the filenames.txt file, used to map English filenames and folder names to their locale translations. ```ini [file.{permalink}] original=EN filename translation=Locale filename [folder.{EN folder name}] original=EN folder name translation=Locale folder name ``` -------------------------------- ### Format search queries Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Contributing to Obsidian/Style guide.md Use realistic examples for search queries instead of placeholder terms. ```text task:(call OR schedule) ``` -------------------------------- ### Create ordered lists Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Editing and formatting/Basic formatting syntax.md Start list items with a number followed by a period (`.`) or a closing parenthesis (`)`) for numbered lists. ```markdown 1. First list item 2. Second list item 3. Third list item ``` ```markdown 1) First list item 2) Second list item 3) Third list item ``` -------------------------------- ### Update formula syntax for Bases Source: https://github.com/obsidianmd/obsidian-help/blob/master/Release notes/v1.9.2.md Examples of the transition from legacy function-based syntax to the new object-oriented and chained syntax. ```text contains(file.name, "Books") ``` ```text file.name.contains("Books") ``` ```text property.split(' ').sort()[0].lower() ``` ```text note["Property Name"] ``` ```text date1 < date2 ``` ```text date("01/01/2025") + "1 year" ``` -------------------------------- ### Task Update Examples Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Demonstrates how to show task information using different reference methods, toggle task completion, and explicitly set task status (done, todo, or custom). ```bash # 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 ``` -------------------------------- ### List Installed CSS Snippets Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Lists all installed CSS snippets in the vault. ```bash snippets ``` -------------------------------- ### Plugins API Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Endpoints for managing installed plugins, including enabling, disabling, and installing. ```APIDOC ## GET /plugins ### Description List installed plugins. ### Parameters #### Query Parameters - **filter** (string) - Optional - filter by plugin type (core|community) - **versions** (flag) - Optional - include version numbers - **format** (string) - Optional - output format (json|tsv|csv) ``` ```APIDOC ## POST /plugin:install ### Description Install a community plugin. ### Parameters #### Request Body - **id** (string) - Required - plugin ID - **enable** (flag) - Optional - enable after install ``` -------------------------------- ### Configure a Table View with Grouping and Summaries Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Bases/Bases syntax.md The 'views' section defines how data is rendered. This example configures a table view named 'My table' that groups by 'note.age' in descending order, filters out notes where 'status' is 'done' and 'formula.ppu' is not greater than 5 or 'price' is not greater than 2.1, orders the results, and calculates the 'Average' for 'formula.ppu'. ```yaml views: - type: table name: "My table" limit: 10 groupBy: property: note.age direction: DESC filters: and: - 'status != "done"' - or: - "formula.ppu > 5" - "price > 2.1" order: - file.name - file.ext - note.age - formula.ppu - formula.formatted_price summaries: formula.ppu: Average ``` -------------------------------- ### ob publish-setup Command Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Obsidian Publish/Headless Publish.md Command to connect a local vault to an Obsidian Publish site. ```APIDOC ## `ob publish-setup` ### Description Connect a local vault to a Publish site. ### Method `ob publish-setup` ### Endpoint N/A (CLI Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Command Usage ```shell ob publish-setup [--site ] [--path ] ``` ### Options - **`--site`** (string) - Optional - Site ID or slug - **`--path`** (string) - Optional - Local vault path (default: current directory) ``` -------------------------------- ### Open Vault Manager via URI Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian URI.md Launches the Obsidian vault manager interface. ```text obsidian://choose-vault ``` -------------------------------- ### Start Ollama Server with Browser Extension Support Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Obsidian Web Clipper/Interpreter.md Run the Ollama server with specific origins enabled to allow browser extensions to interact with it. Ensure the protocol matches your browser's extension protocol if not using Chrome or Firefox. ```shell OLLAMA_ORIGINS=moz-extension://*,chrome-extension://*,safari-web-extension://* ollama serve ``` -------------------------------- ### Calculate a Deadline Source: https://github.com/obsidianmd/obsidian-help/blob/master/da/Baser/Formler.md Sets a project's due date to two weeks after the start date. Use this to automatically calculate future dates based on a starting point. ```js start_dato + "2w" ``` -------------------------------- ### Run Obsidian AppImage on Linux Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Getting started/Download and install Obsidian.md Make the AppImage executable and then run it. The `--no-sandbox` flag may be necessary on some systems, like Chromebooks. ```bash chmod u+x Obsidian-.AppImage ./Obsidian-.AppImage --no-sandbox ``` -------------------------------- ### Create task lists Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Editing and formatting/Basic formatting syntax.md Use `[ ]` for incomplete tasks and `[x]` for completed tasks within a list. ```markdown - [x] This is a completed task. - [ ] This is an incomplete task. ``` -------------------------------- ### Get plugin info Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Retrieve information for a specific plugin by ID. ```bash id= # (required) plugin ID ``` -------------------------------- ### Create a Study Notes Template Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Plugins/Templates.md Example of a template for study notes, including frontmatter properties and placeholders for dynamic content like title and date. Edit in Source mode to avoid property conflicts. ```markdown --- topic: date: "{{date}}" course: tags: - studies --- # {{title}} ## Key Concepts ## Important Details ## Examples ## Questions - ## Summary ## Related Topics - [[]] ``` -------------------------------- ### Get Object Values Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Bases/Functions.md Returns a list containing all the values of an object. ```javascript object.values() ``` -------------------------------- ### Run Obsidian CLI Help Command Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Use this command to display help information for the Obsidian CLI. ```shell # Run the help command obsidian help ``` -------------------------------- ### Get Object Keys Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Bases/Functions.md Returns a list containing all the keys of an object. ```javascript object.keys() ``` -------------------------------- ### Show file info Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Displays metadata for a file. ```bash file= # file name path= # file path ``` ```text path Notes/Recipe.md name Recipe extension md size 1024 created 1700000000000 modified 1700001000000 ``` -------------------------------- ### Get hotkey for a command Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Retrieves the hotkey configuration for a specific command ID. ```bash id= # (required) command ID verbose # show if custom or default ``` -------------------------------- ### Show file outline Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Display headings for a file in a specified format. ```bash file= # file name path= # file path format=tree|md|json # output format (default: tree) total # return heading count ``` -------------------------------- ### GET obsidian://daily Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian URI.md Creates or opens the daily note for the current date. ```APIDOC ## GET obsidian://daily ### Description Creates or opens your daily note. Requires the Daily notes plugin to be enabled. ### Endpoint obsidian://daily ### Parameters #### Query Parameters - **vault** (string) - Required - The vault name or vault ID. - **Note** - Accepts the same parameters as the 'new' action. ``` -------------------------------- ### Get Absolute Value of Number Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Bases/Functions.md Returns the absolute value of a numeric input. ```number (-5).abs() ``` -------------------------------- ### Get Current Timestamp Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Bases/Functions.md Returns a date object representing the current moment. ```javascript now() ``` -------------------------------- ### Markdown Bracket Syntax Source: https://github.com/obsidianmd/obsidian-help/blob/master/Release notes/v0.13.8.md Example of auto-matched brackets referenced in editor bug fixes. ```markdown [] ``` -------------------------------- ### Create Note with Flags Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Creates a new note and immediately opens it for editing. The `open` and `overwrite` flags enable this behavior. ```shell # Create a note and open it obsidian create name=Note content="Hello" open overwrite ``` -------------------------------- ### Check if String Starts With Query Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Bases/Functions.md Determines if a string begins with a specified query string. ```string "hello".startsWith("he") ``` -------------------------------- ### GET obsidian://new Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian URI.md Creates a new note in the specified vault, optionally with content. ```APIDOC ## GET obsidian://new ### Description Creates a new note in the vault, optionally with content. Requires the vault to be specified. ### Endpoint obsidian://new ### Parameters #### Query Parameters - **vault** (string) - Required - The vault name or vault ID. - **name** (string) - Optional - The file name to be created. - **file** (string) - Optional - A vault absolute path including the name. Overrides name. - **path** (string) - Optional - A globally absolute path. Overrides vault and file. - **content** (string) - Optional - The contents of the note. - **clipboard** (boolean) - Optional - Use contents of the clipboard instead of content parameter. - **silent** (boolean) - Optional - If present, does not open the new note. - **append** (boolean) - Optional - Appends to an existing file if one exists. - **overwrite** (boolean) - Optional - Overwrites an existing file if one exists (if append is not set). ``` -------------------------------- ### Initialize Git Repository Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Getting started/Sync your notes across devices.md Use this command to initialize a new Git repository in your Obsidian vault folder. This is the first step to start tracking changes with Git. ```bash git init ``` -------------------------------- ### GET obsidian://open Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian URI.md Opens an Obsidian vault or a specific file within a vault. ```APIDOC ## GET obsidian://open ### Description Opens an Obsidian vault, or opens a file within that vault. If the vault is already open, it focuses on the window. ### Endpoint obsidian://open ### Parameters #### Query Parameters - **vault** (string) - Optional - The vault name or vault ID. - **file** (string) - Optional - File name or path from the vault root. Extension can be omitted if .md. - **path** (string) - Optional - Absolute file system path to a file. Overrides vault and file. - **paneType** (string) - Optional - Determines UI behavior: 'tab', 'split', or 'window' (Desktop only). ``` -------------------------------- ### Configure Include/Exclude Folders Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Obsidian Publish/Headless Publish.md Manage which folders are included or excluded from publishing. Run without options to view the current configuration. ```shell ob publish-config [--path ] [--includes ] [--excludes ] ``` -------------------------------- ### Publish All Locales Source: https://github.com/obsidianmd/obsidian-help/blob/master/scripts/README.md Automates the publishing process for all locales and triggers navigation synchronization for non-English sites. ```bash npx tsx scripts/publish-all.ts [--dry-run] [locale ...] ``` -------------------------------- ### Add a bookmark Source: https://github.com/obsidianmd/obsidian-help/blob/master/en/Extending Obsidian/Obsidian CLI.md Defines the target and metadata for adding a new bookmark. ```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 ```