DeepWiki is my own implementation attempt of DeepWiki, automatically creates beautiful, interactive wikis for any GitHub or GitLab repository! Just enter a repo name, and DeepWiki will:
- Analyze the code structure
- Generate comprehensive documentation
- Create visual diagrams to explain how everything works
- Organize it all into an easy-to-navigate wiki
- Instant Documentation: Turn any GitHub or GitLab repo into a wiki in seconds
- Private Repository Support: Securely access private repositories with personal access tokens
- Smart Analysis: AI-powered understanding of code structure and relationships
- Beautiful Diagrams: Automatic Mermaid diagrams to visualize architecture and data flow
- Easy Navigation: Simple, intuitive interface to explore the wiki
# Clone the repository
git clone https://github.com/AsyncFuncAI/deepwiki-open.git
cd deepwiki-open
# Create a .env file with your API keys
echo "GOOGLE_API_KEY=your_google_api_key" > .env
echo "OPENAI_API_KEY=your_openai_api_key" >> .env
# Run with Docker Compose
docker-compose upπ‘ Where to get these keys:
- Get a Google API key from Google AI Studio
- Get an OpenAI API key from OpenAI Platform
Create a .env file in the project root with these keys:
GOOGLE_API_KEY=your_google_api_key
OPENAI_API_KEY=your_openai_api_key
# Install Python dependencies
pip install -r api/requirements.txt
# Start the API server
python -m api.main# Install JavaScript dependencies
npm install
# or
yarn install
# Start the web app
npm run dev
# or
yarn dev- Open http://localhost:3000 in your browser
- Enter a GitHub or GitLab repository (like
https://github.com/openai/codex,https://github.com/microsoft/autogen, orhttps://gitlab.com/gitlab-org/gitlab) - For private repositories, click "+ Add access tokens" and enter your GitHub or GitLab personal access token
- Click "Generate Wiki" and watch the magic happen!
DeepWiki uses AI to:
- Clone and analyze the GitHub or GitLab repository (including private repos with token authentication)
- Create embeddings of the code for smart retrieval
- Generate documentation with context-aware AI
- Create visual diagrams to explain code relationships
- Organize everything into a structured wiki
graph TD
A[User inputs GitHub/GitLab repo] --> AA{Private repo?}
AA -->|Yes| AB[Add access token]
AA -->|No| B[Clone Repository]
AB --> B
B --> C[Analyze Code Structure]
C --> D[Create Code Embeddings]
D --> E[Generate Documentation]
D --> F[Create Visual Diagrams]
E --> G[Organize as Wiki]
F --> G
G --> H[Interactive DeepWiki]
classDef process stroke-width:2px;
classDef data stroke-width:2px;
classDef result stroke-width:2px;
classDef decision stroke-width:2px;
class A,D data;
class AA decision;
class B,C,E,F,G,AB process;
class H result;
deepwiki/
βββ api/ # Backend API server
β βββ main.py # API entry point
β βββ api.py # FastAPI implementation
β βββ rag.py # Retrieval Augmented Generation
β βββ data_pipeline.py # Data processing utilities
β βββ requirements.txt # Python dependencies
β
βββ src/ # Frontend Next.js app
β βββ app/ # Next.js app directory
β β βββ page.tsx # Main application page
β βββ components/ # React components
β βββ Mermaid.tsx # Mermaid diagram renderer
β
βββ public/ # Static assets
βββ package.json # JavaScript dependencies
βββ .env # Environment variables (create this)
| Variable | Description | Required |
|---|---|---|
GOOGLE_API_KEY |
Google Gemini API key for AI generation | Yes |
OPENAI_API_KEY |
OpenAI API key for embeddings | Yes |
PORT |
Port for the API server (default: 8001) | No |
You can use Docker to run DeepWiki:
# Pull the image from GitHub Container Registry
docker pull ghcr.io/asyncfuncai/deepwiki-open:latest
# Run the container with environment variables
docker run -p 8001:8001 -p 3000:3000 \
-e GOOGLE_API_KEY=your_google_api_key \
-e OPENAI_API_KEY=your_openai_api_key \
-v ~/.adalflow:/root/.adalflow \
ghcr.io/asyncfuncai/deepwiki-open:latestOr use the provided docker-compose.yml file:
# Edit the .env file with your API keys first
docker-compose upYou can also mount a .env file to the container:
# Create a .env file with your API keys
echo "GOOGLE_API_KEY=your_google_api_key" > .env
echo "OPENAI_API_KEY=your_openai_api_key" >> .env
# Run the container with the .env file mounted
docker run -p 8001:8001 -p 3000:3000 \
-v $(pwd)/.env:/app/.env \
-v ~/.adalflow:/root/.adalflow \
ghcr.io/asyncfuncai/deepwiki-open:latestIf you want to build the Docker image locally:
# Clone the repository
git clone https://github.com/AsyncFuncAI/deepwiki-open.git
cd deepwiki-open
# Build the Docker image
docker build -t deepwiki-open .
# Run the container
docker run -p 8001:8001 -p 3000:3000 \
-e GOOGLE_API_KEY=your_google_api_key \
-e OPENAI_API_KEY=your_openai_api_key \
deepwiki-openThe API server provides:
- Repository cloning and indexing
- RAG (Retrieval Augmented Generation)
- Streaming chat completions
For more details, see the API README.
The main interface of DeepWiki
Access private repositories with personal access tokens
Watch DeepWiki in action!
- "Missing environment variables": Make sure your
.envfile is in the project root and contains both API keys - "API key not valid": Check that you've copied the full key correctly with no extra spaces
- "Cannot connect to API server": Make sure the API server is running on port 8001
- "CORS error": The API is configured to allow all origins, but if you're having issues, try running both frontend and backend on the same machine
- "Error generating wiki": For very large repositories, try a smaller one first
- "Invalid repository format": Make sure you're using a valid GitHub or GitLab URL format
- "Could not fetch repository structure": For private repositories, ensure you've entered a valid personal access token with appropriate permissions
- "Diagram rendering error": The app will automatically try to fix broken diagrams
- Restart both servers: Sometimes a simple restart fixes most issues
- Check console logs: Open browser developer tools to see any JavaScript errors
- Check API logs: Look at the terminal where the API is running for Python errors
Contributions are welcome! Feel free to:
- Open issues for bugs or feature requests
- Submit pull requests to improve the code
- Share your feedback and ideas
This project is licensed under the MIT License - see the LICENSE file for details.


