Logo Explicode

Explicode lets you write rich Markdown documentation directly inside your code comments, turning a single source file into both runnable code and beautifully rendered documentation.

Because the documentation lives inside comments, it doesnโ€™t affect your program or build process. No special compilers, configuration, or tooling changes are required. Just write Markdown in your comments and keep coding. Keeping documentation in the same file as the code makes it far more likely to stay accurate and up to date, since it evolves alongside the implementation and is automatically versioned with your project in Git. Explicode brings the ideas of literate programming to modern development across many languages, without requiring language-specific documentation frameworks.


View on GitHub

Features

How It Works


Use Markdown syntax inside the multiline comments of your favorite language:

Everything outside a doc block is rendered as a syntax-highlighted code block. Full CommonMark syntax is supported, including headings, lists, math with LaTeX syntax, images, tables, and more.

Quick Start

Open any supported file in VSCode, then either:

This opens a live preview panel to the right that updates as you edit.

The โš™๏ธ button on the header enables some additional functionalities:

Examples

Python

"""
# Fibonacci Sequence

Generates the first `n` Fibonacci numbers iteratively.

- **Input**: `n` (int) โ€” how many numbers to generate
- **Output**: list of the first `n` Fibonacci numbers
"""

def fibonacci(n):
    if n <= 0:
        return []
    elif n == 1:
        return [0]
    seq = [0, 1]
    for _ in range(2, n):
        seq.append(seq[-1] + seq[-2])
    return seq

fibonacci(5)  # [0, 1, 1, 2, 3]

JavaScript

/*
# Fibonacci Sequence

Generates the first `n` Fibonacci numbers iteratively.

- **Input**: `n` (int) โ€” how many numbers to generate
- **Output**: list of the first `n` Fibonacci numbers
*/

function fibonacci(n) {
    if (n <= 0) return [];
    if (n === 1) return [0];
    const seq = [0, 1];
    for (let i = 2; i < n; i++) {
        seq.push(seq[i - 1] + seq[i - 2]);
    }
    return seq;
}

fibonacci(5);  // [0, 1, 1, 2, 3]

Supported Languages

Explicode currently supports:

Need support for another language? Open an issue or reach out.

Commonly Asked Questions

Why use Explicode?

Explicode keeps your documentation and code in the same place. By writing Markdown directly inside code comments, you can turn a single source file into both runnable code and clear, readable documentation. This makes documentation easier to maintain, keeps it versioned alongside your code, and helps others understand your work without needing separate documentation files or tools.

Do I need special files or tools to use Explicode?

No. Explicode works directly with your existing source files. Simply write Markdown inside your code comments and open the preview. Thereโ€™s no need for special file formats, configuration, or changes to your build system.

Does Explicode change my code or build output?

No. Explicode only reads your source file โ€” it never modifies it. Documentation lives inside standard language comments, so your compiler, interpreter, and build tools see exactly the same code they always did.

Does Explicode store my code?

No. Explicode only reads your source file locally to generate the rendered preview. Your code is never uploaded or stored in any database.

How is this different from JSDoc, Doxygen, or Sphinx?

Tools like JSDoc and Sphinx extract documentation from special comment annotations (for example @param or @returns) and generate API reference docs. Explicode takes a different approach: your comments are free-form Markdown prose, letting you write narrative documentation, tutorials, or literate-programming-style explanations โ€” not just API stubs. It also works across many languages without any language-specific toolchain.

My favorite language isn't listed, can I request it?

Absolutely. Open an issue on GitHub with the language name and its block comment syntax. Languages that use /* ... */ style block comments are usually trivial to add.

Is Explicode free and open source?

Yes! The extension is free to install from the VS Code Marketplace. Check the repository for license details and source code.

Contact

Have a bug report, feature request, or collaboration idea?
Reach out at froem076@umn.edu.


Explicode logo Explicode ยท 2026