Skip to main content

A tool to export DeepWiki documentation to Markdown format

Project description

DeepWiki Export Tool

A tool to retrieve documents from DeepWiki and convert them to Markdown format.

Supported Sites

  • app.devin.ai/wiki - Devin Wiki (Login required, language selection available)
  • deepwiki.com - DeepWiki (No login required, no language selection)

Features

  • Automatic content retrieval using Selenium
  • Automatic detection of two site formats
  • HTML to Markdown conversion (supports tables, code blocks, lists)
  • SVG diagram saving and conversion to Mermaid notation
    • Flowcharts
    • Sequence diagrams
    • State diagrams
    • Class diagrams
  • PNG image output (generated by rendering SVG in browser)
  • Automatic table of contents generation
  • Internal link to relative path conversion
  • <details> tag (collapsible) support
  • Session persistence (app.devin.ai/wiki only, no login required after first time)

Operation Modes

This tool has two operation modes.

CUI Mode (Default)

This mode runs in the background without displaying a browser window. When login is required, you enter your email address and authentication code in the terminal. It is suitable for execution in server environments without GUI (such as SSH connections). However, it does not support OAuth authentication (GitHub/Google, etc.), so only email + authentication code login is available.

GUI Mode (--no-headless)

This mode runs with the browser window displayed. It is useful for initial setup and debugging as you can visually confirm login operations. Use this mode if you want to log in with OAuth authentication (GitHub/Google, etc.). When you specify an email address with the -e option, the email address is automatically entered on the login page and the Continue button is also automatically clicked.

Supported Platforms

  • Windows
  • macOS
  • Linux

Requirements

  • Python 3.10 or higher
  • Chrome/Chromium browser
  • uv (recommended) or pip

Installation (From PyPI - Recommended)

# Install with pip
pip install deepwiki2md

# Or install with uv
uv tool install deepwiki2md

After installation, the deepwiki2md command is available:

deepwiki2md <DeepWiki URL>

# Or run as a Python module
python -m deepwiki2md <DeepWiki URL>

Installation (From Source)

git clone https://github.com/matsu582/deepwiki2md.git
cd deepwiki2md

Using uv (Recommended)

If uv is not installed, use the following command to install it.

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

macOS / Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh
# Dependencies are resolved and installed automatically
uv run deepwiki2md <DeepWiki URL>

Using pip

# Create virtual environment (recommended)
python -m venv .venv

# Activate virtual environment
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate

# Install from source
pip install -e .

# Run
deepwiki2md <DeepWiki URL>

Without Installation (dependencies only)

You can run the tool directly without installing the package itself:

# Install dependencies only
pip install selenium beautifulsoup4 webdriver-manager

# Run as a Python module from the repository root
python -m deepwiki2md <DeepWiki URL>

Usage

Basic Usage

# Installed from PyPI
deepwiki2md <DeepWiki URL>

# Using uv from cloned source (no install needed)
uv run deepwiki2md <DeepWiki URL>

# As a Python module (from cloned source root)
python -m deepwiki2md <DeepWiki URL>

Options

Option Description Default
-o, --output Output directory output
-l, --lang Language selection japanese
-d, --diagram_type Diagram output type mermaid,svg
-e, --email Email address for login None (prompt displayed)
--no-headless Run in GUI mode (display browser window) false

Diagram Output Type (--diagram_type)

  • png: PNG images only
  • svg: SVG images only
  • mermaid: Mermaid notation only
  • Multiple formats (comma-separated): png,mermaid,svg
  • First format is displayed directly, others are in <details> collapsible sections

Examples

# app.devin.ai/wiki (login required)
deepwiki2md https://app.devin.ai/wiki/owner/repo

# deepwiki.com (no login required)
deepwiki2md https://deepwiki.com/owner/repo

# Specify output directory
deepwiki2md https://deepwiki.com/owner/repo -o ./my_docs

# Retrieve in English (app.devin.ai/wiki only)
deepwiki2md https://app.devin.ai/wiki/owner/repo -l english

# PNG images only
deepwiki2md https://deepwiki.com/owner/repo -d png

# PNG first, Mermaid and SVG in collapsible sections
deepwiki2md https://deepwiki.com/owner/repo -d png,mermaid,svg

# Specify email address
deepwiki2md https://app.devin.ai/wiki/owner/repo -e user@example.com

# Run in GUI mode (display browser window)
deepwiki2md https://app.devin.ai/wiki/owner/repo --no-headless

Execution Flow

