Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Markdown ExecuteNew to Visual Studio Code? Get it now.
Markdown Execute

Markdown Execute

hanskre

|
2,331 installs
| (3) | Free
Execute Shell, NodeJS, Python, and TypeScript commands directly from Markdown
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

makrdown-execute

Transforms your VSCode into a Jupyter-like Notebook for Markdown files and lets you execute code blocks (python, js, shell, typescript) directly inside your documentation. Perfect for tutorials, infrastructure scripts, and interactive docs.

  • Execute Code Blocks Inline: Run sh, bash, js, python, or typescript blocks straight from Markdown into the terminal with one click.
  • Quick Shortcuts: Use cmd+f1 (mac) / ctrl+f1 (windows) or the command palette to execute selected code instantly.
  • Seamless Workflow: Works side-by-side with the integrated VSCode terminal, with SSH session support for remote execution.

Find it on the Visual Studio Marketplace.

How to use

  • Detects code blocks in your markdown-files starting with:

    • ```sh
    • ```bash
    • ```js
    • ```python
    • ```ts
    • ```typescript
  • Adds 'Execute command in terminal as Shell-Script', 'Execute command in terminal as NodeJs-Script', 'Execute command in terminal as Python-Script', or 'Execute command in terminal as TypeScript-Script' label.

  • Clicking on the label executes code-block until the closing ticks ``` in the terminal as Shell, NodeJs, Python, or TypeScript script.

Alternatively, use cmd+f1 (mac) / ctrl+f1 (windows) shortcut to execute current selection.

Features

Execute code blocks in terminal

demo-execute

Execute Selection

Select code and either use shortcut cmd+f1 (mac) / ctrl+f1 (windows) to execute or open the VSCode command palette and type markdown execute to find the command:

demo-shortcut

Side By Side view

If you interact with terminal very often, I recomment using the terminal in editor area side by side in split view.:

side-by-side-view

Extension Settings

This extension contributes the following settings:

  • markdown-execute.executeInSsh: enable/disable execution of code in a SSH session. If disabled and active terminal is running a SSH session, a new terminal is used as target for commands.
  • markdown-execute.executeSelection: Shortcut to execute selection. Defaults to cmd+f1 (mac) / ctrl+f1 (windows).

Backlog

  1. Analyse and fix why the watch-task in debugging terminal is ignored
  2. Add PHP as execution runtime:
    1. commandCodeLensProvider:
      1. Execute command PHP
    2. extension.ts & execute.ts:
      1. Add PHP as execution runtime
  3. Add quick select keybinding without promting:
    1. cmd+f1 s Execute command as Shell
    2. cmd+f1 n Execute command with Nodejs
    3. cmd+f1 p Execute command with Python
    4. cmd+f1 t Execute command with TypeScript

Appreciations

Sycl´s Markdown Command Runner Extension served as inspiration. Thanks!

It was lacking execution of code blocks in active SSH sessions, shortcuts and NodeJs-support, so I made my own.

Contributors

  • @roman-drozd-it
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft