Skip to main content

Quick Start

Get drep up and running in 5 minutes. This tutorial walks you through configuration and your first repository scan.

Before You Begin

This tutorial assumes you have:

Step 1: Initialize Configuration

Create a configuration file with the interactive setup wizard:

bash
drep init

New in v1.1.0: Interactive Wizard

The setup wizard guides you through all configuration options with validation and helpful prompts. No more manual YAML editing!

The wizard will guide you through:

  1. Config Location: Choose between current directory or user config directory
  2. Platform Selection: Gitea, GitHub, or GitLab
  3. Enterprise Servers: Detect and configure GitHub Enterprise, self-hosted GitLab/Gitea
  4. Repository Patterns: Use wildcards (owner/*) or specific repos (owner/repo)
  5. LLM Backend: OpenAI-compatible (local), AWS Bedrock, or Anthropic
  6. Documentation Settings: Enable markdown linting, custom dictionaries
  7. Advanced Options: Database URL, LLM temperature, rate limits
$ drep init

============================================================
Welcome to drep configuration setup!
============================================================

Where would you like to store the configuration?
  1. Current directory (./config.yaml) - project-specific
  2. User config directory (~/.config/drep/config.yaml) - system-wide
Choose location [1]:

Which git platform are you using?
Choose platform (github, gitea, gitlab) [github]: github

Using GitHub Enterprise or github.com?
Use custom GitHub server? [y/N]:

Repository Patterns (comma-separated):
Examples: owner/repo, owner/*
Repositories []: owner/my-repo

LLM Provider Selection:
  1. OpenAI-compatible (LM Studio, Ollama, etc.)
  2. AWS Bedrock
  3. Anthropic
Choose provider [1]:

OpenAI-Compatible Configuration:
API Endpoint [http://localhost:1234/v1]:
Model name [qwen3-30b-a3b]:

... (documentation, advanced settings) ...

============================================================
✓ Configuration created successfully!
============================================================

Configuration saved to: ./config.yaml

Next steps:
1. Set GITHUB_TOKEN environment variable
2. Start your LLM server (LM Studio on port 1234)
3. Run: drep scan owner/my-repo

The wizard validates all inputs in real-time and prevents configuration errors before they happen.

Step 2: Configure LLM Backend

Edit config.yaml to point to your LLM server. For LM Studio (default port 1234):

yaml
llm:
  enabled: true
  endpoint: http://localhost:1234/v1  # LM Studio
  model: qwen3-30b-a3b
  temperature: 0.2
  max_tokens: 8000
  cache:
    enabled: true
    ttl_days: 30

For Ollama, use http://localhost:11434/v1 as the endpoint.

Step 3: Set Up Platform

Configure your Git platform (Gitea, GitHub, or GitLab). For Gitea:

yaml
gitea:
  url: http://localhost:3000
  token: ${GITEA_TOKEN}
  repositories:
    - owner/*  # Monitor all repos for this owner

Set your token as an environment variable:

bash
export GITEA_TOKEN=your_token_here

Token Security

Never commit tokens to version control. Use environment variables (${GITEA_TOKEN}) or a .env file that's gitignored.

Step 4: Run Your First Scan

Scan a repository with drep:

bash
# Format: owner/repository
drep scan slb350/drep

# Or scan local path
drep scan /path/to/local/repo

Repository Format

Use owner/repo format for remote repos (e.g., slb350/drep, octocat/Hello-World) or provide a local file path (e.g., /path/to/repo, ~/projects/myapp).

drep will:

  1. Clone the repository
  2. Analyze all Python files for documentation issues
  3. Check code quality and detect potential bugs
  4. Create issues in your Git platform with findings

You'll see progress output:

Scanning owner/repository...
✓ Cloned repository
✓ Analyzing documentation (15 files)
✓ Running code quality analysis
✓ Created 3 issues with findings
✓ Scan complete

Understanding Results

drep creates issues in your Git platform for each finding. Issues include:

CLI Commands Overview

drep provides several commands for different workflows:

Command Description
drep init Create config.yaml with defaults
drep validate Validate your configuration file
drep scan owner/repo Scan a repository and create issues
drep review owner/repo 42 Review pull request #42 with inline comments
drep serve Start webhook server for automated reviews
drep metrics Show LLM usage statistics
drep lint-docs Lint markdown files without LLM

Next Steps

Now that you've run your first scan, explore more features:

Configuration

Learn about all configuration options, rate limiting, caching, and circuit breakers.

View Configuration Guide

Examples

See webhook setup, CI/CD integration, Docker deployment, and real-world workflows.

View Examples

You're All Set!

drep is now scanning your repositories for code quality and documentation issues. Check your Git platform for issues created by drep.