code-review-agent/QUICKSTART.md
Primakov Alexandr Alexandrovich 09cdd06307 init
2025-10-12 23:15:09 +03:00

107 lines
2.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 🚀 Быстрый старт за 5 минут
## 1⃣ Установка Ollama (1 мин)
```bash
# Скачайте и установите с https://ollama.ai/
# Загрузите модель
ollama pull codellama
# Проверьте, что Ollama запущен
ollama list
```
## 2⃣ Backend (2 мин)
```bash
cd backend
# Создайте venv и установите зависимости
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Создайте .env
echo "SECRET_KEY=$(openssl rand -hex 32)" > .env
echo "ENCRYPTION_KEY=$(openssl rand -hex 32)" >> .env
echo "OLLAMA_BASE_URL=http://localhost:11434" >> .env
echo "OLLAMA_MODEL=codellama" >> .env
# Запустите backend
uvicorn app.main:app --reload
```
✅ Backend запущен на http://localhost:8000
## 3⃣ Frontend (2 мин)
```bash
# Новый терминал
cd frontend
# Установите зависимости
npm install
# Запустите frontend
npm run dev
```
✅ Frontend запущен на http://localhost:5173
## 4⃣ Первый репозиторий
1. Откройте http://localhost:5173
2. Перейдите в **Репозитории****+ Добавить репозиторий**
3. Заполните:
- **Название**: test-repo
- **Платформа**: Gitea
- **URL**: https://your-gitea.com/owner/repo
- **API Token**: ваш токен
4. Скопируйте **Webhook URL**
5. Добавьте webhook в Gitea (Settings → Webhooks)
## 5⃣ Тест
Создайте Pull Request в вашем репозитории → AI агент автоматически начнет ревью! 🎉
---
## 🐛 Проблемы?
### Ollama не запускается
```bash
# Проверьте статус
ollama list
# Перезапустите
ollama serve
```
### Backend ошибка
```bash
# Проверьте .env файл
cat backend/.env
# Проверьте логи
tail -f logs/app.log
```
### Frontend не подключается
```bash
# Проверьте что backend запущен
curl http://localhost:8000/health
# Очистите кеш
cd frontend
rm -rf node_modules .vite
npm install
```
## 📚 Дальше
- [Полная документация](README.md)
- [API документация](http://localhost:8000/docs)
- [Contributing](CONTRIBUTING.md)