# Set up from your terminal

> Run npx lopebase in a product's folder to scan its stack, connect your workspace, and hand the rest of setup to your coding agent.

Source: https://lopebase.com/docs/npx-lopebase
Updated: 2026-10-08
Open in the app: https://app.lopebase.com/products

If you use a coding agent like Claude Code or Codex, `npx lopebase` is the fastest way to add a product to LopeBase. Run it in the product's folder. It reads your stack, connects this computer to your workspace, and then hands the rest of setup to your agent, which does the clicking and asks you for anything it needs.

## What it reads

Before anything else, it asks to scan the current folder. It reads dependency names from `package.json` and from Python, Ruby, PHP, Go, and Rust manifests, which config files exist (things like `wrangler.toml` or a Dockerfile), your public site address, and the variable names in your example env files, like `.env.example`. It never opens a real `.env` file and never reads your source code, so nothing secret leaves your machine during the scan.

From that, it works out what is already wired up and worth connecting, such as PostHog, Sentry, Stripe, or GitHub, and what is worth watching for uptime: the site itself, plus any database, job queue, or email sender your app depends on. If your project is a website with no analytics or error tracking yet, it points that out too.

## Sign in

Next it connects this computer to your workspace. A code appears in your terminal and your browser opens to approve it; sign in or create a free account there, check the code matches, and press Connect. If your terminal cannot open a browser, it falls back to asking you to paste an agent token instead, which you create under **Settings** > **Agent access**.

Open Agent access

The connection is saved on this computer, so `npx lopebase` in another project's folder reuses it without asking again. Run `npx lopebase login` on its own any time you only want to connect or reconnect this computer.

## Handing setup to your coding agent

After you name the product and pick what to connect, it looks for a coding agent on your computer (Claude Code, Codex, and others), adds the LopeBase tools to it, and starts it with a prompt describing the work. From there your agent:

- Adds the product to your workspace.
- Connects the sources you picked, stopping to ask you for any sign-in or key it needs.
- Sets up an uptime check on the site and anything else worth watching.

You can follow along in your workspace as each step turns green. If no coding agent is found on your computer, or you run with `--print`, it prints the same prompt for you to paste into whichever agent you use instead.

> **Tip:** If your project depends on a database, a queue, or another service your app itself talks to, your agent can add the [LopeBase Adapter](https://lopebase.com/docs/lopebase-adapter) so Uptime watches those too, not just the site.

## Keeping it up to date

Run `npx lopebase update` in a product's folder to check whether the LopeBase Adapter it installed is behind. It shows what changed since your version and, if you agree, hands the upgrade to your coding agent the same way, asking before each change. If the product has no adapter installed, it says there is nothing to update there, since connections, uptime, and pageviews already update themselves in the console.

When a newer `npx lopebase` itself is out, it tells you at the start of a run and on Overview, with the command to copy.

## Other commands

| Command | What it does |
| --- | --- |
| `npx lopebase` | Scan, connect, and hand off to your agent. |
| `npx lopebase login` | Connect this computer on its own. |
| `npx lopebase update` | Check the LopeBase Adapter here for updates. |
| `npx lopebase scan` | Print what the scan found, without connecting anything. Add `--json` for a machine-readable version. |
| `npx lopebase prompt` | Print the setup prompt instead of starting an agent. |
| `npx lopebase mcp` | Run the LopeBase tools as a stdio MCP server, for a computer that is already signed in. |

You need Node 18 or newer. `--url` points the command at a specific workspace address instead of the shared sign-in page, which is useful on a second computer or a custom domain.

## Where to go next

- [Add and manage properties](https://lopebase.com/docs/properties) covers the same setup from inside the console.
- [Install the LopeBase Adapter](https://lopebase.com/docs/lopebase-adapter) for the piece that shares your own app's users and service health.
- [Connect your tools](https://lopebase.com/docs/connections) covers everything your agent can connect for you.

## If something goes wrong

### npx lopebase says command not found

You need Node 18 or newer on your computer. Check with `node -v`, and install a current version if it is missing or older.

### It says no coding agent was found on this computer

Install Claude Code, Codex, or another supported agent, then run it again. In the meantime, run with `--print`, or just answer "None, print the prompt" when it asks, and paste the result into whichever agent you use by hand.

### Nothing happens after I approve the code in the browser

The code expires after a while, so if you waited too long between seeing it and approving it, run `npx lopebase` again for a fresh one. If your terminal could not open a browser window at all, it should have fallen back to asking for a pasted token; if it did not, run `npx lopebase login --paste`.

### It says my saved connection no longer works

This happens if an admin revoked this computer's access, or the workspace itself changed. Let it sign you in again; nothing you already connected is affected.

### It connected the wrong workspace

Run `npx lopebase login --url https://yourteam.lopebase.com` with the workspace you meant, or sign out of the other one in your browser first and run `npx lopebase` again.

### npx lopebase update says there is nothing to update

That means this product has no LopeBase Adapter installed yet. Connections, uptime checks, and pageviews update themselves in the console, with nothing to run locally. Run `npx lopebase` (not `update`) if you want to add the adapter.
