Streamlit Runner - A Simple VS Code Extension

Programming

I created a small VS Code extension to solve a minor annoyance in my Streamlit development workflow. Instead of typing streamlit run in the terminal each time, I wanted a simple right-click option to launch my apps.

Why I Built This

While working on various Streamlit projects, I found myself repeatedly typing the same terminal command. The solution was straightforward - add a context menu option to do this automatically. Nothing groundbreaking, just a small quality-of-life improvement.

The Implementation

The extension is quite simple, consisting of just a few core components:

  • A command registration for the context menu
  • Basic terminal management for running the Streamlit command
  • Simple error handling for missing dependencies

What I Learned

This was my first time creating a VS Code extension, and while it’s a very basic one, I learned about:

  • The basic structure of VS Code extensions
  • How to interact with VS Code’s terminal API
  • The process of publishing to the VS Code marketplace

Next Steps

While the extension is intentionally minimal, I might add a few small features if users request them:

  • Basic configuration options
  • Support for common Streamlit CLI arguments
  • Simple status indicators

Comments