Runnable Tutorial Straight From Your Blog Post
Tags: vscode, programming, blog, readme
Published: 2023-02-21 19:34:01

---
title: Runnable Tutorial Straight From Your Blog Post
published: true
description: As a developer, you may often find yourself writing and reading technical blog posts, GitHub project READMEs, Stack Overflow answers and Developer documentation. Have you ever wished you could click a link on any of them to launch and run the commands in VS Code? Check this out!
tags: vscode, programming, blog, readme 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/juqoqw74aag2ct4cenka.png
# Use a ratio of 100:42 for best results.
# published_at: 2023-02-21 19:22 +0000
---

As a developer, you may often find yourself writing and reading technical blog posts, GitHub project READMEs, Stack Overflow answers and developer documentation. Have you ever wished you could click a link within any of them to launch a VS Code environment and automatically run the commands? This is a useful (and easy) way to verify that all the commands in the project are correct and the outputs/responses make sense. Also, if you have code examples this is a great way to help people quickly check them out and start experimenting.

## With our latest release, you can do just that!

Let’s take for example the blog post “[How to Process Large Files with Node.js](https://stateful.com/blog/process-large-files-nodejs-streams)” which is one of our most popular blog posts. 

If you click the link [“Launch the demo project locally”](vscode://stateful.runme?command=setup&repository=git@github.com:stateful/blog-examples.git&fileToOpen=node-streams/README.md) as shown below, you will be able to run the commands inside VS Code. 

![Run blog posts commands](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qpia4ymgbliptzsu6y4v.png)

![Gif tutorial run blog posts](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4nvkrxvkgwgkeql4jkev.gif)

A lot of the examples you find for frameworks, blog posts and tutorials are not really usable because they require a lot of context and setup, for example; downloading packages and setting up the required environment. Runme can take away this pain.

With Runme you can click a button instantly clone into a repository for your users, allow them to install the dependencies, and run that specific example out of the box without much setup - making your content much more accessible to your users.

## How does it work? 

You start by crafting a link that launches VS Code with all the desired details to successfully clone the project into your local file system. Next, it'll use the Runme extension to open the specified markdown file and render the runnable notebook. This mechanism uses the built in VS Code deep linking functionality that knows how to intelligently launch VS Code into a specified state. Along the way, VS Code will ask your permission and trust anytime it's touching your filesystem, auth or anything else sensitive.

Let’s see the link:
![constructing the link](https://media.graphassets.com/39u90fIIQNKW5ftDx12g)

`vscode://stateful.runme?command=setup&repository=git@github.com:stateful/blog-examples.git&fileToOpen=node-streams/README.md`

If you don’t want to use Github you can directly use a markdown link:

![link to markdown](https://media.graphassets.com/jSTAhewZQgqhMomrtktA)

`vscode://stateful.runme?command=setup&fileToOpen=your-markdown-file.md`

By clicking the link, you will be able to see the README.md file with a ▶️ button next to the code.

![run blog posts commands](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/prqry6htf7xaimh71h9o.png)

And that’s it! Now you can make all your blog posts, GitHub project READMEs, Stack Overflow answers and developer documentation available with a click in VS Code.

**Note:** the repository will be in a temporary directory by default, but you can set it up in VS Code by going to: code > preferences > settings > Look for the Runme extension, and give it a specific path.

![vs code settings](https://media.graphassets.com/Hy3AQF77Q1OqlgaYiEmb)
<br />

### Before you go...
You can find us at [@statefulhq](https://twitter.com/statefulhq) on Twitter or on [Discord](https://discord.com/invite/stateful). Also, if you're a VS Code user you should checkout [Runme](https://marketplace.visualstudio.com/items?itemName=stateful.runme) (transform READMEs into runnable notebooks), and [Marquee](https://marketplace.visualstudio.com/items?itemName=stateful.marquee) (the open source homescreen that helps you stay organized). 👋