# Getting started (/docs/compute/getting-started)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Set up a project with the unified Prisma CLI, connect GitHub, and get your first Prisma Compute deployment live.

Location: Compute > Getting started

Get an app live on [Prisma Compute](https://www.prisma.io/docs/compute) with the unified Prisma CLI: sign in, describe your app in a committed config, connect GitHub, and push. This guide takes you from your code to a live URL, then covers environment variables, CI, and agents. For every command and flag, see the [CLI reference](https://www.prisma.io/docs/cli).

> [!NOTE]
> This guide uses the Prisma CLI, run as `npx prisma@latest <command>`. Deployments come from a git push, the [Console](https://pris.ly/pdp), or the [`deploy` command](https://www.prisma.io/docs/cli/deploy) for a [Prisma Composer](https://www.prisma.io/docs/composer) app. The CLI creates the project, connects GitHub, and inspects the results.

## Prerequisites [#prerequisites]

* A JavaScript runtime. The commands below run with `npx` or `pnpm` on Node.js 22.18 or newer, or with `bunx` (Bun).
* A [Prisma Data Platform account](https://pris.ly/pdp).
* An app in a GitHub repository you can connect.

## Sign in [#sign-in]

Authenticate first. Every other command needs a session:

  

#### bun

```bash
bunx prisma@latest auth login
```

#### pnpm

```bash
pnpm dlx prisma@latest auth login
```

#### yarn

```bash
yarn dlx prisma@latest auth login
```

#### npm

```bash
npx prisma@latest auth login
```

This opens a browser to sign you in, then stores a session that every later command inherits. Because the browser step is interactive, CI and other headless environments use a [service token](#automation-and-ci) instead. To check who you are signed in as, run `auth whoami`.

> [!NOTE]
> Next.js apps should set `output: "standalone"` in their Next.js config.
> 
> ```ts title="next.config.ts"
> export default { output: "standalone" };
> ```

## Create or link a project [#create-or-link-a-project]

A project groups your services, branches, and databases. Create one and link this directory to it:

  

#### bun

```bash
bunx prisma@latest project create my-app
```

#### pnpm

```bash
pnpm dlx prisma@latest project create my-app
```

#### yarn

```bash
yarn dlx prisma@latest project create my-app
```

#### npm

```bash
npx prisma@latest project create my-app
```

If your team already has one, link to it instead:

  

#### bun

```bash
bunx prisma@latest project link my-app
```

#### pnpm

```bash
pnpm dlx prisma@latest project link my-app
```

#### yarn

```bash
yarn dlx prisma@latest project link my-app
```

#### npm

```bash
npx prisma@latest project link my-app
```

Either path writes the selected project to `.prisma/local.json`. This file is gitignored and only stores your local link, so it should not be treated as committed configuration. To verify the link, run:

  

#### bun

```bash
bunx prisma@latest project show
bunx prisma@latest project list
```

#### pnpm

```bash
pnpm dlx prisma@latest project show
pnpm dlx prisma@latest project list
```

#### yarn

```bash
yarn dlx prisma@latest project show
yarn dlx prisma@latest project list
```

#### npm

```bash
npx prisma@latest project show
npx prisma@latest project list
```

`project show` tells you what this directory is linked to. `project list` shows the projects you can see.

## Connect GitHub and deploy [#connect-github-and-deploy]

Connect the project to your repository:

  

#### bun

```bash
bunx prisma@latest git connect
```

#### pnpm

```bash
pnpm dlx prisma@latest git connect
```

#### yarn

```bash
yarn dlx prisma@latest git connect
```

#### npm

```bash
npx prisma@latest git connect
```

This starts the GitHub App install flow if needed and links the repository. Builds detect your framework from the repository; there is first-class support for **Next.js**, **Nuxt**, **Astro**, **Hono**, **NestJS**, and **TanStack Start**, plus plain **Bun** servers. From then on, pushing a branch builds and deploys it: the default Git branch deploys to production, and every other branch gets its own isolated preview. Each deploy produces a service **version**. Push, then watch and open the result:

  

#### bun

```bash
bunx prisma@latest service list
bunx prisma@latest service show <service>
bunx prisma@latest service open <service>
```

#### pnpm

```bash
pnpm dlx prisma@latest service list
pnpm dlx prisma@latest service show <service>
pnpm dlx prisma@latest service open <service>
```

#### yarn

```bash
yarn dlx prisma@latest service list
yarn dlx prisma@latest service show <service>
yarn dlx prisma@latest service open <service>
```

#### npm

```bash
npx prisma@latest service list
npx prisma@latest service show <service>
npx prisma@latest service open <service>
```

`service show` prints the service and its live version. Read the version's logs with:

  

#### bun

```bash
bunx prisma@latest service logs <service> --follow
```

#### pnpm

```bash
pnpm dlx prisma@latest service logs <service> --follow
```

#### yarn

```bash
yarn dlx prisma@latest service logs <service> --follow
```

#### npm

```bash
npx prisma@latest service logs <service> --follow
```

To learn how versions are promoted, rolled back, started, and stopped, see [Deployments](https://www.prisma.io/docs/compute/deployments).

## Deploying from the CLI with Composer [#deploying-from-the-cli-with-composer]

To deploy directly from a terminal or CI, declare the app with [Prisma Composer](https://www.prisma.io/docs/composer): describe your services in TypeScript, and `deploy` provisions all of them, and any databases, on Compute in one command. The git-push flow above and Composer share the same platform underneath. See [Deploy your first app](https://www.prisma.io/docs/prisma-compute/deploy).

## Environment variables [#environment-variables]

Set environment variables per scope, production or preview, before the deploy that should use them. To connect a database, create a [Prisma Postgres](https://www.prisma.io/docs/postgres) database in the project (`npx prisma@latest postgres create my-db` prints its connection string once) and store the URL as an environment variable:

  

#### bun

```bash
bunx prisma@latest project env add DATABASE_URL=postgres://... --role production
bunx prisma@latest project env add DATABASE_URL=postgres://... --role preview
```

#### pnpm

```bash
pnpm dlx prisma@latest project env add DATABASE_URL=postgres://... --role production
pnpm dlx prisma@latest project env add DATABASE_URL=postgres://... --role preview
```

#### yarn

```bash
yarn dlx prisma@latest project env add DATABASE_URL=postgres://... --role production
yarn dlx prisma@latest project env add DATABASE_URL=postgres://... --role preview
```

#### npm

```bash
npx prisma@latest project env add DATABASE_URL=postgres://... --role production
npx prisma@latest project env add DATABASE_URL=postgres://... --role preview
```

Values are write-only and resolve at deploy time. See [Environment variables](https://www.prisma.io/docs/compute/environment-variables) for details.

## Automation and CI [#automation-and-ci]

The same commands run unattended in CI or under a coding agent.

If you have signed in with `auth login`, anything running in that environment inherits your session, including an agent working in your directory. Check the session:

  

#### bun

```bash
bunx prisma@latest auth whoami
```

#### pnpm

```bash
pnpm dlx prisma@latest auth whoami
```

#### yarn

```bash
yarn dlx prisma@latest auth whoami
```

#### npm

```bash
npx prisma@latest auth whoami
```

For CI, or any environment where the browser sign-in is not an option, authenticate with a **service token** instead. Set `PRISMA_SERVICE_TOKEN` and the CLI uses it before any stored session. Pass targets explicitly so nothing depends on a prompt. Add `--json` for structured output, and `--no-interactive` so the CLI fails instead of asking:

```bash
PRISMA_SERVICE_TOKEN=... npx prisma@latest service show web \
  --project my-app \
  --json \
  --no-interactive
```

### Agent skills [#agent-skills]

If a coding agent does your deploying, install the Prisma Compute agent skill into your repo:

  

#### bun

```bash
bunx skills add prisma/skills --skill prisma-compute
```

#### pnpm

```bash
pnpm dlx skills add prisma/skills --skill prisma-compute
```

#### yarn

```bash
yarn dlx skills add prisma/skills --skill prisma-compute
```

#### npm

```bash
npx skills add prisma/skills --skill prisma-compute
```

The `prisma-compute` skill teaches your agent the Compute workflow (auth, config, deploys, logs, and domains), so it follows the right steps. Supported agents pick it up automatically. See [Agent Skills](https://www.prisma.io/docs/ai/tools/skills) for the full catalog. For a Composer app, also run [`npx prisma@latest init`](https://www.prisma.io/docs/cli/init) once. It syncs the Composer skill that ships inside `@prisma/composer` and keeps it matching the installed version; that package-shipped set is what the CLI's own [`skills` commands](https://www.prisma.io/docs/cli/skills) manage.

### Structured output [#structured-output]

In `--json` mode, every command emits an envelope with an `ok` flag. On failure, `error.code` is a dotted `NAMESPACE.SUBCODE` (for example `SERVICE.PROJECT_SETUP_REQUIRED`), `error.summary` and `error.why` explain the problem, and `nextActions` lists concrete follow-up commands. Scripts and agents should branch on the code rather than the message: codes are a stable contract, while wording can change between releases.

## Console [#console]

To browse and manage the same resources without the CLI, open the [Console](https://pris.ly/pdp). It shows projects, branches, services, deployments, integrations, and domains.

## Next steps [#next-steps]

* [Deployments](https://www.prisma.io/docs/compute/deployments): inspect, promote, roll back, start, stop.
* [Environment variables](https://www.prisma.io/docs/compute/environment-variables): production, preview, and per-branch overrides.
* [Branching](https://www.prisma.io/docs/compute/branching): how branches isolate work and map to Git.

## Related pages

- [`Alchemy`](https://www.prisma.io/docs/compute/alchemy): Provision Prisma Postgres and deploy applications to Prisma Compute in one TypeScript stack.
- [`Branching`](https://www.prisma.io/docs/compute/branching): Branches are isolated environments that map to your Git branches, so preview work never touches production.
- [`Deploy Button`](https://www.prisma.io/docs/compute/deploy-button): Add a Deploy with Prisma button that copies a public Composer repository and starts a Composer-managed deployment.
- [`Deploy on push`](https://www.prisma.io/docs/compute/deploy-on-push): Graduate a Composer app from manual deploys to a Git workflow, with production deploys on push and an isolated preview environment per branch.
- [`Deployments`](https://www.prisma.io/docs/compute/deployments): How deploys create service versions on Prisma Compute, and how to inspect, promote, roll back, start, and stop them.