AI prompts
base on OpenDeepWiki is the open-source version of the DeepWiki project, aiming to provide a powerful knowledge management and collaboration platform. The project is mainly developed using C# and TypeScript, supporting modular design, and is easy to expand and customize. # OpenDeepWiki
[δΈζ](README.zh-CN.md) | [English](README.md)
<div align="center">
<img src="/img/favicon.png" alt="OpenDeepWiki Logo" width="220" />
<h3>AI-Driven Code Knowledge Base</h3>
</div>
---
# enterprise service
[Pricing of enterprise services](https://docs.opendeep.wiki/pricing)
Our enterprise service offers comprehensive support and flexibility for businesses seeking professional AI solutions.
---
# Features
- **Quick Conversion**: Supports converting all GitHub, GitLab, Gitee, Gitea and other code repositories into knowledge bases within minutes.
- **Multi-language Support**: Supports code analysis and documentation generation for all programming languages.
- **Code Structure Diagrams**: Automatically generates Mermaid diagrams to help understand code structure.
- **Custom Model Support**: Supports custom models and custom APIs for flexible extension.
- **AI Intelligent Analysis**: AI-based code analysis and code relationship understanding.
- **SEO Friendly**: Generates SEO-friendly documentation and knowledge bases based on Next.js for easy search engine crawling.
- **Conversational Interaction**: Supports conversations with AI to obtain detailed code information and usage methods for deep code understanding.
---
# Feature List
- [x] Support multiple code repositories (GitHub, GitLab, Gitee, Gitea, etc.)
- [x] Support multiple programming languages (Python, Java, C#, JavaScript, etc.)
- [x] Support repository management (CRUD operations on repositories)
- [x] Support multiple AI providers (OpenAI, AzureOpenAI, Anthropic, etc.)
- [x] Support multiple databases (SQLite, PostgreSQL, SqlServer, MySQL, etc.)
- [x] Support multiple languages (Chinese, English, French, etc.)
- [x] Support uploading ZIP files and local files
- [x] Provide data fine-tuning platform to generate fine-tuning datasets
- [x] Support directory-level repository management with dynamic directory and document generation
- [x] Support repository directory modification management
- [x] Support user management (CRUD operations on users)
- [x] Support user permission management
- [x] Support repository-level generation of different fine-tuning framework datasets
---
# Project Introduction
OpenDeepWiki is an open-source project inspired by [DeepWiki](https://deepwiki.com/), developed based on .NET 9 and Semantic Kernel. It aims to help developers better understand and utilize code repositories, providing features such as code analysis, documentation generation, and knowledge graph construction.
Main Features:
- Analyze code structure
- Understand repository core concepts
- Generate code documentation
- Automatically generate README.md for code
- Support MCP (Model Context Protocol)
---
# MCP Support
OpenDeepWiki supports the MCP protocol:
- Can serve as a single repository MCPServer for repository analysis.
Example configuration:
```json
{
"mcpServers": {
"OpenDeepWiki":{
"url": "http://Your OpenDeepWiki service IP:port/sse?owner=AIDotNet&name=OpenDeepWiki"
}
}
}
```
- owner: Repository organization or owner name
- name: Repository name
After adding the repository, you can test by asking questions like "What is OpenDeepWiki?", with effects as shown below:

This way, OpenDeepWiki can serve as an MCPServer for other AI models to call, facilitating analysis and understanding of open-source projects.
---
# π Quick Start
1. Clone the repository
```bash
git clone https://github.com/AIDotNet/OpenDeepWiki.git
cd OpenDeepWiki
```
2. Modify environment variable configuration in `docker-compose.yml`:
- OpenAI example:
```yaml
services:
koalawiki:
environment:
- KOALAWIKI_REPOSITORIES=/repositories
- TASK_MAX_SIZE_PER_USER=5 # Maximum parallel document generation tasks per user for AI
- CHAT_MODEL=DeepSeek-V3 # Model must support function calling
- ANALYSIS_MODEL= # Analysis model for generating repository directory structure
- CHAT_API_KEY= # Your API Key
- LANGUAGE= # Default generation language, e.g., "Chinese"
- ENDPOINT=https://api.token-ai.cn/v1
- DB_TYPE=sqlite
- MODEL_PROVIDER=OpenAI # Model provider, supports OpenAI, AzureOpenAI, Anthropic
- DB_CONNECTION_STRING=Data Source=/data/KoalaWiki.db
- EnableSmartFilter=true # Whether to enable smart filtering, affects AI's ability to get repository file directories
- UPDATE_INTERVAL # Repository incremental update interval in days
- MAX_FILE_LIMIT=100 # Maximum upload file limit in MB
- DEEP_RESEARCH_MODEL= # Deep research model, if empty uses CHAT_MODEL
- ENABLE_INCREMENTAL_UPDATE=true # Whether to enable incremental updates
- ENABLE_CODED_DEPENDENCY_ANALYSIS=false # Whether to enable code dependency analysis, may affect code quality
- ENABLE_WAREHOUSE_COMMIT=true # Whether to enable warehouse commit
- ENABLE_FILE_COMMIT=true # Whether to enable file commit
- REFINE_AND_ENHANCE_QUALITY=false # Whether to refine and enhance quality
- ENABLE_WAREHOUSE_FUNCTION_PROMPT_TASK=true # Whether to enable warehouse function prompt task
- ENABLE_WAREHOUSE_DESCRIPTION_TASK=true # Whether to enable warehouse description task
- CATALOGUE_FORMAT=compact # Directory structure format (compact, json, pathlist, unix)
- ENABLE_CODE_COMPRESSION=false # Whether to enable code compression
- READ_MAX_TOKENS=100000 # The maximum token limit for reading files in AI is set to prevent unlimited file reading. It is recommended to fill in 70% of the model's maximum token.
# Feishu Bot configuration (optional)
- FeishuAppId=
- FeishuAppSecret=
- FeishuBotName=KoalaWiki
```
- AzureOpenAI and Anthropic configurations are similar, only need to adjust `ENDPOINT` and `MODEL_PROVIDER`.
## Database Configuration
### SQLite (Default)
```yaml
- DB_TYPE=sqlite
- DB_CONNECTION_STRING=Data Source=/data/KoalaWiki.db
```
### PostgreSQL
```yaml
- DB_TYPE=postgres
- DB_CONNECTION_STRING=Host=localhost;Database=KoalaWiki;Username=postgres;Password=password
```
### SQL Server
```yaml
- DB_TYPE=sqlserver
- DB_CONNECTION_STRING=Server=localhost;Database=KoalaWiki;Trusted_Connection=true;
```
### MySQL
```yaml
- DB_TYPE=mysql
- DB_CONNECTION_STRING=Server=localhost;Database=KoalaWiki;Uid=root;Pwd=password;
```
3. Start services
Using Makefile commands:
```bash
# Build all Docker images
make build
# Start all services in background
make up
# Start in development mode (with visible logs)
make dev
```
Visit http://localhost:8090 to access the knowledge base page.
For Windows users without make environment, use Docker Compose directly:
```bash
docker-compose build
docker-compose up -d
docker-compose up
docker-compose down
docker-compose logs -f
```
---
# Deployment Recommendations
- Build for specific architecture:
```bash
docker-compose build --build-arg ARCH=arm64
docker-compose build --build-arg ARCH=amd64
```
- Build only backend or frontend:
```bash
docker-compose build koalawiki
docker-compose build koalawiki-web
```
- One-click deployment to Sealos (supports public network access):
[](https://bja.sealos.run/?openapp=system-template%3FtemplateName%3DOpenDeepWiki)
For detailed steps, please refer to: [One-click Sealos Deployment of OpenDeepWiki](scripts/sealos/README.zh-CN.md)
---
# π How It Works
OpenDeepWiki leverages AI to achieve:
- Clone code repository locally
- Read .gitignore configuration to ignore irrelevant files
- Recursively scan directories to get all files and directories
- Determine if file count exceeds threshold; if so, call AI model for intelligent directory filtering
- Parse AI-returned directory JSON data
- Generate or update README.md
- Call AI model to generate repository classification information and project overview
- Clean project analysis tag content and save project overview to database
- Call AI to generate thinking directory (task list)
- Recursively process directory tasks to generate document directory structure
- Save directory structure to database
- Process incomplete document tasks
- If Git repository, clean old commit records, call AI to generate update log and save
---
# OpenDeepWiki Repository Parsing to Documentation Detailed Flow Chart
```mermaid
graph TD
A[Clone code repository] --> B[Read .gitignore configuration to ignore files]
B --> C[Recursively scan directories to get all files and directories]
C --> D{Does file count exceed threshold?}
D -- No --> E[Directly return directory structure]
D -- Yes --> F[Call AI model for intelligent directory structure filtering]
F --> G[Parse AI-returned directory JSON data]
E --> G
G --> H[Generate or update README.md]
H --> I[Call AI model to generate repository classification information]
I --> J[Call AI model to generate project overview information]
J --> K[Clean project analysis tag content]
K --> L[Save project overview to database]
L --> M[Call AI to generate thinking directory task list]
M --> N[Recursively process directory tasks to generate DocumentCatalog]
N --> O[Save directory structure to database]
O --> P[Process incomplete document tasks]
P --> Q{Is repository type Git?}
Q -- Yes --> R[Clean old commit records]
R --> S[Call AI to generate update log]
S --> T[Save update log to database]
Q -- No --> T
```
---
# Advanced Configuration
## Environment Variables
- `KOALAWIKI_REPOSITORIES`: Repository storage path
- `TASK_MAX_SIZE_PER_USER`: Maximum parallel document generation tasks per user for AI
- `CHAT_MODEL`: Chat model (must support function calling)
- `ENDPOINT`: API endpoint
- `ANALYSIS_MODEL`: Analysis model for generating repository directory structure
- `CHAT_API_KEY`: API key
- `LANGUAGE`: Document generation language
- `DB_TYPE`: Database type, supports sqlite, postgres, sqlserver, mysql (default: sqlite)
- `MODEL_PROVIDER`: Model provider, default OpenAI, supports AzureOpenAI, Anthropic
- `DB_CONNECTION_STRING`: Database connection string
- `EnableSmartFilter`: Whether to enable smart filtering, affects AI's ability to get repository directories
- `UPDATE_INTERVAL`: Repository incremental update interval (days)
- `MAX_FILE_LIMIT`: Maximum upload file limit (MB)
- `DEEP_RESEARCH_MODEL`: Deep research model, if empty uses CHAT_MODEL
- `ENABLE_INCREMENTAL_UPDATE`: Whether to enable incremental updates
- `ENABLE_CODED_DEPENDENCY_ANALYSIS`: Whether to enable code dependency analysis, may affect code quality
- `ENABLE_WAREHOUSE_COMMIT`: Whether to enable warehouse commit
- `ENABLE_FILE_COMMIT`: Whether to enable file commit
- `REFINE_AND_ENHANCE_QUALITY`: Whether to refine and enhance quality
- `ENABLE_WAREHOUSE_FUNCTION_PROMPT_TASK`: Whether to enable warehouse function prompt task
- `ENABLE_WAREHOUSE_DESCRIPTION_TASK`: Whether to enable warehouse description task
- `CATALOGUE_FORMAT`: Directory structure format (compact, json, pathlist, unix)
- `ENABLE_CODE_COMPRESSION`: Whether to enable code compression
- `MAX_FILE_READ_COUNT`: Maximum file read count limit for AI, prevents unlimited file reading and improves processing efficiency (default: 10, 0 = no limit)
- `FeishuAppId`: Feishu App ID (required if enabling Feishu Bot)
- `FeishuAppSecret`: Feishu App Secret (required if enabling Feishu Bot)
- `FeishuBotName`: Feishu bot display name (optional)
---
# Feishu Bot Integration
- Purpose: Connect the current repository to Feishu group/DM as a knowledge bot for Q&A and content delivery.
- Callback route: `/api/feishu-bot/{owner}/{name}` (copy the full URL from the "Feishu Bot" button on the repository page).
- Requirement: Service must be publicly accessible; message encryption (Encrypt Key) is not supported yet.
## 1) Create an App in Feishu Open Platform
- Type: Internal App (for your organization).
- Capability: Enable "Bot". Publish to the organization and install it.
- Permissions (at minimum, per platform guidance):
- Message send/read related scopes (e.g., `im:message`, `im:message:send_as_bot`).
- Event subscription related scopes (for receiving message events).
## 2) Configure Event Subscriptions (Important)
- Open "Event Subscriptions" and disable "Encrypt Key".
- Subscribe to event: `im.message.receive_v1`.
- Request URL: `https://your-domain/api/feishu-bot/{owner}/{name}`.
- `{owner}` is the repository organization or owner, e.g., `AIDotNet`.
- `{name}` is the repository name, e.g., `OpenDeepWiki`.
- Save to complete the URL verification (backend already handles the challenge response).
Tip: You can also click the "Feishu Bot" button on the repository page to copy the dedicated callback URL.
## 3) Configure Server Environment Variables
Set the following in your backend service (see docker-compose example below):
- `FeishuAppId`: Feishu App ID
- `FeishuAppSecret`: Feishu App Secret
- `FeishuBotName`: Bot display name (optional)
## 4) Add the Bot to a Group and Use It
- After installing the app, add the bot to the target group.
- Group: @bot + your question (answers using the current repository's knowledge).
- Direct Message: send your question directly.
- Supports text and image replies (e.g., mind map images).
## Feishu FAQ
- No response/callback failed: ensure the Request URL is publicly reachable and that Nginx proxies `/api/` to the backend.
- "Encryption enabled" message: disable Encrypt Key (current version doesn't support encrypted messages).
- 403/insufficient permissions: make sure the app is installed in the org and required scopes/events are granted.
## Build for Different Architectures
Makefile commands:
```bash
make build-arm # ARM architecture
make build-amd # AMD architecture
make build-backend-arm # Backend only ARM
make build-frontend-amd # Frontend only AMD
```
---
# Community
- Discord: [join us](https://discord.gg/Y3fvpnGVwt)
- Feishu QR Code:


---
# π License
This project is licensed under the MIT License. See [LICENSE](./LICENSE) for details.
---
# β Star History
[](https://www.star-history.com/#AIDotNet/OpenDeepWiki&Date)
", Assign "at most 3 tags" to the expected json: {"id":"14428","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"