Embed a live Linux CLI terminal in MkDocs Material
MkDocs and Material for MkDocs generate pure static HTML from Python Markdown, making extra_javascript integration effortless for Python SDKs, data tools, and DevOps CLIs.
1. Add KilnVM to MkDocs Material
mkdocs.yml
extra_javascript:
- https://kilnvm.dev/kilnvm-embed.js
2. Seed Files, Run Buttons & Production Tips
docs/quickstart.md (MkDocs Material page)
<div
data-kilnvm-project="proj_your_project_id"
data-kilnvm-theme="auto"
data-kilnvm-cmd="python3 -m pip list | head"
data-kilnvm-height="420"
></div>
- Include your custom Docker image or Python environment in Dashboard -> Custom Images (any x86_64 wheel or C extension works natively).
- If using Material's navigation.instant feature, MutationObserver inside kilnvm-embed.js detects swapped DOM nodes automatically.
- Combine starter file child <script type="text/plain"> tags with raw HTML divs inside Markdown.
3. Try a Live Sandbox Right Now
Click Launch Terminal below to boot a real non-root Linux microVM directly in the page.
Frequently Asked Questions
Can Python C extensions like DuckDB or Pydantic Core run inside MkDocs embeds?
Yes. Unlike WebAssembly Python (Pyodide), KilnVM runs full CPython inside isolated linux/amd64 containers with real OS syscalls.
Does MkDocs Material require plugins or build steps for KilnVM?
None. Adding extra_javascript in mkdocs.yml is the only config change required.
Ready in 5 minutes
Ship live CLI sandboxes inside your docs.
Start free with 300 sessions per month, isolated linux/amd64 microVMs, and zero credit card required.