# npx pagerless connect

> One command reads your repo, finds what to watch, and shows the exact changes. Nothing changes until you approve.

URL: https://pagerless.dev/docs/connect
Updated: 2026-10-22

```bash
npx pagerless connect
```

## What happens

1. **Sign in** It prints a sign-in link and a code and opens your browser. Check the page shows the same code, then allow with your passkey.
2. **Pick the app** It uses your repo's folder name (or `--project`) and creates the app if needed.
3. **Find what to watch** Services, scheduled jobs and AWS alarms, listed with the files it will touch.
4. **Show the diff** Every edit is an insertion, shown in full. It asks "Apply these changes?"
5. **Apply** Writes the edits, creates one ingest key and stores it in the right place, installs the package, and prints what to run next.

## What it detects

| Stack | Found by | Change it makes |
| --- | --- | --- |
| JavaScript frameworks | Next.js, Nuxt, SvelteKit, Astro, Remix, React Router (Shopify apps too), NestJS, Express, Fastify, Koa, Hono, tRPC | Adds that framework's Pagerless hook (see its [integration page](https://pagerless.dev/integrations)) |
| Mobile and desktop | Expo, React Native, Electron | Adds the Pagerless init for that runtime |
| Vite single-page apps | react, vue, svelte, solid-js or preact with Vite | Browser init with `VITE_PAGERLESS_KEY` |
| Deno | deno.json | `import "npm:pagerless@^0.2.0/auto"` |
| Cloudflare Workers | wrangler.toml / .json / .jsonc with `main` | `export default withPagerless(...)` |
| Cloudflare Pages | `pages_build_output_dir` or a functions/ folder | Creates or chains `functions/_middleware` |
| Go | each `func main` run by a Dockerfile; Gin, Echo, Fiber, chi, gorilla/mux, gRPC, Temporal | `pagerless.Init`, `defer pagerless.Close`, and that framework's adapter or `pagerless.Middleware(h)` |
| AWS (Terraform) | SNS topics, CloudWatch alarms, ECS, Lambda, schedulers | SNS subscription to Pagerless, ECS key from SSM |
| Scheduled jobs | Wrangler crons, EventBridge, AWS Scheduler, Temporal | A check-in line per job |
| Other monitoring tools | Alertmanager (incl. AlertmanagerConfig), Grafana provisioning or Terraform, Datadog Terraform, Sentry | Prints the receiver, contact point or webhook to add; for tools set up in their own UI, points you to the URL in the app |
| Python | Lambda runtimes in Terraform | Nothing yet: add the [Python SDK](https://pagerless.dev/integrations/python) by hand |

## Flags

| Flag | What it does |
| --- | --- |
| `--dry-run` | Shows the plan and diff, changes nothing, needs no sign-in. |
| `--yes`, `-y` | Skips the confirm prompt (CI). The browser approval is still needed. |
| `--project <name>` | App name. Default: the repo folder name. |
| `--aws-profile <p>` | AWS profile for SNS and SSM commands. |
| `--no-install` | Don't run the package install. |
| `--no-open` | Print the sign-in link instead of opening a browser. |

## Undo access

To let Pagerless undo a bad deploy, connect offers a Cloudflare API token page prefilled with Workers Scripts edit and Pages edit, or an AWS CloudFormation quick-create link for a `pagerless-undo` role with an external ID. You can skip both.
