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
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Run Code Blocks

siulved54siulved5417 downloads

Adds a Run button to code blocks and shows the output right below, for JavaScript, Python, shell and more.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

Adds a Run button to code blocks and shows the output right below, for JavaScript, Python, shell and more.

A note in reading view: a JavaScript block run with its output 5 underneath, and a Bash block stopped with the Stop button

Why this one

  • Output as it happens. Text appears while the program runs, and the same button turns into Stop.
  • Stop really stops. It ends the script and anything the script started, so a forgotten sleep or server does not keep running.
  • A time limit and an output limit. Runs end after 30 seconds by default, and very long output is cut with a note saying how much was dropped.
  • Your own tools. Each language uses the program you already have, and you can point it at a full path or add flags, such as python3 -u.
  • Asks once. Code runs with your own permissions, so the first Run explains that and waits for a yes.

Usage

In reading view, every block in a supported language gets a Run button. Click it: the output appears below the block, with a line saying how it ended (done, exited with an error code, stopped, or past the time limit).

In editing view, put the cursor in a block and run Run code block at cursor and insert its output from the command palette. The output is written as an output block right under the code, and running again replaces it, so it never piles up.

Editing view: a JavaScript block followed by an output block

Stop all running code is also in the command palette while something is running.

Supported fences (each needs its program installed and on your PATH):

Language Fence names Program
JavaScript js, javascript, node node
TypeScript ts, typescript node (type stripping, Node 22.6 or later)
Python python, py, python3 python3 (python on Windows)
Bash bash, sh, shell bash
Zsh zsh zsh
PowerShell powershell, ps1, pwsh pwsh (powershell on Windows)
Ruby, PHP, Perl, Lua, R, Go ruby/rb, php, perl/pl, lua, r, go/golang ruby, php, perl, lua, Rscript, go run

If a program is not found, the line under the block says which one and where to set its path.

Settings

Time limit, output limit, whether programs start in the vault root or in the note's folder, and a program override for each language.

Safety

Code runs on your computer with your permissions, exactly as if you had typed it in a terminal. It can read, change or delete files and use the network. Only run code you wrote or trust, including code in notes from other people. Nothing is run unless you click Run or use the command, and the plugin does not send anything anywhere.

Desktop only: it needs Node's child processes, which mobile does not have.

Installation

In Obsidian, open Settings → Community plugins → Browse and search for "Run Code Blocks".

More plugins by Siulved54

