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

# Connect your machine

> Pair a local directory with the GPR mobile app using gpr setup.

A **workspace** is a directory on your machine that GPR can run agents in. `gpr setup` creates that workspace, installs a startup service, and shows a QR code for pairing.

## Prerequisites

* `gpr` installed ([Install GPR](/docs/get-started/install-gpr))
* GPR mobile app signed in
* The repo directory you want agents to use

## Pair

From the repo root (or any directory you want bound):

```bash theme={null}
cd /path/to/your/repo
gpr setup
```

Or pass a path:

```bash theme={null}
gpr setup /path/to/your/repo
```

Then in the app:

1. Open **Settings**
2. Open **Connections** / add a connection
3. Scan the QR code from `gpr setup`

The QR payload includes the server URL, a short-lived pairing token, and the daemon id.

## Confirm the daemon is online

```bash theme={null}
gpr status
```

```bash theme={null}
gpr doctor
```

```bash theme={null}
gpr logs -f
```

You should see the workspace online in the app after the websocket connects.

## Useful flags

```bash theme={null}
gpr setup --force
```

Regenerates pairing credentials.

```bash theme={null}
gpr setup --server-url wss://api.getpullrequest.com/gpr/ws/daemon
```

Overrides the backend websocket URL. For local backend development the daemon uses `ws://localhost:8000/gpr/ws/daemon` when `GPR_ENV` is `dev`, `development`, or `local`.

## Re-running setup

Re-running `gpr setup` in an already configured directory reconnects that workspace. It does not create a duplicate.

## Next

[Connect GitHub](/docs/get-started/connect-github) so GPR can open and enrich pull requests.
