Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Join the community
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Run

hananoshikayomaruhananoshikayomaru3k downloads

Generate Markdown from dataview query and JavaScript.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates8

Generate markdown from dataview query and javascript.

  • ✅ Powerful, Dead Simple
  • ✅ Markdown based, work with every markdown editor / render
  • ✅ Works well with Dataview, Templater, Obsidian publish

demo: https://www.youtube.com/watch?v=_UAr6e6hlVI&t=71s

Installation

Plugin marketplace

You can download this from obsidian plugin store.

Manual Installation

  1. cd to .obsidian/plugins
  2. git clone this repo
  3. cd obsidian-run && bun install && bun run build
  4. there you go 🎉

Usage

  1. install this plugin and install obsidian-custom-save
  2. add the run: run file command to the custom save actions
  3. define a starting tag
%% run start 3+4%%
  1. save the file
  2. you markdown will become something like this
%% run start
3+4
%%
7
%% run end %%

Syntax

Each block of run contains three parts: starting tag (required), generated content, ending tag

starting tag (required)

you define your expression in the starting tag. The expression will be used to calculate the content. It is the only required part for a run block.

%% run start <expression> %%

or you can also write multiple line statements. Notice that if you write in multiple line you must return a value.

%% run start

```ts|js
<your expression in codeblock>
```

%%

You can use it with CodeblockCustomizer, to have folding codeblock.

Content

the generated content

Ending Tag

ending tag closes the run block.

%% run end <metadata> %%

Options

  1. generate ending tag metadata: when enabled, the run block update time and error(if any) will be shown in the ending tag.
  2. ignore folders: the folder listed will be ignored by this plugin

Advanced Usage

Access file object

%% run start file.basename %%

the file object is the TFile but it is patched with file.properties which is the file yaml properties.

Page level variable

---
bar: "foo"
---

%% run start file.properties.bar %%

Dataview

you can access the dv object if you have dataview plugin installed and enabled.

%% run start

```ts
return dv.markdownList(dv.pages("#ai/image").map((page) => page.file.link));
```

%%

Templater and Reusable user scripts

you can access the tp object if you have templater plugin installed and enabled.

Then you need to go to the setting of template and manually set a startup template. The reason of doing this is that tp is not initialized by default by templater and it will be undefined. Learn more and see a video: https://github.com/HananoshikaYomaru/obsidian-run/issues/14#issuecomment-1749945619. If you don't want to set a start up template, you can manually run templater once everytime you start up obsidian. As long as templater runs once, the tp object will be defined.

Templater allows user to have their user defined functions and scripts. To learn more, checkout https://silentvoid13.github.io/Templater/user-functions/script-user-functions.html.

Function

you can write complicated function in starting tag codeblock

Async Function

You can do any kind of async operation in the run block. Async function is non-blocking. Results will be resolved after all sync operation are resolved. You can use the obsidian request function to fetch data.

Debug

you can use console.log in the starting tag codeblock. It will output in the developer tool.

Note

  1. if you want to contribute, please star and open github issue.
  2. this plugin is powerful, but it is still under early development. The syntax is subject to change but will be backward compatible as much as possible
  3. you will want to use this with CodeblockCustomizer to collapse your code block.
  4. you will want to save the following codeblock as template so that you can use it easily.
%% run start

```ts fold
return;
```

%%

Support

If you are enjoying this plugin then please support my work and enthusiasm by buying me a coffee on https://www.buymeacoffee.com/yomaru.

60%
HealthFair
ReviewCaution
About
Generate Markdown from inline expressions, JavaScript code blocks, or Dataview queries directly in your notes. Update content between run start/end tags, access file and page variables, and include optional run metadata like update time and errors.
TemplatingAutomationIntegrations
Details
Current version
1.0.8
Last updated
2 years ago
Created
3 years ago
Updates
8 releases
Downloads
3k
Compatible with
Obsidian 0.15.0+
License
MIT
Report bugRequest featureReport plugin
Sponsor
Buy Me a Coffee
GitHub Sponsors
Author
hananoshikayomaruhananoshikayomaru
yomaru.dev
GitHubhananoshikayomaru
  1. Community
  2. Plugins
  3. Templating
  4. Run

Related plugins

Templater

Create and use dynamic templates.

BRAT

Easily install a beta version of a plugin for testing.

Readwise Official

Sync highlights from Readwise to your vault.

Todoist Sync

Materialize Todoist tasks within your notes.

QuickAdd

Quickly add new notes or content to your vault.

Shell commands

Define system commands that you want to execute via command palette, hotkeys, URI links or automated events. E.g. open external applications or perform automated file modifications.

Google Calendar

Interact with your Google Calendar.

PodNotes

Write notes on podcasts with ease.

Initiative Tracker

TTRPG initiative tracker.

Zotero Integration

Insert and import citations, bibliographies, notes, and PDF annotations from Zotero.