{"id":27885811,"url":"https://github.com/AsyncFuncAI/deepwiki-open","last_synced_at":"2025-05-05T07:04:43.727Z","repository":{"id":290821440,"uuid":"975318071","full_name":"AsyncFuncAI/deepwiki-open","owner":"AsyncFuncAI","description":"Open Source DeepWiki: AI-Powered Wiki Generator for GitHub Repositories","archived":false,"fork":false,"pushed_at":"2025-04-30T18:19:49.000Z","size":2343,"stargazers_count":124,"open_issues_count":1,"forks_count":18,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T18:53:37.398Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsyncFuncAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-30T06:01:29.000Z","updated_at":"2025-04-30T18:47:44.000Z","dependencies_parsed_at":"2025-04-30T18:53:46.521Z","dependency_job_id":"9c4bc630-dcfd-48e3-aafb-0cb6d0bd6c60","html_url":"https://github.com/AsyncFuncAI/deepwiki-open","commit_stats":null,"previous_names":["asyncfuncai/deepwiki-open"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsyncFuncAI%2Fdeepwiki-open","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsyncFuncAI%2Fdeepwiki-open/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsyncFuncAI%2Fdeepwiki-open/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsyncFuncAI%2Fdeepwiki-open/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsyncFuncAI","download_url":"https://codeload.github.com/AsyncFuncAI/deepwiki-open/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252455695,"owners_count":21750513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-05T07:03:26.718Z","updated_at":"2025-05-05T07:04:43.718Z","avatar_url":"https://github.com/AsyncFuncAI.png","language":"TypeScript","readme":"# DeepWiki-Open\n\n![DeepWiki Banner](screenshots/Deepwiki.png)\n\n**DeepWiki** is my own implementation attempt of DeepWiki, automatically creates beautiful, interactive wikis for any GitHub, GitLab, or BitBucket repository! Just enter a repo name, and DeepWiki will:\n\n1. Analyze the code structure\n2. Generate comprehensive documentation\n3. Create visual diagrams to explain how everything works\n4. Organize it all into an easy-to-navigate wiki\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/sheing)\n\n[![Twitter/X](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge\u0026logo=twitter\u0026logoColor=white)](https://x.com/sashimikun_void)\n[![Discord](https://img.shields.io/badge/Discord-7289DA?style=for-the-badge\u0026logo=discord\u0026logoColor=white)](https://discord.com/invite/VQMBGR8u5v)\n\n## ✨ Features\n\n- **Instant Documentation**: Turn any GitHub, GitLab or BitBucket repo into a wiki in seconds\n- **Private Repository Support**: Securely access private repositories with personal access tokens\n- **Smart Analysis**: AI-powered understanding of code structure and relationships\n- **Beautiful Diagrams**: Automatic Mermaid diagrams to visualize architecture and data flow\n- **Easy Navigation**: Simple, intuitive interface to explore the wiki\n- **Ask Feature**: Chat with your repository using RAG-powered AI to get accurate answers\n- **DeepResearch**: Multi-turn research process that thoroughly investigates complex topics\n\n## 🚀 Quick Start (Super Easy!)\n\n### Option 1: Using Docker\n\n```bash\n# Clone the repository\ngit clone https://github.com/AsyncFuncAI/deepwiki-open.git\ncd deepwiki-open\n\n# Create a .env file with your API keys\necho \"GOOGLE_API_KEY=your_google_api_key\" \u003e .env\necho \"OPENAI_API_KEY=your_openai_api_key\" \u003e\u003e .env\n\n# Run with Docker Compose\ndocker-compose up\n```\n\n\u003e 💡 **Where to get these keys:**\n\u003e - Get a Google API key from [Google AI Studio](https://makersuite.google.com/app/apikey)\n\u003e - Get an OpenAI API key from [OpenAI Platform](https://platform.openai.com/api-keys)\n\n### Option 2: Manual Setup (Recommended)\n\n#### Step 1: Set Up Your API Keys\n\nCreate a `.env` file in the project root with these keys:\n\n```\nGOOGLE_API_KEY=your_google_api_key\nOPENAI_API_KEY=your_openai_api_key\n```\n\n#### Step 2: Start the Backend\n\n```bash\n# Install Python dependencies\npip install -r api/requirements.txt\n\n# Start the API server\npython -m api.main\n```\n\n#### Step 3: Start the Frontend\n\n```bash\n# Install JavaScript dependencies\nnpm install\n# or\nyarn install\n\n# Start the web app\nnpm run dev\n# or\nyarn dev\n```\n\n### Step 4: Use DeepWiki!\n\n1. Open [http://localhost:3000](http://localhost:3000) in your browser\n2. Enter a GitHub, GitLab, or Bitbucket repository (like `https://github.com/openai/codex`, `https://github.com/microsoft/autogen`, `https://gitlab.com/gitlab-org/gitlab`, or `https://bitbucket.org/redradish/atlassian_app_versions`)\n3. For private repositories, click \"+ Add access tokens\" and enter your GitHub or GitLab personal access token\n4. Click \"Generate Wiki\" and watch the magic happen!\n\n## 🔍 How It Works\n\nDeepWiki uses AI to:\n\n1. Clone and analyze the GitHub, GitLab, or Bitbucket repository (including private repos with token authentication)\n2. Create embeddings of the code for smart retrieval\n3. Generate documentation with context-aware AI\n4. Create visual diagrams to explain code relationships\n5. Organize everything into a structured wiki\n6. Enable intelligent Q\u0026A with the repository through the Ask feature\n7. Provide in-depth research capabilities with DeepResearch\n\n```mermaid\ngraph TD\n    A[User inputs GitHub/GitLab/Bitbucket repo] --\u003e AA{Private repo?}\n    AA --\u003e|Yes| AB[Add access token]\n    AA --\u003e|No| B[Clone Repository]\n    AB --\u003e B\n    B --\u003e C[Analyze Code Structure]\n    C --\u003e D[Create Code Embeddings]\n    D --\u003e E[Generate Documentation]\n    D --\u003e F[Create Visual Diagrams]\n    E --\u003e G[Organize as Wiki]\n    F --\u003e G\n    G --\u003e H[Interactive DeepWiki]\n\n    classDef process stroke-width:2px;\n    classDef data stroke-width:2px;\n    classDef result stroke-width:2px;\n    classDef decision stroke-width:2px;\n\n    class A,D data;\n    class AA decision;\n    class B,C,E,F,G,AB process;\n    class H result;\n```\n\n## 🛠️ Project Structure\n\n```\ndeepwiki/\n├── api/                  # Backend API server\n│   ├── main.py           # API entry point\n│   ├── api.py            # FastAPI implementation\n│   ├── rag.py            # Retrieval Augmented Generation\n│   ├── data_pipeline.py  # Data processing utilities\n│   └── requirements.txt  # Python dependencies\n│\n├── src/                  # Frontend Next.js app\n│   ├── app/              # Next.js app directory\n│   │   └── page.tsx      # Main application page\n│   └── components/       # React components\n│       └── Mermaid.tsx   # Mermaid diagram renderer\n│\n├── public/               # Static assets\n├── package.json          # JavaScript dependencies\n└── .env                  # Environment variables (create this)\n```\n\n## 🛠️ Advanced Setup\n\n### Environment Variables\n\n| Variable | Description | Required | Note |\n|----------|-------------|----------|------|\n| `GOOGLE_API_KEY` | Google Gemini API key for AI generation | Yes |\n| `OPENAI_API_KEY` | OpenAI API key for embeddings | Yes |\n| `PORT` | Port for the API server (default: 8001) | No | If you host API and frontend on the same machine, make sure change port of `NEXT_PUBLIC_SERVER_BASE_URL` accordingly |\n| `NEXT_PUBLIC_SERVER_BASE_URL` | Base URL for the API server (default: http://localhost:8001) | No |\n\n### Docker Setup\n\nYou can use Docker to run DeepWiki:\n\n```bash\n# Pull the image from GitHub Container Registry\ndocker pull ghcr.io/asyncfuncai/deepwiki-open:latest\n\n# Run the container with environment variables\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -e GOOGLE_API_KEY=your_google_api_key \\\n  -e OPENAI_API_KEY=your_openai_api_key \\\n  -v ~/.adalflow:/root/.adalflow \\\n  ghcr.io/asyncfuncai/deepwiki-open:latest\n```\n\nOr use the provided `docker-compose.yml` file:\n\n```bash\n# Edit the .env file with your API keys first\ndocker-compose up\n```\n\n#### Using a .env file with Docker\n\nYou can also mount a .env file to the container:\n\n```bash\n# Create a .env file with your API keys\necho \"GOOGLE_API_KEY=your_google_api_key\" \u003e .env\necho \"OPENAI_API_KEY=your_openai_api_key\" \u003e\u003e .env\n\n# Run the container with the .env file mounted\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -v $(pwd)/.env:/app/.env \\\n  -v ~/.adalflow:/root/.adalflow \\\n  ghcr.io/asyncfuncai/deepwiki-open:latest\n```\n\n#### Building the Docker image locally\n\nIf you want to build the Docker image locally:\n\n```bash\n# Clone the repository\ngit clone https://github.com/AsyncFuncAI/deepwiki-open.git\ncd deepwiki-open\n\n# Build the Docker image\ndocker build -t deepwiki-open .\n\n# Run the container\ndocker run -p 8001:8001 -p 3000:3000 \\\n  -e GOOGLE_API_KEY=your_google_api_key \\\n  -e OPENAI_API_KEY=your_openai_api_key \\\n  deepwiki-open\n```\n\n### API Server Details\n\nThe API server provides:\n- Repository cloning and indexing\n- RAG (Retrieval Augmented Generation)\n- Streaming chat completions\n\nFor more details, see the [API README](./api/README.md).\n\n## 🤖 Ask \u0026 DeepResearch Features\n\n### Ask Feature\n\nThe Ask feature allows you to chat with your repository using Retrieval Augmented Generation (RAG):\n\n- **Context-Aware Responses**: Get accurate answers based on the actual code in your repository\n- **RAG-Powered**: The system retrieves relevant code snippets to provide grounded responses\n- **Real-Time Streaming**: See responses as they're generated for a more interactive experience\n- **Conversation History**: The system maintains context between questions for more coherent interactions\n\n### DeepResearch Feature\n\nDeepResearch takes repository analysis to the next level with a multi-turn research process:\n\n- **In-Depth Investigation**: Thoroughly explores complex topics through multiple research iterations\n- **Structured Process**: Follows a clear research plan with updates and a comprehensive conclusion\n- **Automatic Continuation**: The AI automatically continues research until reaching a conclusion (up to 5 iterations)\n- **Research Stages**:\n  1. **Research Plan**: Outlines the approach and initial findings\n  2. **Research Updates**: Builds on previous iterations with new insights\n  3. **Final Conclusion**: Provides a comprehensive answer based on all iterations\n\nTo use DeepResearch, simply toggle the \"Deep Research\" switch in the Ask interface before submitting your question.\n\n## 📱 Screenshots\n\n![DeepWiki Main Interface](screenshots/Interface.png)\n*The main interface of DeepWiki*\n\n![Private Repository Support](screenshots/privaterepo.png)\n*Access private repositories with personal access tokens*\n\n![DeepResearch Feature](screenshots/DeepResearch.png)\n*DeepResearch conducts multi-turn investigations for complex topics*\n\n### Demo Video\n\n[![DeepWiki Demo Video](https://img.youtube.com/vi/zGANs8US8B4/0.jpg)](https://youtu.be/zGANs8US8B4)\n\n*Watch DeepWiki in action!*\n\n## ❓ Troubleshooting\n\n### API Key Issues\n- **\"Missing environment variables\"**: Make sure your `.env` file is in the project root and contains both API keys\n- **\"API key not valid\"**: Check that you've copied the full key correctly with no extra spaces\n\n### Connection Problems\n- **\"Cannot connect to API server\"**: Make sure the API server is running on port 8001\n- **\"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\n\n### Generation Issues\n- **\"Error generating wiki\"**: For very large repositories, try a smaller one first\n- **\"Invalid repository format\"**: Make sure you're using a valid GitHub, GitLab or Bitbucket URL format\n- **\"Could not fetch repository structure\"**: For private repositories, ensure you've entered a valid personal access token with appropriate permissions\n- **\"Diagram rendering error\"**: The app will automatically try to fix broken diagrams\n\n### Common Solutions\n1. **Restart both servers**: Sometimes a simple restart fixes most issues\n2. **Check console logs**: Open browser developer tools to see any JavaScript errors\n3. **Check API logs**: Look at the terminal where the API is running for Python errors\n\n## 🤝 Contributing\n\nContributions are welcome! Feel free to:\n- Open issues for bugs or feature requests\n- Submit pull requests to improve the code\n- Share your feedback and ideas\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## ⭐ Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=AsyncFuncAI/deepwiki-open\u0026type=Date)](https://star-history.com/#AsyncFuncAI/deepwiki-open\u0026Date)\n","funding_links":["https://buymeacoffee.com/sheing"],"categories":["Python","TypeScript","A01_文本生成_文本对话","wiki","Tools"],"sub_categories":["大语言对话模型及数据","Miscellaneous"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAsyncFuncAI%2Fdeepwiki-open","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAsyncFuncAI%2Fdeepwiki-open","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAsyncFuncAI%2Fdeepwiki-open/lists"}