Plugin What it does Source
Shared Blocks Write a block of text once and reuse it in any note. Edit the source and every reference re-renders live. shared-blocks
Text Case and Cleanup Change case, make camelCase or slugs, sort lines and remove duplicates, and repair text pasted out of a PDF, without touching code or URLs. text-format
Typography as You Type Curly quotes, dashes and ellipses as you type, kept out of code and maths, with Backspace to take one back. smart-typography-plugin
Section Numbering Number headings as an outline (1, 1.1, 1.2) and keep every link to them working when they renumber. section-numbering
Spreadsheet to Table Paste cells from Excel or Google Sheets as a Markdown table with a real header, insert CSV files, and copy tables back out. spreadsheet-to-table
Hybrid Line Numbers Relative and hybrid line numbers for Vim-style jumps, where a folded section counts as one line. hybrid-line-numbers
List Item Callouts Colour a single list item as a callout by starting it with a character such as &, ! or ?. list-item-callouts
Folder Counts See how many notes or files each folder holds, right in the file explorer, with a vault total and folder exclusions. folder-counts
Note Reading Time Reading time of the current note or your selection in the status bar, optionally saved to a property. note-reading-time
Task Rollover Roll unfinished tasks from your last daily note into today's when it is created, with a real undo. task-rollover
Zoom Into Section Zoom into a heading or list item to see only it and its contents, with a breadcrumb bar to climb back out. zoom-into-section
Link Title on Paste Paste a web address and get a Markdown link with the page's title, fetched in the background and undone in one step. link-title-on-paste
Update Radar Checks your installed community plugins for updates in the background, shows what changed, and flags the ones that look abandoned. community-update-checker
Dataview to Bases Convert Dataview queries into Bases blocks, and see which queries in your vault can be converted. dataview-to-bases
Line Editing Commands Duplicate, join, sort and reverse lines, insert blank lines and jump to a line number, with multi-cursor support. line-editing-commands
Note Mover Rules Move notes into folders by ordered rules on tags, properties, titles and paths, with a preview before any bulk move. note-mover-rules
Tab History Keeps each tab's back and forward history across restarts, and adds commands to move, maximize and close tabs. tab-history
URL Cards Shows web addresses as cards with title, description and image, and reads existing cardlink blocks. url-cards
Vim Config Loads a vimrc-style file from your vault so your key mappings and editor commands are ready when vim mode starts. vim-config
Task Archive Moves completed tasks, with their sub-items, into an archive section or note. task-archive
Revisit Later Link the current note into a future daily note, with a date typed in plain English, so it comes back when you want to review it. revisit-later
Explorer Colors Plus Color files and folders in the file explorer, with a palette, cascading to children, and import from File Color. explorer-colors-plus
Book Lookup Create book notes from Open Library or Google Books, with cover images, ISBN search and Book Search compatible templates. book-lookup
Web Search Menu Search the web for selected text or the note title from the right-click menu, with engines you define. web-search-menu
Word Lookup Look up any word in a sidebar dictionary with definitions, phonetics, synonyms and antonyms, or create a note for it. word-lookup
Quick Translate Translate the selection or a whole note into another language with no account, keeping links, code and front matter untouched. quick-translate
Dice Rolls Inline dice rolls you click to reroll, in Live Preview and Reading view, with full dice notation, a roll dialog and a roll history. Reads Dice Roller notes. dice-rolls
Claude Studio Notion-style AI writing, chat and vault tools powered by your local Claude Code CLI. claude-studio
Book Studio Turn notes into a print-ready paperback PDF and an EPUB 3, entirely on your device. book-studio
Emoji Search Insert emojis from a searchable picker or by typing a :shortcode. emoji-search
Inline TOC Show a live table of contents inside any note with a toc code block, or insert a plain Markdown one. inline-toc

All of them are in the community directory: Settings -> Community plugins -> Browse, then search for the name. Demos and install links for every one: the catalog.

Follow new plugins and updates on X: @luenpereza

HealthExcellent
ReviewSatisfactory
About
Add a Run button to code blocks and display live output beneath for JavaScript, Python, shell and many other languages. Stream output as the program runs, turn the button into Stop to terminate scripts and spawned processes, enforce time and output limits, and run code with your installed interpreters after a one-time permission prompt.
CodeLanguages
Details
Current version
0.1.0
Last updated
4 days ago
Created
4 days ago
Updates
1 release
Downloads
17
Compatible with
Obsidian 0.16.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
siulved54siulved54
GitHubperezamadorluisenrique-gif
  1. Community
  2. Plugins
  3. Code
  4. Run Code Blocks

Related plugins

Livecodes Playground

Client-side code editor playground - Powered by LiveCodes

Python Viewer

Open .py files as a read-only source and structure view with symbols, search, and parse diagnostics.

Code Block

Convert text into code blocks with automatic language detection.

Code Suite

Execute code inside your notes: Shiki syntax highlighting with 65+ themes, live streaming output, inline Matplotlib and Plotly graphs, shared variables, and styled HTML and PDF export with outputs.

Easy Codeblock

Insert code blocks quick and easily.

Templater

Create and use dynamic templates.

Mermaid Tools

Improved Mermaid.js experience: visual toolbar with common elements and more.

Simplified Chinese Word Splitting

Adds Simplified Chinese word splitting support for the editor and Vim mode.

Code Space

Professional code file management with visual dashboard, syntax highlighting editor, Markdown embedding, external folder mounts, and terminal integration.

PlantUML

Generate PlantUML diagrams.