Skip to content

First-party source

Desktop command contract: Obsidian CLI, retrieved 2026-08-29 EDT. See the dated source ledger.

Developer commands

Fresh

Open dev tools, attach the Chrome DevTools Protocol debugger, take screenshots, inspect the DOM and CSS, run JavaScript, toggle mobile emulation. Designed for plugin authors and agentic coding tools.

Commands to help you develop Community plugins and Themes. Learn more by heading to the Obsidian Developer Documentation.

devtools

Toggle Electron dev tools.

dev:debug

Attach/detach Chrome DevTools Protocol debugger.

bash
on                 # attach debugger
off                # detach debugger

dev:cdp

Run a Chrome DevTools Protocol command.

bash
method=<CDP.method>  # (required) CDP method to call
params=<json>        # method parameters as JSON

dev:errors

Show captured JavaScript errors.

bash
clear              # clear the error buffer

dev:screenshot

Take a screenshot (returns base64 PNG).

bash
path=<filename>    # output file path

dev:console

Show captured console messages.

bash
limit=<n>                        # max messages to show (default 50)
level=log|warn|error|info|debug  # filter by log level

clear                            # clear the console buffer

dev:css

Inspect CSS with source locations.

bash
selector=<css>     # (required) CSS selector
prop=<name>        # filter by property name

dev:dom

Query DOM elements.

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

dev:mobile

Toggle mobile emulation.

bash
on                 # enable mobile emulation
off                # disable mobile emulation

eval

Execute JavaScript and return result.

bash
code=<javascript>  # (required) JavaScript code to execute

See also

Unofficial SOP mirror. Built for terminal-driven and agentic Obsidian workflows.