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

> ## Agent Instructions
> Agents: start with https://docs.pre.dev/agents.md, which has complete recipes, plan access, polling rules, errors and limits.
> Authenticate with the workspace API key (pdk_…) from Integrations → Built-in, sent as Authorization: Bearer <key>.
> REST API: https://api.pre.dev (OpenAPI: https://docs.pre.dev/api-reference/openapi.json). AI Gateway: https://api.pre.dev/v1, OpenAI-compatible (OpenAPI: https://docs.pre.dev/api-reference/ai-gateway.openapi.json).
> pre.dev MCP server: npx -y @predotdev/mcp setup adds it to every local coding agent with every pre.dev tool plus the user's own Chrome; the hosted server is https://api.pre.dev/mcp. Search these docs over MCP at https://docs.pre.dev/mcp.

# Import a repository

> Understand an existing GitHub codebase and build on its conventions.

Import connects a GitHub repository to a hosted pre.dev project. For code already on your machine, you can also [use the CLI directly](https://predev.mintlify.site/cli/existing-repos.md).

**1. Choose the repository**

Select **Import**, then choose an accessible repository or supply its URL. Connect the GitHub account that can access private repositories. Organization access depends on the permissions granted in GitHub.

**2. Map the codebase**

Let pre.dev analyze the code, dependencies, and structure. Use `/reverse` to refresh the architecture after significant changes. The output depends on the code and configuration available to the agent.

**3. Configure the runtime**

Review the installation and start commands, and fill required environment variables in **Project setup → API Keys**. An imported repository may need project-specific services or setup before its preview runs.

**4. Request a focused change**

Describe the desired behavior and the conventions to preserve.

```text theme={null}
Add a wishlist to the existing shop. Reuse the current auth,
database access layer, and component library. Include an empty
state and verify that one user cannot read another user's list.
```

**5. Review the changes**

Inspect the diff and reported checks, test the preview if available, and use the project's Git workflow to merge and deploy.

For multiple connected GitHub accounts, check the account selected in **Project setup → Connections**. A project can pin one account or inherit its workspace default. See [GitHub integration](https://predev.mintlify.site/coding-agent/projects/github-integration.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.