Metadata-Version: 2.4
Name: gitrekt
Version: 0.2.0
Summary: Detects when code comments and docstrings go stale compared to actual code.
Author-email: gitrekt Test <gitrekt@test.com>
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: tree-sitter>=0.25.0
Requires-Dist: tree-sitter-python>=0.25.0
Requires-Dist: tree-sitter-javascript>=0.25.0
Requires-Dist: tree-sitter-typescript>=0.23.0
Requires-Dist: gitpython>=3.1.0
Requires-Dist: click>=8.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: watchdog>=3.0.0
Requires-Dist: groq>=0.9.0
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.20.0

![GitRekt Banner](media/gitrekt_banner.svg)

# GitRekt

**Your codebase has a secret language. GitRekt translates it.**

GitRekt is a VS Code extension that does two things: it finds places in your code where the explanations are missing or out of date, and it lets you ask plain-English questions about your entire project and get instant, accurate answers with clickable links to the exact file and line.

---

## What can you ask GitRekt?

> *"Where is the database password stored?"*
> *"Which functions have no explanation?"*
> *"How does the login flow work?"*
> *"Where are HTTP requests made?"*
> *"What does the `parseRetryAfterMs` function do?"*
> *"Which files handle user authentication?"*
> *"Where is the API key set?"*
> *"How does error handling work in this project?"*

---

## Installation

### Step 1 — Install Python
Download Python from [python.org](https://www.python.org/downloads/).
**Important:** During installation, tick the box that says **"Add Python to PATH"**.

### Step 2 — Install the GitRekt backend
Open a terminal (search for "Terminal" or "Command Prompt" on your computer) and run:
```
pip install gitrekt
```

### Step 3 — Install the VS Code extension
1. Open VS Code
2. Press `Ctrl+Shift+X` to open the Extensions panel
3. Search for **"GitRekt"**
4. Click **Install**

> **Note:** GitRekt will try to install the Python backend automatically when it first starts. If that doesn't work, run `pip install gitrekt` manually in your terminal.

### Step 4 (Optional) — Install Ollama for offline AI
[Ollama](https://ollama.com) lets GitRekt answer questions about your code even without an internet connection.
1. Download Ollama from [ollama.com](https://ollama.com)
2. After installing, open a terminal and run: `ollama pull llama3`
3. GitRekt will automatically detect and use the best model you have installed

### Step 5 (Optional) — Get a free NVIDIA API key
For faster, cloud-powered answers, get a free key from [build.nvidia.com](https://build.nvidia.com).
Add it to `.docdrift/config.json` in your project:
```json
{
  "nvidia_api_key": "nvapi-your-key-here"
}
```

---

## How it works

- **Scans your project** using real code analysis (no internet required, no AI needed for scanning)
- **Builds a searchable map** of every function, class, and file in your project
- **Answers questions** by finding the relevant code and explaining it in plain English

---

## What GitRekt will never do

- **Never sends your code to the internet for scanning** — the drift scan runs 100% on your machine
- **Never requires a paid subscription** — the core features are completely free
- **Never stores your code anywhere** — everything stays on your computer

---

## Usage

| Action | How |
|--------|-----|
| Open chat | Press `Ctrl+Shift+G` |
| Run a scan | Click the search icon in the GitRekt sidebar |
| Ignore an issue | Hover over it and click the 👁 button |
| Fix a missing comment | Hover over it and click the ✨ button |
| Undo a fix | Press `Ctrl+Z` in the file |

---

## Setup for your project

Copy `.docdrift/config.example.json` to `.docdrift/config.json` and fill in your API key (optional):

```json
{
  "nvidia_api_key": "nvapi-your-key-here"
}
```

**Never commit `config.json`** — it's already in `.gitignore`.

---

## Contributing

GitRekt is open source (MIT). Pull requests welcome.

```
git clone https://github.com/your-username/gitrekt
pip install -e .
```

---

*Built to make every developer's codebase feel like home.*
