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

# Generate Documentation

> Turn any Apex class, trigger, or LWC into a clear technical document — one command.

Inherited a tangled org? Onboarding a teammate? kipmox reads any Salesforce file and writes a clear, accurate document — purpose, key methods, and dependencies — without you writing a word.

## How it works

kipmox parses the **structure** of your code locally, then the AI writes the prose. Because the facts come straight from your source, the document stays accurate — it describes what the code actually does, not a guess.

<Steps>
  <Step title="Open a file">
    Open any Apex class, trigger, or Lightning Web Component.
  </Step>

  <Step title="Run Explain this code">
    Run **kipmox: Explain this code** — from the Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`), or by right-clicking the file in the editor or the Explorer.
  </Step>

  <Step title="Read the document">
    A document opens beside your editor — overview, key methods, dependencies, and the file's analysis findings.
  </Step>
</Steps>

<Frame>
  <img src="https://mintcdn.com/moxycode/h8Qb-_2xOx_QG1GA/images/generate-documentation-panel.png?fit=max&auto=format&n=h8Qb-_2xOx_QG1GA&q=85&s=3c6089365fcca37afaa7f48cc804ecc1" alt="kipmox documentation panel for an Apex class" width="1456" height="1012" data-path="images/generate-documentation-panel.png" />
</Frame>

## What's in a document

| Section               | What it covers                                                                                                          |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Overview**          | What the class, trigger, or component does, in plain English                                                            |
| **Key methods**       | Each method and what it's responsible for                                                                               |
| **References**        | The objects, fields, and other classes it depends on                                                                    |
| **Analysis findings** | The static-analysis results for the file — the same issues kipmox flags inline (SOQL-in-loops, security gaps, and more) |

## What it works on

* **Apex** — classes and triggers
* **Lightning Web Components** — the full bundle (JavaScript, HTML, metadata)

<Note>
  On the **Free** plan you can generate **2 documents every 4 hours**. **Pro** is never blocked. See [Plans & Limits](/help/plans-and-limits). Documentation works **online or offline**, like every kipmox AI action — see [Offline Mode](/configuration/offline-mode).
</Note>

## Common questions

<AccordionGroup>
  <Accordion title="How do I generate a document?">
    Open the file, then run **kipmox: Explain this code** from the Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`) — or right-click the file (in the editor or the Explorer) and choose **kipmox: Explain this code**.
  </Accordion>

  <Accordion title="Which files can I document?">
    Apex **classes** and **triggers**, and Lightning Web **Components** (the full bundle). Open one of these before running the command.
  </Accordion>

  <Accordion title="How accurate is the document?">
    kipmox reads your code's structure straight from the source, then the AI writes the prose around those facts — so the overview, methods, and references reflect what the code actually does, not a guess. The document also includes the file's static-analysis findings.
  </Accordion>

  <Accordion title="Can I generate documentation offline?">
    Yes, on **Pro** — with [Offline Mode](/configuration/offline-mode) the document is generated by a local model and your code never leaves your machine.
  </Accordion>

  <Accordion title="How many documents can I generate?">
    On **Free**, 2 documents every 4 hours. **Pro** is never blocked. See [Plans & Limits](/help/plans-and-limits).
  </Accordion>

  <Accordion title="Explain this code isn't doing anything">
    Make sure a supported file (`.cls`, `.trigger`, `.js`, `.html`) is the **active** editor tab. Documentation also counts toward your plan, so you may be prompted to [sign in](/getting-started/installation#sign-in) after your first couple of requests.
  </Accordion>
</AccordionGroup>

<CardGroup cols={2}>
  <Card title="How fixes are verified" icon="circle-check" href="/trust/how-fixes-are-verified">
    Every AI change is checked before you rely on it
  </Card>

  <Card title="Offline Mode" icon="wifi-slash" href="/configuration/offline-mode">
    Run kipmox fully local — your code stays on your machine
  </Card>
</CardGroup>
