> ## Documentation Index
> Fetch the complete documentation index at: https://asyncfunc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Your First Wiki

> Step-by-step guide to creating your first repository wiki with DeepWiki-Open

Now that DeepWiki-Open is running, let's generate your first repository wiki! This guide walks you through the complete process from entering a repository URL to exploring the generated documentation.

## Quick Start

**1. Open DeepWiki Interface**

Navigate to [http://localhost:3000](http://localhost:3000) in your browser.

You should see the main DeepWiki interface with:

* Repository URL input field
* Model provider selection
* Generate Wiki button

> [!TIP]
>
> The interface loads without errors and shows all input fields.

**2. Choose a Test Repository**

For your first wiki, start with a small, well-structured repository:

> [tab] Beginner-Friendly Repos
>
> ```
> https://github.com/octocat/Hello-World
> https://github.com/microsoft/TypeScript-Node-Starter
> https://github.com/expressjs/express
> ```

> [tab] Medium Complexity
>
> ```
> https://github.com/microsoft/autogen
> https://github.com/openai/openai-python
> https://github.com/vercel/next.js
> ```

> [tab] Your Own Repository
>
> Enter your own repository URL:
>
> * GitHub: `https://github.com/username/repo-name`
> * GitLab: `https://gitlab.com/username/repo-name`
> * BitBucket: `https://bitbucket.org/username/repo-name`

> [!TIP]
>
> Start with repositories under 100 files for faster initial generation and testing.

**3. Configure AI Model**

Select your AI model provider and specific model:

> [accordion] Google Gemini (Recommended for Beginners)
>
> * **Provider**: Google
> * **Model**: `gemini-2.0-flash` (default)
> * **Why**: Fast, reliable, generous free tier
> * **Best for**: General documentation, good balance of speed and quality

> [accordion] OpenAI GPT Models
>
> * **Provider**: OpenAI
> * **Model**: `gpt-4o` (default)
> * **Why**: High-quality, detailed documentation
> * **Best for**: Complex codebases requiring detailed analysis

> [accordion] OpenRouter (Multiple Models)
>
> * **Provider**: OpenRouter
> * **Model**: `openai/gpt-4o` or `anthropic/claude-3.5-sonnet`
> * **Why**: Access to multiple providers through one API
> * **Best for**: Experimenting with different models

> [!WARNING]
>
> Ensure you have valid API keys configured for your chosen provider.

**4. Generate the Wiki**

Click the **"Generate Wiki"** button and watch the progress:

1. **Repository Analysis**: DeepWiki clones and analyzes the repository structure
2. **Code Processing**: Creates embeddings for intelligent code understanding
3. **AI Generation**: Generates documentation using your selected AI model
4. **Diagram Creation**: Creates Mermaid diagrams for visualization
5. **Wiki Assembly**: Organizes everything into a structured wiki

> [!NOTE]
>
> Generation typically takes 30 seconds to 2 minutes for small repos, 5-10 minutes for larger ones.

## Understanding the Generated Wiki

Once generation completes, you'll see your interactive wiki with several key sections:

### Wiki Structure

> [tab] Overview Section
>
> **What you'll see:**
>
> * Repository summary and purpose
> * Key features and functionality
> * Architecture overview
> * Main technologies used
>
> **Example content:**
>
> * Project description
> * Installation instructions
> * Usage examples
> * Contributing guidelines

> [tab] Code Analysis
>
> **What you'll see:**
>
> * File structure breakdown
> * Component relationships
> * Data flow analysis
> * Key functions and classes
>
> **Includes:**
>
> * Code snippets with explanations
> * Function parameter details
> * Class inheritance diagrams
> * Module dependencies

> [tab] Visual Diagrams
>
> **Mermaid diagrams showing:**
>
> * System architecture
> * Data flow
> * Component relationships
> * Process workflows
> * Database schemas (if applicable)
>
> **Interactive features:**
>
> * Zoom and pan diagrams
> * Clickable nodes
> * Responsive design

### Navigation Features

> [card] Wiki Tree View
>
> Hierarchical navigation showing all wiki pages and sections

> [card] Search Functionality
>
> Full-text search across all generated documentation

> [card] Cross-References
>
> Links between related pages and code sections

> [card] File References
>
> Direct links to source files and line numbers

## Using the Ask Feature

The Ask feature lets you chat with your repository using RAG (Retrieval Augmented Generation):

**1. Access Ask Interface**

Look for the "Ask" or chat interface in your generated wiki.

**2. Ask Questions**

Try these example questions:

```text General Questions theme={null}
What is the main purpose of this repository?
How do I install and run this project?
What are the key features?
```

```text Technical Questions   theme={null}
How does the authentication system work?
What databases does this project use?
Explain the API endpoints
```

```text Code-Specific Questions theme={null}
Show me the main entry point
How is error handling implemented?
What testing framework is used?
```

**3. Review Responses**

The AI will provide answers based on your actual repository code, including:

* Direct code references
* File locations
* Relevant context
* Example usage

## Deep Research Mode

For complex analysis, try the Deep Research feature:

**1. Enable Deep Research**

Toggle the "Deep Research" switch in the Ask interface.

**2. Ask Complex Questions**

Deep Research is perfect for questions like:

* "Analyze the security implementation across the entire codebase"
* "How is performance optimized in this application?"
* "Explain the complete data flow from user input to database"

**3. Review Multi-Turn Analysis**

Deep Research conducts multiple investigation rounds:

1. **Initial Analysis**: Basic research and findings
2. **Deep Dive**: Detailed investigation of specific aspects
3. **Cross-References**: Analysis of relationships and dependencies
4. **Final Synthesis**: Comprehensive conclusion with recommendations

## Customizing Your Wiki

### Model Selection

> [accordion] Switching Models Mid-Generation
>
> You can change models and regenerate sections:
>
> 1. Go to model configuration
> 2. Select a different provider/model
> 3. Regenerate specific sections
> 4. Compare results from different models

> [accordion] Custom Model Parameters
>
> For advanced users, you can adjust:
>
> * Temperature (creativity vs. consistency)
> * Top-p (response diversity)
> * Max tokens (response length)
> * Custom model names (for compatible providers)

### Private Repository Access

**1. Generate Personal Access Token**

> [tab] GitHub
>
> 1. Go to GitHub Settings → Developer settings → Personal access tokens
> 2. Generate new token (classic)
> 3. Select scopes: `repo` (for private repos)
> 4. Copy the generated token

> [tab] GitLab
>
> 1. Go to GitLab User Settings → Access Tokens
> 2. Create token with `read_repository` scope
> 3. Copy the generated token

> [tab] BitBucket
>
> 1. Go to BitBucket Account Settings → App passwords
> 2. Create password with `Repositories: Read` permission
> 3. Copy the generated password

**2. Add Token to DeepWiki**

1. Click "+ Add access tokens" in the DeepWiki interface
2. Paste your personal access token
3. The token is stored locally and used for repository access

**3. Generate Private Repo Wiki**

Now you can generate wikis for your private repositories using the same process.

> [!WARNING]
>
> Tokens are stored locally in your browser. Never share your access tokens.

## Troubleshooting Your First Wiki

> [accordion] Generation Failed
>
> **Common causes:**
>
> * Invalid repository URL
> * Private repository without access token
> * API key issues
> * Repository too large
>
> **Solutions:**
>
> 1. Verify the repository URL is accessible
> 2. Check API key configuration
> 3. Try a smaller repository first
> 4. Check the browser developer console for errors

> [accordion] Poor Quality Results
>
> **Possible issues:**
>
> * Wrong model selected
> * Repository has unusual structure
> * Limited code documentation
>
> **Improvements:**
>
> 1. Try a different AI model
> 2. Use OpenAI GPT-4 for complex repositories
> 3. Enable Deep Research mode
> 4. Ask specific questions to get better answers

> [accordion] Slow Generation
>
> **Normal for:**
>
> * Large repositories (1000+ files)
> * Complex codebases
> * Detailed analysis requests
>
> **Speed tips:**
>
> 1. Start with smaller repositories
> 2. Use faster models like `gemini-2.0-flash`
> 3. Avoid Deep Research for initial testing
> 4. Check your internet connection

## Example Walkthrough

Let's generate a wiki for the Express.js repository:

**1. Setup**

* Repository: `https://github.com/expressjs/express`
* Model: Google Gemini 2.0 Flash
* No authentication needed (public repo)

**2. Expected Results**

The generated wiki should include:

* Express.js framework overview
* Middleware architecture explanation
* Router and route handling
* Request/response cycle diagrams
* API reference for core methods

**3. Testing Ask Feature**

Try asking:

* "How does Express.js middleware work?"
* "Show me how to create a simple server"
* "Explain the routing system"

You should get detailed answers with code examples from the actual Express.js codebase.

## Next Steps

> [card] [Explore Advanced Features](https://asyncfunc.mintlify.site/guides/wiki-generation.md)
>
> Learn about advanced wiki generation options and customization

> [card] [Set Up Multiple Models](https://asyncfunc.mintlify.site/getting-started/model-providers.md)
>
> Configure multiple AI providers to compare results

> [card] [Production Deployment](https://asyncfunc.mintlify.site/guides/production-setup.md)
>
> Deploy DeepWiki for team or production use

> [card] [API Integration](https://asyncfunc.mintlify.site/api/overview)
>
> Integrate DeepWiki into your development workflow

Congratulations! You've successfully generated your first repository wiki with DeepWiki-Open. The AI-powered analysis and documentation generation should give you a comprehensive understanding of any codebase in minutes rather than hours of manual exploration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.