chujiu-dev394 downloadsInteractively run code blocks in Obsidian with stdin input support,works on desktop, iOS & Android.. Supports Python, C, C++, Java, Go, JavaScript, TypeScript, Rust, Kotlin and more.
Run code blocks interactively in Obsidian with full stdin input support. Python runs locally via Pyodide (WebAssembly); 17+ other languages execute via public playground APIs.
Code Runner provides the most complete Python input experience of any Obsidian plugin:
| Platform | Mode | Behavior |
|---|---|---|
| Desktop (SAB available) | Interactive | Pre-fill the first input() prompt, then each subsequent input() triggers an inline popup in real time — type and press Enter as the program runs |
| Tablet / Mobile (no SAB) | Pre-fill | All input() prompts are parsed and shown as labeled fields. Loop-based programs get a raw textarea for unlimited lines |
input() inside while/for loops is detected automatically; tablet mode switches to a multi-line textarea| Language | Backend | stdin |
|---|---|---|
| Python | Pyodide v0.26.x (local WASM) | ✅ |
| C | SoloLearn API (remote) | ✅ |
| C++ | SoloLearn API (remote) | ✅ |
| Java | SoloLearn API (remote) | ✅ |
| Go | SoloLearn API (remote) | ✅ |
| C# | SoloLearn API (remote) | ✅ |
| Swift | SoloLearn API (remote) | ✅ |
| R | SoloLearn API (remote) | ✅ |
| JavaScript | Proxy-sandboxed eval (local) | — |
| TypeScript | Compiled → JS (local) | — |
| Rust | Rust Playground API (remote) | — |
| Kotlin | Kotlin Playground API (remote) | — |
| Haskell | Haskell Playground API (remote) | — |
| Crystal | Crystal Playground API (remote) | — |
| V (Vlang) | V Playground API (remote) | — |
| Wenyan | wenyan-lang CDN (local) | — |
| HTML | Shadow DOM render (local) | — |
app.plugins.plugins['code-runner'].apimain.js, manifest.json, styles.css from the latest release<vault>/.obsidian/plugins/code-runner/ and copy the 3 files inOnce approved, install directly via Settings → Community Plugins → Browse → "Code Runner".
Create a fenced code block with a language tag:
```python
name = input("Enter your name: ")
age = input("Enter your age: ")
print(f"Hello {name}, you are {age} years old!")
```
input() callCode Block → needsStdin() → Show pre-fill form (optional)
│
┌─────┴─────┐
SAB available? │
┌───┴───┐ │
Yes No │
│ │ │
Worker Main-thread │
+ SAB Pyodide │
(inter- (pre-fill │
active) only) │
│
Output ←─────┘
Atomics.wait/notify synchronously blocks the Worker for interactive input without freezing the UIgit clone https://github.com/chujiu-dev/obsidian-code-runner.git
cd obsidian-code-runner
npm install
npm run build
# Output: dist/main.js, dist/styles.css, dist/manifest.json
Forked from Code Emitter by YISH (MIT). Key additions:
input() support via builtins.input replacement (Pyodide v0.26.x / Python 3.12)MIT — see LICENSE.