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

# Map a repo

> Add a repo, find its endpoints, choose which to map, check the credit estimate, follow the run, and see how plan limits and credits affect a map.

Mapping turns a repo's entry points into flows in two stages. First Flowmaps **finds endpoints**: it reads the code at the head of the default branch and lists the places work starts that it finds. Then you **choose endpoints** to map, and Flowmaps traces each one into a flow. You decide what to map, so you can start with the handful of endpoints you care about and add the rest later.

## Add a repo

On **Repos**, choose **Add a repo**. If you haven't linked your GitHub account yet, choose **Connect GitHub** first; see [Connect GitHub](https://docs.flowmaps.ai/mapping/connect-github.md).

The dialog lists every repo you can read on GitHub where the Flowmaps GitHub App, Flowmaps Bot, is installed, whichever Flowmaps account you're in. Pick the GitHub account or organization at the top if there's more than one, search, and choose **Add**. The repo appears on **Repos** as **Not mapped**. Adding a repo reads no code and uses no credits; it counts toward your plan's repos.

* **A repo is missing.** If the App was installed somewhere new since you last connected, choose **Refresh from GitHub**. If it reaches only selected repos, choose **Change on GitHub** to add yours. See [Troubleshooting](https://docs.flowmaps.ai/help/troubleshooting.md#adding-a-repo).
* **"In (workspace)" instead of Add.** Another workspace of this account already has the repo. A repo sits in one workspace of each account, so the account never maps and pays for it twice.
* **On a team**, the first repo from a GitHub account or organization the team doesn't use yet is added by an owner or admin. See [Teams and members](https://docs.flowmaps.ai/account/teams.md#how-a-team-gets-its-repos).

### The same repo in several accounts

You can add a GitHub repo that's already in another Flowmaps account, such as your personal account and your team's. Each account maps the repo itself and pays for that work from its own credits: finding endpoints, maps, merge updates and previews. Its flows, history and settings are its own, and each account posts [its own check](https://docs.flowmaps.ai/mapping/connect-github.md#check-names) on pull requests.

Your GitHub account can add one repo to at most 3 Flowmaps accounts, counting accounts you've since left. Past that, adding it says "Your GitHub account already has this repo in 3 other Flowmaps accounts, the most it may." Remove it from one of them first, or ask an admin of an account you've left to remove it there.

> [!TIP]
>
> If you've already mapped a repo in your personal account and now want it in a team, [move the workspace into the team](https://docs.flowmaps.ai/account/workspaces.md#move-a-workspace-into-a-team) instead of adding the repo again. Moving keeps its flows and history, so nothing is mapped or charged again.

## The repo's row on Repos

Each row on **Repos** shows the repo, a status, counts of **Flows**, **Endpoints** and **Vendors** (each number opens its list), the last run with its commit, and one main action:

| Status | What it means | Action |
| - | - | - |
| **Not mapped** | Added, nothing read yet. | **Find endpoints** |
| **Finding endpoints** | Reading the code for entry points. | **See endpoints** |
| **Endpoints found** | The list is ready and nothing is mapped yet. | **Choose endpoints** |
| **Mapping** | A map run is going. | **See progress** |
| **Mapped** | Flows are mapped and current. | **Re-map** |
| **Behind main** | Flows are mapped at an older commit than the head of the default branch (the badge names your branch). | **Re-map** |
| **Paused**, **Failed** | A run stopped; the row says why. | **See what stopped** or **Retry** |
| **Cancelled** | Someone cancelled the last run; the row names them. | Depends on what's left |

The row's **…** menu has **Settings** (the repo's [PR preview and model settings](https://docs.flowmaps.ai/account/repo-settings.md)), **Discover again**, **Cancel run** while a run is going, and **Delete repo**.

## Find endpoints

Choose **Find endpoints** on the repo's row. The discovery page shows, live:

* A clock, and the commit and branch being read.
* Four counts: **Files in the repo**, **Chosen to read**, **Files read** and **Endpoints found**.
* A bar of the chosen files by state (endpoints found, read with none, reading, waiting, not read).
* **Progress**: each stage with its time, from fetching the code and installing dependencies, through matching known frameworks and reading the chosen files, to checking unsure endpoints and saving the list.
* **Latest**: a running feed, such as "Found 4 endpoints in orders.ts".
* The repository panel, a file tree showing what was read and where endpoints were found.

You can leave the page; discovery keeps going. **Cancel** stops it, and what it used so far is still charged. When it finishes, a banner reports "Found N endpoints" and how many code files were read; choose **Choose endpoints**.

### When discovery is incomplete

Sometimes discovery can't read every file that may hold endpoints, for example when a file is too large or a limit was reached. A **Discovery is incomplete** banner then says how many files weren't read and why, and lists them. You can map what was found so far, or choose **Read the rest** (with its estimate in credits) to read the remaining files and add what they hold to the same list. If an older version of discovery made the list, the banner offers **Discover again** instead.

Discovery can also leave **notes** under the list, such as a route it couldn't place. See [What Flowmaps finds](https://docs.flowmaps.ai/mapping/what-flowmaps-finds.md#unresolved-entry-points).

## Choose endpoints

The endpoint list is titled "Found N endpoints in (repo)" and names the commit it was read at.

![The endpoint list grouped by route prefix and service, with checkboxes, kind tags and a filter by trigger kind](https://mintcdn.com/flowmaps/Laxd03p6_qALyN3o/images/endpoints-light.png?fit=max\&auto=format\&n=Laxd03p6_qALyN3o\&q=85\&s=43f998d859ea5381a4ce204994cbff4c)

Choose endpoints: grouped by service, route prefix, queue or program, with a filter by kind.

* **Filter** by trigger kind (All, HTTP, RPC, Webhook, Queue, Schedule, CLI and so on), with counts, or **search** names and keys (two characters or more).
* **Groups** collect endpoints by RPC service, route prefix, GraphQL type, broker, scheduled jobs or CLI program. Tick a group's name to select all of it; long groups show the first nine with **Show N more**.
* Each row shows the endpoint's kind, name and key. An **Unconfirmed** badge marks one Flowmaps found by reading the code but couldn't confirm.
* Rows already mapped show their state, such as **Ready** with **Open flow**.

The bar at the bottom shows "N selected" and an estimate such as "About 1,300 credits", based on what a flow in this workspace usually uses on its current models. Endpoints you skip stay listed as unmapped, to map later. If the branch has moved since the list was read, the bar says so, and **Map** reads the new commit for endpoints first.

Choose **Map N flows** to start.

### Your first map is free

Your account's first map uses no credits. It starts with your account's first **Find endpoints**, which it covers too, runs on Basic models and maps up to 25 flows on the Free plan, or up to 50 on a paid plan. If you select more, the first ones are mapped and the rest stay unmapped for a later map. The free map is used once per account: cancelling it or deleting its flows doesn't give it back. Later runs of **Find endpoints** use credits. (If the account's data policy rules out Basic models, the first map runs on your own models and is charged.) See [Credits and usage](https://docs.flowmaps.ai/billing/credits.md).

## Follow the run

The progress page is titled "Mapping N flows in (repo)", with a clock, a **Cancel run** button and four counts: **Flows ready**, **Being traced now**, **Files read** and **Steps written**.

![The mapping progress page with counts of flows ready, a stage bar, the run's progress steps, a feed of recent events and a file tree of the files read](https://mintcdn.com/flowmaps/Laxd03p6_qALyN3o/images/map-progress-light.png?fit=max\&auto=format\&n=Laxd03p6_qALyN3o\&q=85\&s=4eb2fb3b9e8fc80a7e3485d8dc82f49e)

Mapping progress: counts, a bar of flows by stage, the run's progress, a live feed and the files read.

Below them, a bar shows every flow in the run by stage, and **Flows in this run** lists each one with its time and a badge, such as:

* **Queued**: waiting to start.
* **Tracing**: its calls are being followed from the handler.
* **Verifying**: each step is being checked against the lines it cites.
* **Ready**: done; **Open flow** opens it right away. Links to other flows fill in as more are mapped.
* **Paused**, **Failed**, **Cancelled**: stopped, with the reason on the row and a **Retry** button.
* **Not mapped**: the run ended before it reached this flow.

You can leave the page; finished flows open from **Flows** as soon as they're ready.

## Cancel a run

Choose **Cancel run**. The dialog says how many flows that aren't ready stop now; ready flows stay, and what the run used so far is still charged. Choose **Cancel run** to confirm or **Keep running** to go back. Afterwards the page says who cancelled it and offers **Retry** on the flows that didn't finish.

## Plan limits

Each plan caps how many repos you can map and how many flows they hold in total:

| Plan | Repos | Mapped flows |
| - | - | - |
| Free | 1 | 25 |
| Starter | 3 | 75 |
| Developer | 10 | 250 |
| Pro | 20 | 1,000 |
| Team | Unlimited | Unlimited |

* **Repos.** When you reach the plan's repo count, **Add a repo** is turned off and a note names the plan that maps more.
* **Flows.** Endpoints past the plan's flow count are skipped in the run, with a reason such as "past the Starter plan's 75 flows; Developer maps up to 250".
* **After a downgrade,** repos past the new plan's count keep their flows and stay readable, but their merges wait until you upgrade; their rows say "Not updating" and why. Nothing is deleted.

See [Plans](https://docs.flowmaps.ai/billing/plans.md) for everything each plan includes.

## When credits run out

If your balance reaches zero during a run, the run pauses: the page reads "Mapping paused: out of credits". Flows that were already ready stay. The run picks up again when credits arrive, from your next monthly grant, a credit pack or automatic top-up, and each paused flow also has a **Retry** button. An admin can also set a monthly limit for the account on **Settings › Usage**; reaching it pauses runs the same way. See [Credits and usage](https://docs.flowmaps.ai/billing/credits.md).

## Next steps

> [card] [Read a flow](https://docs.flowmaps.ai/flows/flow-view.md)
>
> Open a ready flow and see what each part means.

> [card] [Keep flows current](https://docs.flowmaps.ai/mapping/keeping-flows-current.md)
>
> Merges, re-maps and re-checks.


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