> ## Documentation Index
> Fetch the complete documentation index at: https://www.greptile.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Developer Essentials

> Essential guide for developers using Greptile: trigger reviews with @greptileai, train the AI with reactions, ask follow-up questions, and troubleshoot issues.

This guide covers what you need to know when working with Greptile in your day-to-day workflow.

## Triggering Reviews

Tag Greptile in a GitHub/GitLab comment to trigger a review:

```text theme={}
@greptileai
```

You can also ask specific questions:

```text theme={}
@greptileai check for memory leaks
@greptileai review the database queries
@greptileai is this thread-safe?
```

<Note>
  If `@greptileai` doesn't trigger a review, check:

  1. Repository is enabled in dashboard
  2. PR isn't in an excluded branch
  3. Greptile isn't still indexing (first time takes a couple of hours)
</Note>

### Draft PRs

By default, Greptile **skips draft PRs** to reduce noise.

To review a draft:

```text theme={}
@greptileai review this draft
```

***

## Example Prompts

### Code improvements

```text theme={}
@greptileai are there code improvements I can make?
```

<Frame>
  <img src="https://mintcdn.com/greptile/pPDrEYn7_-Bi_2Mg/images/follow-up-question.png?fit=max&auto=format&n=pPDrEYn7_-Bi_2Mg&q=85&s=d202b42e4479f9fca7e3cd257c3ce77a" alt="Follow-up question" width="935" height="837" data-path="images/follow-up-question.png" />

  <figcaption>Ask for improvements</figcaption>
</Frame>

### Explain code

```text theme={}
@greptileai can you explain the code in this file?
```

<Frame>
  <img src="https://mintcdn.com/greptile/pPDrEYn7_-Bi_2Mg/images/greptile-explain-code.png?fit=max&auto=format&n=pPDrEYn7_-Bi_2Mg&q=85&s=67b5ed0ec9b699107f15b372d6c88ebf" alt="Greptile explains code" width="952" height="884" data-path="images/greptile-explain-code.png" />

  <figcaption>Get explanations</figcaption>
</Frame>

### Generate tests

```text theme={}
@greptileai can you create a test for this file?
```

<Frame>
  <img src="https://mintcdn.com/greptile/pPDrEYn7_-Bi_2Mg/images/greptile-create-test-code.png?fit=max&auto=format&n=pPDrEYn7_-Bi_2Mg&q=85&s=0256c50563b0cc1dd9dcee76a826d298" alt="Greptile generates tests" width="952" height="798" data-path="images/greptile-create-test-code.png" />

  <figcaption>Generate test cases</figcaption>
</Frame>

***

## Training Greptile

Your reactions shape future reviews:

| Action             | What Greptile Learns             |
| ------------------ | -------------------------------- |
| 👍 on a comment    | "Keep flagging issues like this" |
| 👎 on a comment    | "Stop mentioning this pattern"   |
| Reply with context | "This is our pattern because..." |

<Note>
  It takes 2-3 weeks of consistent reactions for Greptile to adapt to your team's preferences.
</Note>

### Providing Context

When Greptile flags something intentional, explain why:

```text theme={}
@greptileai This is intentional - we use sync calls here 
because the webhook requires immediate response
```

When Greptile misses something:

```text theme={}
@greptileai you missed a null check on line 45
```

Both help Greptile learn your patterns.

***

## Troubleshooting

<Accordion title="Review didn't appear">
  **Check:**

  1. Repo enabled in dashboard
  2. Indexing complete (first time: a couple of hours)
  3. Not a draft PR
  4. Branch not excluded by filters

  **Fix:** Comment `@greptileai` to force a review
</Accordion>

<Accordion title="Too many/too few comments">
  **Too many?** Ask admin to increase severity threshold, or 👎 unwanted patterns consistently.

  **Too few?** Check if repo is fully indexed, or lower severity threshold.
</Accordion>

<Accordion title="Reviews taking too long">
  * Small PR: \~1-2 minutes
  * Medium PR: \~3 minutes
  * Large PR: 3-5 minutes

  If longer, repository might be re-indexing.
</Accordion>

***

## What's Next

* [Training the learning system →](/code-review/training-the-learning-system)
* [Auto-fix with MCP →](/mcp-v2/overview)
* [Control nitpickiness →](/code-review/controlling-nitpickiness)
