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

# Setup

> Choose what Xerg maps from your GitHub: every repo or some, which apps, source files or config only, and services your code no longer uses.

Setup opens after you sign up with GitHub and install the Xerg App, before your first map. Owners and admins see it; everyone else's mapping follows what it says.

## Quick setup

The quick setup comes first and is already chosen. It maps every repo the app can see, except forks and archived repos, and it reads config files, env variable names, and source files' imports and API hostnames. Choose **Map N repos** and the map fills in.

## Advanced options

Open **Advanced options** to change what Xerg maps:

| Option | Default | What it does |
| - | - | - |
| Repos | All the app can see | Or choose which ones. Which repos the app can see at all is still set on GitHub ("choose repos"). |
| Apps | All | Once there's a map, lists the apps found in each repo. Untick one, like an experiment in a monorepo, to leave it out: nothing in its folder is read. |
| Read source files for imports and API hostnames | On | Off: Xerg reads config files and env variable names only, and never downloads a source file. See [What Xerg reads](https://xerg.ai/docs/what-xerg-reads.md). |
| Find services the code no longer uses | Off | Marks services that a manifest, an env variable or a connected account lists, but that no source file imports or calls. Needs source files. |
| Include forks and archived repos | Off | Maps them too. |

Everything Xerg does here only reads.

## Services the code no longer uses

With **Find services the code no longer uses** on, a service like this shows faded on the map and says **Unused** in its details, with where it was found: for example, a payments package in `package.json` and its key in `.env.example`, with no file importing it.

Xerg only marks a service when it read every source file in the repos that list it. A repo with more source files than Xerg reads, or whose source wasn't read, can't prove a service is unused, so nothing there is marked. A service is also in use if it sends your app webhooks, runs beside it (Docker Compose), or is set up in Terraform or a database schema.

## Running setup again

Next to **choose repos** in the workspace, choose **settings** (owners and admins), then **Run setup again**. Setup opens with your current choices; change them and choose **Map N repos**. Repos setup now leaves out come off the map, and the rest are mapped again. Every later **Re-map all** follows the same choices.

Settings also has:

* **Connect another service…**, for an account nothing in your code points to. See [Connecting a service](https://xerg.ai/docs/connect/overview.md).
* **Clear map**, which deletes the shared map for everyone after asking. Connections, setup, people and [history](https://xerg.ai/docs/map/history.md) are kept; map the repos again to start over.


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