Runbook.md
Created Dec 14, 2024 - Last updated: Dec 15, 2024
I’ve always wished that scripts written in Markdown could be executed directly, making various maintenance tasks easier and more efficient. By simply following a manual and clicking a few buttons, tasks could be completed seamlessly, and any extra information could be linked together for better accessibility.
Initially, I planned to implement this idea in Atom. However, shortly after I started preparing, Github announced that Atom would no longer be maintained. Orz
As a result, the idea was shelved for many years—until the end of 2024, when I finally brought it to life.
The outcome is Runbook.md, a VSCode extension.
Features:
- If the code block type is
bash run
, a “Run” button will be added above it. Clicking the button or pressingShift+Enter
will execute the script in the terminal. - @param to define parameters – Before execution, VSCode prompts the user for input based on the defined parameters. For example:
# @param VALUE ["A","B"]
. bash run --ask-confirm
– Ensures that dangerous commands require confirmation before execution.