For app.devin.ai/wiki

  1. The tool launches a Chrome browser
  2. If a login page is displayed, please log in manually
  3. After logging in, press Enter in the terminal
  4. The specified language is automatically selected on the language selection screen
  5. Language selection defaults to Japanese. The Japanese DeepWiki must already be created.
  6. The tool automatically retrieves all sections and converts them to Markdown

For deepwiki.com

  1. The tool launches a Chrome browser
  2. No login required - the page loads automatically
  3. The tool automatically retrieves all sections and converts them to Markdown

Default Behavior (Headless Mode)

  1. The tool launches a headless browser (no display)
  2. If a login page is detected, you will be prompted to enter your email address via CUI
    • If you specify an email address with the -e option, the input prompt will be skipped
  3. After entering your email, an authentication code will be sent to your email
  4. If an authentication code page is detected, you will be prompted to enter the code via CUI
  5. After successful login, the tool automatically retrieves all sections and converts them to Markdown

Note: Headless mode only supports email + authentication code method. If you want to log in with OAuth (GitHub/Google, etc.), use the --no-headless option to run in GUI mode.

Output Files

output_directory/
├── 00_table_of_contents.md  # Table of contents
├── 01_Overview.md            # Markdown for each section
├── 02_System_Architecture.md
├── ...
└── images/                   # SVG diagrams
    ├── 01_Overview_01.svg
    ├── 01_Overview_02.svg
    └── ...

File Structure

deepwiki2md/
├── deepwiki2md/
│   ├── __init__.py           # Package initialization / version info
│   ├── __main__.py           # python -m deepwiki2md support
│   ├── cli.py                # Main script (entry point)
│   ├── extract_subgraphs.py  # SVG to Mermaid conversion
│   ├── html_to_markdown.py   # HTML to Markdown conversion
│   └── locale/               # i18n translation files
│       └── ja/LC_MESSAGES/
├── pyproject.toml            # Project configuration
├── README.md
├── README_JP.md
└── LICENSE

Troubleshooting

ChromeDriver Error

webdriver-manager automatically downloads ChromeDriver, but if problems occur, install it manually:

Reset Login Session

Session information is saved in the following location:

  • Windows: %LOCALAPPDATA%\DeepWiki2Md\chrome_profile
  • macOS: ~/Library/Application Support/DeepWiki2Md/chrome_profile
  • Linux: ~/.config/deepwiki2md/chrome_profile

If problems occur, delete this directory.

Supported DeepWiki Version

This tool is compatible with the DeepWiki site structure as of the following dates.

Site Verified Key Structures
deepwiki.com 2026-06-23 Content: div[class*="prose-custom"], Sidebar: link-based
app.devin.ai/wiki 2026-06-23 Content: div.prose-main, Sidebar: a[href*="/page/"] (/page/X.Y format), Language: menuitemradio inside "..." menu, URL: /org/{org}/wiki/{owner}/{repo}/page/{num}

DeepWiki's site structure may change without notice. If the tool stops working, a structural change is likely the cause.

Notes

  • app.devin.ai/wiki requires login on first run
  • deepwiki.com does not require login
  • Exporting may take time if there are many pages
  • Timeouts may occur depending on network conditions
  • Language selection option (-l) is ignored for deepwiki.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepwiki2md-1.1.1.tar.gz (10.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepwiki2md-1.1.1-py3-none-any.whl (56.0 kB view details)

Uploaded Python 3

File details

Details for the file deepwiki2md-1.1.1.tar.gz.

File metadata

  • Download URL: deepwiki2md-1.1.1.tar.gz
  • Upload date:
  • Size: 10.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for deepwiki2md-1.1.1.tar.gz
Algorithm Hash digest
SHA256 72bcf27dfaad5ce89a47dfd2eeae85773b3fad25496c87b82964df445fd92515
MD5 19bc2513e17fa6b4580af2448259ad2a
BLAKE2b-256 437de303d4e501bdd33ba251a12a47e523c0122d25ce03cb8469cf822b222cfb

See more details on using hashes here.

File details

Details for the file deepwiki2md-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: deepwiki2md-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 56.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for deepwiki2md-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7cbf4233d7c927e8509436b26780dd712f12ebb0ca2afeb1f272d66b7a5c7d1d
MD5 9c5481384a988b0b525d0daa68e4b27b
BLAKE2b-256 125b24f67a79c74a1a6b310543c216174785e9d98aadb73ab10bb9d41afe0029

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page