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

# Quickstart

> Get started with Patched in under 5 minutes.

<Steps>
  <Step title="Create an account">
    [Sign up](https://app.patched.codes) using your preferred option - OAuth using GitHub/GitLab, or simple login via Email.

    <div style={{ display: 'flex', justifyContent: 'center' }}>
      <img className="block h-64 dark:hidden" src="https://mintcdn.com/patchedcodes/CMl2howFh2KkUkKh/images/login-light.png?fit=max&auto=format&n=CMl2howFh2KkUkKh&q=85&s=dd43e16bd2b0a1863f5fcd28f9bc0ebe" alt="Login Screen" style={{ borderRadius: '8px' }} width="844" height="1020" data-path="images/login-light.png" />

      <img className="hidden h-64 dark:block" src="https://mintcdn.com/patchedcodes/CMl2howFh2KkUkKh/images/login-dark.png?fit=max&auto=format&n=CMl2howFh2KkUkKh&q=85&s=f66d984d4c9f4fcc8b987a0e9dbfd8d0" alt="Login Screen" style={{ borderRadius: '8px' }} width="844" height="1020" data-path="images/login-dark.png" />
    </div>

    <Info>
      Using GitHub or GitLab to sign in **does not** automatically give Patched access your repositories.
    </Info>
  </Step>

  <Step title="Add Repositories">
    Enable acccess to your repositories.

    <AccordionGroup>
      <Accordion title="GitHub" icon="github">
        1. Choose 'GitHub' on the onboarding screen and click 'Install Patched on GitHub'.
        2. You will be redirected to GitHub to approve access to your repositories. You can specify exactly which repositories Patched will have access to.
        3. Next, you will be redirected back to the 'Manage Repositories' screen.
        4. Click the '+' button next to the repository you want to start patching.
        5. Click 'Back to Repositories' and you should see the repository in the list as well as a 'Patch' button next to it.
      </Accordion>

      <Accordion title="Gitlab" icon="gitlab">
        1. Choose 'Gitlab' on the onboarding screen and click 'Install Patched on Gitlab'.
        2. You will be asked to provide an access token. You can generate one [here](https://gitlab.com/-/profile/personal_access_tokens).
        3. Next, you will be redirected to the 'Manage Repositories' screen.
        4. Click the '+' button next to the repository you want to start patching.
        5. Click 'Back to Repositories' and you should see the repository in the list as well as a 'Patch' button next to it.
      </Accordion>

      <Accordion title="CLI" icon="rectangle-terminal">
        1. Choose 'CLI w/ API Key' on the onb screen and click 'Get an API Key'.
        2. You will be directed to the 'Settings' page, where you can generate and copy an API key.
        3. In your CLI terminal, set an environment variable called `PATCHED_API_KEY` with the copied value.
        4. Also in your CLI terminal, install the patched client by running `pip install patchwork-cli`.
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="Trigger Patchflows">
    Trigger your first patchflow.

    <AccordionGroup>
      <Accordion title="Dashboard" icon="window">
        1. Click the 'Patch' button next to the repository you'd like to patch.
        2. In the pop-up modal, choose the patchflow you'd like to run. You can learn more about the patchflows [here](/patchflows/overview).
        3. Fill in the patchflow specific input values as needed, and click 'Patch'.
        4. If the patch was triggered successfully, you should see a toast notificaton on the bottom right.
      </Accordion>

      <Accordion title="CLI" icon="rectangle-terminal">
        1. Navigate to the root folder of the code repository you want to patch.
        2. Run `patchwork <NameOfPatchflow>`. The default patchflows are `AutoFix`,`GenerateREADME`,`GenerateDocstring` and `PRReview`. You can learn more about the patchflows [here](/patchflows/overview).
      </Accordion>
    </AccordionGroup>
  </Step>

  <Step title="View Results">
    View your patchflow results by clicking the 'Details' button next to the repository you just patched.
  </Step>

  <Step title="Building Patchflows">
    You can also build your own patchflows by clicking the 'Patchflow' button on the top navigation, followed by clicking the 'Add' button the top-right.

    <div style={{ display: 'flex', justifyContent: 'center' }}>
      <img src="https://mintcdn.com/patchedcodes/CMl2howFh2KkUkKh/images/patchflow-builder-customize-a-patchflow.gif?s=5a4237f8ef7536d07f4a616df734e313" alt="A gif showing how one can create a new patchflow or custom an existing one." style={{ borderRadius: '8px' }} className="h-128" width="716" height="448" data-path="images/patchflow-builder-customize-a-patchflow.gif" />
    </div>
  </Step>
</Steps>

And that's it! Congrats on successfully getting started with Patched. This quickstart covers the core elements, but there is a lot more that you can do with Patched. You will find more details in the rest of the docs, but if you ever get stuck reach out to us [via email](mailto:support@patched.codes) or join our [discord](https://discord.gg/XDxA3mJyhE).
