Skip to content

Automation

Mudlark accepts inbound mudlark:// URLs from any app on the system. Use them to script note creation, retrieval, search, export, and CRUD from Apple Shortcuts, Raycast, AppleScript (open location), curl, browser bookmarks, or any other tool that can open a URL. The same surface is also exposed as App Intents, so pick whichever fits your tool. URL scheme is best for callback-driven flows (chained x-callback-url exports between apps, scripted pipelines that need to read results). App Intents are best for Shortcuts authoring.

Allow automation from other apps

Inbound URLs are gated by a setting in Settings › General. Read-only actions (open, get, list, search) always pass through, so cross-app discovery links keep working. Mutating actions (create, add-text, update, delete, move, export) are blocked with an x-error callback when the toggle is off. Default is off, so a fresh install never executes mutations from another app until you opt in.

Resolving notes

Actions that act on an existing note accept a name parameter. name is the note’s vault path: subfolder plus title, no extension, with / as separator. For a root-level note titled Inbox, name=Inbox. For Projects/Q1/Plan.mudlark, name=Projects/Q1/Plan. Identity follows the filename, so renaming the file in Finder breaks links. If name doesn’t resolve a row, the action errors with errorMessage="Note not found".

The pre-2026 shape carried uuid, id, and title alternates. Those still parse so a stale Shortcut won’t fail URL parsing, but they’re ignored and the action falls through to Note not found. Saved Shortcuts using the old shape need to be re-recorded against name=.

Actions

Each action is a path in the URL. Parameters are passed as query string values. All text values should be percent-encoded. Both mudlark://action?… and mudlark://x-callback-url/action?… are accepted.

/create

Make a new note.

ParameterTypeDefaultNotes
titlestringUntitledNote title.
textstringemptyBody content.
typestringnoneWraps text with the given type’s prefix. See type aliases below.
clipboardyes | nonoUse clipboard contents as text (overrides text=).
openyes | noyesBring Mudlark to the foreground.
active-noteyes | nomirrors openSelect the new note in the active editor. Set open=no&active-note=yes to populate without focus-stealing.

Returns on x-success: name, title

mudlark://create?title=Tasks&text=Buy%20milk&type=task&open=no

/open

Resolve a note and activate it in the editor.

ParameterTypeDefaultNotes
name*stringrequiredVault path. See Resolving notes above.

Returns on x-success: name, title

mudlark://open?name=Daily%20Log

/add-text

Append or prepend text to a note. If no note is specified, falls back to the configured Quick Capture target, then the current editor note.

ParameterTypeDefaultNotes
namestring-Optional vault path. If omitted, see fallback above.
text*stringrequiredRequired (or clipboard=yes).
clipboardyes | nonoUse clipboard contents as text.
modeappend | prependappendInsertion mode.
typestringnoneSee type aliases below.

Returns on x-success: name, title

When the target is the active editor note and mode=append, the insertion is editor-aware (preserves cursor, integrates with Quick Capture).

mudlark://add-text?name=Inbox&text=Look%20into%20this&type=task

/get

Read a note’s content.

ParameterTypeDefaultNotes
name*stringrequiredVault path. See Resolving notes above.
formatraw | markdown | htmlrawraw returns the literal Mudlark markup, while markdown and html render via the automation renderer.

Returns on x-success: name, title, createdAt (ISO-8601), updatedAt, text

mudlark://get?name=Today&format=markdown&x-success=myapp://callback

/list

List notes, optionally filtered, paginated.

ParameterTypeDefaultNotes
querystringnoneTitle substring (case-insensitive).
limitint100Clamped to [1, 500].
offsetint0Skip this many results.

Returns on x-success: notes (JSON array of {name, title, createdAt, updatedAt}), total, offset, hasMore

mudlark://list?query=project&limit=25&offset=0

/export

Trigger configured exports for a note. Without destination=, runs every destination configured in Settings. With destination=, filters to the matching one(s).

ParameterTypeDefaultNotes
namestring-Optional vault path. If omitted, exports the active note.
destinationstringnoneMatches presetId (bear, obsidian, notion, …) or the destination’s display name, case-insensitive.

Returns on x-success: name, title of the exported note

If destination= is provided but matches no configured destination, the action errors with errorMessage="No configured export destination matches ‘<value>’".

mudlark://export?name=Inbox&destination=bear

/update

Rename a note and/or replace its body. At least one of new-title or text must be provided. Renames the vault file on disk if the title changes.

ParameterTypeDefaultNotes
name*stringrequiredVault path. See Resolving notes above.
new-titlestringnoneNew note title (newTitle is also accepted).
textstringnoneNew body content.

Returns on x-success: name, title (post-update)

mudlark://update?name=Daily%20Log&new-title=2026%20Plan

/delete

Move the note to Mudlark’s trash. Recoverable from the Trash section for 30 days (matches ⌘ ⇧ Backspace in the editor).

ParameterTypeDefaultNotes
name*stringrequiredVault path. See Resolving notes above.

Returns on x-success: name, title of the deleted note

mudlark://delete?name=Inbox

/move

Move a note to a different vault subfolder. Empty or missing folder moves the note to the vault root.

ParameterTypeDefaultNotes
name*stringrequiredVault path. See Resolving notes above.
folderstringempty (root)Vault-relative path.

Returns on x-success: name, title

mudlark://move?name=Inbox&folder=Archive/2026

Type aliases

The type= parameter on create and add-text accepts the values below. Unknown values pass through as-is, with no prefix added.

PassResolves to
task, completion, removal, heading, bullet, numbered, code, math, timer, loopingTimer, table, highlight, question, quotation, calloutthe named item type
image, mediamedia (@)
hardBreak, horizontalRule, horizontal-rule, hrhorizontal rule (~)
loop-timer, looping-timer, loopingtimerlooping timer (;)
writeto, write-towrite-to (.)
plain, plain-text, textplain text (no prefix)

Multi-line wrapping

When text= contains newlines, wrapping depends on the type:

  • Per-line types (task, completion, bullet, numbered, highlight, question, quotation, heading) prefix every non-empty line. text=A%0AB&type=task becomes + A\n+ B.
  • Block types (code, math) wrap the body with paired delimiters: <prefix>\n<body>\n<prefix>.

Single-line text always renders as <prefix> <text> regardless of style.

x-callback-url

Mudlark supports the x-callback-url convention. Add these parameters to any action to control what happens after it completes:

ParameterDescription
x-successURL opened on success. Result params (e.g. name, title) are appended as query items.
x-errorURL opened on failure. Receives errorCode=-1 and errorMessage=<string> query items.
x-cancelURL opened if the user cancels.

mudlark://create?title=Log&x-success=shortcuts://

This creates a note called “Log” and returns to Shortcuts when done.

Callback URLs are sanitized for safety. file:, javascript:, data:, vbscript:, about:, blob: schemes are dropped silently. https:, http:, and custom app schemes (bear://, myapp://) pass through.

Using from the terminal

Use the open command to trigger actions from a shell script:

open "mudlark://add-text?text=Hello%20world"