Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
a491937
feat(docs): add Prisma Compute EA section
ArthurGamby Apr 15, 2026
99ed136
refactor(docs): collapse Compute into a single internal reference page
ArthurGamby Apr 15, 2026
6426dd1
docs(compute): drop em dashes and ellipses from prose
ArthurGamby Apr 15, 2026
29f9003
Merge remote-tracking branch 'origin/main' into docs/prisma-compute-q…
ArthurGamby Apr 23, 2026
ac6d693
docs(compute): add Astro, Nuxt, and TanStack Start to quickstart
ArthurGamby Apr 23, 2026
8353ddf
docs(compute): clarify Quickstart tab scope and fix port note
ArthurGamby Apr 23, 2026
18936fa
docs(compute): split into landing + per-framework quickstarts + refer…
ArthurGamby Apr 23, 2026
9fc4672
docs(compute): remove early-access badge and EA references
ArthurGamby Apr 23, 2026
cc06ce4
docs(compute): document --env file path, comma-separated, and quoted …
ArthurGamby Apr 23, 2026
11cf432
docs(compute): split into /compute (official) and /compute-internal (…
ArthurGamby Apr 23, 2026
9a43b7a
docs(compute): add Compute (Internal) top-level navbar item
ArthurGamby Apr 23, 2026
7d02f2e
fix(docs): swap Alert JSX for :::warning directive in compute-internal
ArthurGamby Apr 23, 2026
354a6f0
docs(compute): add framework logos to quickstart Cards
ArthurGamby Apr 23, 2026
b8ecf41
fix(docs): add width/height to logo img tags
ArthurGamby Apr 23, 2026
f6c2e1e
docs(compute): render framework logo inline with Card title
ArthurGamby Apr 23, 2026
f69b5c4
docs(compute): replace Bun logo placeholder with official SVG from bu…
ArthurGamby Apr 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 167 additions & 0 deletions apps/docs/content/docs/compute/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
title: CLI reference
description: Authenticate, deploy, and manage environment variables for Prisma Compute from the CLI.
badge: early-access
url: /compute/cli
metaTitle: CLI reference | Prisma Compute
metaDescription: Reference for the Prisma Compute CLIs. Authentication, deploy, and environment variable commands for @looma/prisma-cli and @prisma/compute-cli.
---

Two CLIs currently target Prisma Compute during Early Access. This page documents the commands needed day-to-day: install, authenticate, deploy, and manage environment variables.

| Package | Binary | Typical invocation |
|---|---|---|
| [`@looma/prisma-cli`](https://www.npmjs.com/package/@looma/prisma-cli) | `prisma` | `npx @looma/prisma-cli …` |
| [`@prisma/compute-cli`](https://www.npmjs.com/package/@prisma/compute-cli) | `compute` | `bunx @prisma/compute-cli …` |

## Authentication

Run an interactive browser flow once per machine. Credentials are stored locally.

### Using `@looma/prisma-cli`

```bash
npx @looma/prisma-cli auth login
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix CI blocker: cspell rejects looma in multiple spots

Lines 7, 14, 21, and 24 currently fail spellcheck. Please add a local cspell ignore (or project dictionary entry) so docs CI can pass.

Proposed fix (local to this doc)
 ---
 title: CLI reference
 description: Authenticate, deploy, and manage environment variables for Prisma Compute from the CLI.
 badge: early-access
 url: /compute/cli
 metaTitle: CLI reference | Prisma Compute
 metaDescription: Reference for the Prisma Compute CLIs. Authentication, deploy, and environment variable commands for `@looma/prisma-cli` and `@prisma/compute-cli`.
 ---
 
+<!-- cspell:ignore looma -->
+
 Two CLIs currently target Prisma Compute during Early Access. This page documents the commands needed day-to-day: install, authenticate, deploy, and manage environment variables.
🧰 Tools
🪛 GitHub Actions: Spellcheck

[error] 7-7: cspell reported unknown word "looma" at line 7 (e.g., "-- variable commands for @looma/prisma-cli and @prisma").


[error] 14-14: cspell reported unknown word "looma" in a markdown table/link at line 14.


[error] 14-14: cspell reported unknown word "looma" in inline code at line 14.


[error] 21-21: cspell reported unknown word "looma" at line 21 (heading: "### Using @looma/prisma-cli").


[error] 24-24: cspell reported unknown word "looma" at line 24 (command: "npx @looma/prisma-cli auth login").

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/compute/cli.mdx` around lines 7 - 24, The spellcheck
CI is failing on the token "looma" in this MDX doc; either add a local cspell
ignore directive for looma at the top of this MDX file (e.g., a cspell:ignore
declaration) or add "looma" to the project's cspell dictionary (cspell.json ->
words array) so that occurrences like the package name and table entries are
accepted; update the doc and commit the change so CI picks up the new ignore.

npx @looma/prisma-cli auth whoami
npx @looma/prisma-cli auth logout
```

### Using `@prisma/compute-cli`

```bash
bunx @prisma/compute-cli login
bunx @prisma/compute-cli logout
```

For CI, scripts, and agents, set `PRISMA_API_TOKEN` in the environment instead of running the interactive flow.

## Deploy

### Using `@looma/prisma-cli`

```bash
npx @looma/prisma-cli app deploy [options]
```

| Option | Description |
|---|---|
| `--app <name>` | App name |
| `--entry <path>` | Entry point path for Bun or auto-detected deploys |
| `--build-type <type>` | `auto`, `bun`, or `nextjs` (default: `auto`) |
| `--http-port <port>` | HTTP port the deployed app listens on |
| `--env <KEY=VALUE>` | Environment variable (repeat for multiple) |
| `--json` | Emit structured JSON output |

### Using `@prisma/compute-cli`

```bash
bunx @prisma/compute-cli deploy [options]
```

| Option | Description |
|---|---|
| `--project <id>` | Project ID |
| `--service <id>` | Compute service ID |
| `--service-name <name>` | Name for a new compute service |
| `--region <region>` | Region for a new compute service |
| `--path <path>` | App directory (default: `.`) |
| `--entrypoint <file>` | File to run at startup (falls back to `package.json` `main`) |
| `--build-type <type>` | `auto`, `bun`, or `nextjs` (default: `auto`) |
| `--http-port <port>` | HTTP port the app listens on (default: `8080`) |
| `--env <KEY=VALUE>` | Environment variable (repeat for multiple) |
| `--unset-env <KEY>` | Remove an environment variable (repeat for multiple) |
| `--skip-build` | Deploy a pre-built artifact |
| `--skip-promote` | Deploy without promoting to the service endpoint |
| `--destroy-old-version` | Delete the previous version after stopping it |
| `--json` | Output JSON |

## Environment variables

You can set environment variables two ways: inline with `deploy`, or with a dedicated update command that creates a new version without rebuilding source.

### Set variables during a deploy

Repeat `--env` for each variable. Values are stored on the platform and injected into the running version.

#### Using `@looma/prisma-cli`

```bash
npx @looma/prisma-cli app deploy \
--app my-app \
--env DATABASE_URL=postgresql://example \
--env NODE_ENV=production
```

#### Using `@prisma/compute-cli`

```bash
bunx @prisma/compute-cli deploy \
--env DATABASE_URL=postgresql://example \
--env NODE_ENV=production
```

### Update variables without rebuilding

Use this when you only need to rotate or add a secret. Both commands cut a **new compute version** — the previous version stays live until the new one is healthy.

#### Using `@looma/prisma-cli`

```bash
npx @looma/prisma-cli app update-env --env DATABASE_URL=postgresql://example
npx @looma/prisma-cli app update-env --app my-app --env STRIPE_KEY=sk_live_…
```

List the current values:

```bash
npx @looma/prisma-cli app list-env
npx @looma/prisma-cli app list-env --app my-app
```

#### Using `@prisma/compute-cli`

```bash
bunx @prisma/compute-cli env update --env DATABASE_URL=postgresql://example
bunx @prisma/compute-cli env update \
--env STRIPE_KEY=sk_live_… \
--env NODE_ENV=production
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use explicit placeholders instead of in secret examples

On Line 111 and Line 126, sk_live_… is easy to miscopy and the unicode ellipsis can be pasted literally in shells. Prefer clear placeholders like <your-stripe-key>.

Suggested doc tweak
-npx `@looma/prisma-cli` app update-env --app my-app --env STRIPE_KEY=sk_live_…
+npx `@looma/prisma-cli` app update-env --app my-app --env STRIPE_KEY=<your-stripe-key>
...
-  --env STRIPE_KEY=sk_live_… \
+  --env STRIPE_KEY=<your-stripe-key> \
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
npx @looma/prisma-cli app update-env --app my-app --env STRIPE_KEY=sk_live_
```
List the current values:
```bash
npx @looma/prisma-cli app list-env
npx @looma/prisma-cli app list-env --app my-app
```
#### Using `@prisma/compute-cli`
```bash
bunx @prisma/compute-cli env update --env DATABASE_URL=postgresql://example
bunx @prisma/compute-cli env update \
--env STRIPE_KEY=sk_live_\
--env NODE_ENV=production
npx `@looma/prisma-cli` app update-env --app my-app --env STRIPE_KEY=<your-stripe-key>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/compute/cli.mdx` around lines 111 - 127, The examples
use a unicode ellipsis placeholder ("sk_live_…") which can be miscopied into
shells; update the command examples shown for npx `@looma/prisma-cli` app
update-env and bunx `@prisma/compute-cli` env update to use explicit, safe
placeholders like <your-stripe-key> or YOUR_STRIPE_KEY (and similarly explicit
placeholders for DATABASE_URL) so readers copy a clear token instead of an
ellipsis.

```

### Remove variables

Pass `--unset-env KEY` (repeat for multiple) on either `deploy` or `env update` with `@prisma/compute-cli`:

```bash
bunx @prisma/compute-cli env update --unset-env LEGACY_FLAG --unset-env DEBUG
```

## Versions and services

`@prisma/compute-cli` exposes primitives for managing versions and services directly:

```bash
bunx @prisma/compute-cli versions list
bunx @prisma/compute-cli versions show <version-id>
bunx @prisma/compute-cli versions start <version-id>
bunx @prisma/compute-cli versions stop <version-id>
bunx @prisma/compute-cli versions promote <version-id>
bunx @prisma/compute-cli versions delete <version-id>

bunx @prisma/compute-cli services list
bunx @prisma/compute-cli projects list
```

With `@looma/prisma-cli`, equivalent operations live under `app`:

```bash
npx @looma/prisma-cli app list-deploys
npx @looma/prisma-cli app show-deploy <deployment-id>
npx @looma/prisma-cli app promote <deployment-id>
npx @looma/prisma-cli app rollback
npx @looma/prisma-cli app remove
```

## See also

- [Stream logs](/compute/logs) — tail logs for a compute version or deployment.
- [Known limitations](/compute/limitations) — what's still in flight during EA.
54 changes: 54 additions & 0 deletions apps/docs/content/docs/compute/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Prisma Compute
description: Deploy Next.js and Bun applications to Prisma Compute from the CLI.
badge: early-access
url: /compute
metaTitle: Prisma Compute
metaDescription: Prisma Compute is a simple, reliable app hosting runtime tightly integrated with Prisma Postgres. Deploy, observe, and manage apps from the terminal.
---

Prisma Compute is a simple, reliable app hosting runtime for Next.js and Bun applications, built with tight integration to Prisma Postgres and designed for a CLI-first, AI-native workflow.

## What you get

- **One-command deploys** for Next.js and Bun apps.
- **Two CLIs** currently coexist during EA:
- [`@looma/prisma-cli`](https://www.npmjs.com/package/@looma/prisma-cli) — the new unified Prisma CLI (`prisma app …`).
- [`@prisma/compute-cli`](https://www.npmjs.com/package/@prisma/compute-cli) — the original compute CLI (`compute …`).
- **Environment variables** managed from the CLI on every deploy or as a standalone update.
- **Log streaming** for any compute version.
- **Tight Prisma Postgres integration** — build against a managed Postgres without leaving the Prisma toolchain.

## Getting started

<Cards>
<Card href="/compute/quickstart-nextjs" title="Next.js quickstart">
Create a Next.js app and ship it to Compute in a few commands.
</Card>
<Card href="/compute/quickstart-bun" title="Bun quickstart">
Deploy a minimal Bun HTTP server to Compute.
</Card>
</Cards>

## Reference

<Cards>
<Card href="/compute/cli" title="CLI reference">
Install, authenticate, deploy, and manage environment variables from the terminal.
</Card>
<Card href="/compute/logs" title="Stream logs">
Tail logs for a specific compute version or deployment.
</Card>
<Card href="/compute/limitations" title="Known limitations">
What is and isn't supported during the EA window.
</Card>
</Cards>

## Which CLI should I use?

Both CLIs target the same platform. For EA:

- Start with **`@looma/prisma-cli`** if you want the unified `prisma app` experience that we are standardizing on for Prisma 8.
- Fall back to **`@prisma/compute-cli`** if you hit an edge case, or for features that have only landed on the original CLI yet.

Every quickstart and reference page on this site shows the equivalent command in both CLIs side by side.
42 changes: 42 additions & 0 deletions apps/docs/content/docs/compute/limitations.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Known limitations
description: What is and isn't supported in Prisma Compute during Early Access.
badge: early-access
url: /compute/limitations
metaTitle: Known limitations | Prisma Compute
metaDescription: A running list of known limitations in Prisma Compute during the Early Access window.
---

Prisma Compute is moving fast during Early Access. This page is the running list of known limitations — keep it close while you're building.

## Runtime

- **Next.js apps require `output: "standalone"`.** Set this in `next.config.ts` / `next.config.mjs` before your first deploy. See the [Next.js quickstart](/compute/quickstart-nextjs#2-enable-standalone-output).
- **First-class framework support** for this release covers **Next.js** and **Bun/Hono** only.

## CLI

- **Two CLIs coexist.** `@looma/prisma-cli` (unified `prisma app …`) is the direction of travel; `@prisma/compute-cli` (original `compute …`) is the fallback for features or fixes that haven't reached the new CLI yet.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

CI blocker: cspell rejects looma across Compute docs.

Spellcheck is failing on a legitimate package scope. Add looma to the shared cspell dictionary (preferred), or annotate with a local cspell:words directive to unblock this page and sibling pages.

Suggested minimal page-local fix (if global dictionary update is deferred)
 ---
 title: Known limitations
 description: What is and isn't supported in Prisma Compute during Early Access.
 badge: early-access
 url: /compute/limitations
 metaTitle: Known limitations | Prisma Compute
 metaDescription: A running list of known limitations in Prisma Compute during the Early Access window.
 ---
+<!-- cspell:words looma -->
🧰 Tools
🪛 GitHub Actions: Spellcheck

[error] 19-19: cspell reported unknown word "looma" at line 19.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/docs/content/docs/compute/limitations.mdx` at line 19, Spellcheck is
failing because the package scope `looma` (seen in the token
`@looma/prisma-cli`) is not in the cspell dictionary; fix by either adding
"looma" to the shared cspell dictionary (e.g., add "looma" into the project's
cspell word list) or add a page-local directive at the top of the MDX file using
a cspell:words comment (e.g., `<!-- cspell:words looma -->`) to whitelist
`looma` for this and sibling pages; update the shared cspell word list if you
want a global fix, otherwise add the `cspell:words` directive inside the Compute
docs MDX files that reference `@looma/prisma-cli`.

- **First deploy bootstraps local project context** automatically when no project is linked. Subsequent deploys reuse the saved selection, so the scaffolding flags aren't required each time.

## Log streaming

- **10-minute stream cap.** A single log stream disconnects after ~10 minutes — reconnect, optionally with `--cursor`, to continue.
- **One concurrent stream per version.** Only one client can stream a given compute version at a time.

See [Stream logs](/compute/logs) for reconnection patterns.

## Environment variables

- `env update` (or `app update-env`) **cuts a new compute version**. The old version stays live until the new one is healthy.
- There is no bulk import from a `.env` file yet — pass `--env KEY=VALUE` for each variable, or repeat the flag.

## Out of scope for EA

These are intentionally deferred until after the EA window closes:

- Canary / traffic-split deploys.
- Multi-region routing controls.
- Console UI parity with the CLI (some actions are CLI-only today — the Console may offer a "copy this command" affordance instead).

If you hit something that isn't listed here and isn't documented elsewhere, share it in `#product-compute` so we can fold it in.
88 changes: 88 additions & 0 deletions apps/docs/content/docs/compute/logs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: Stream logs
description: Tail logs for a Prisma Compute version or deployment.
badge: early-access
url: /compute/logs
metaTitle: Stream logs | Prisma Compute
metaDescription: Stream logs from Prisma Compute versions and deployments using the Prisma CLI. Tail, replay, and resume log streams during Early Access.
---

Prisma Compute can stream logs for any compute version directly to your terminal.

## Stream logs for a compute version

### Using `@prisma/compute-cli`

```bash
bunx @prisma/compute-cli logs <compute-version-id>
```

| Option | Description |
|---|---|
| `--tail <n>` | Number of recent lines to show (default: `100`) |
| `--from-start` | Start from the beginning of the log buffer instead of tailing |
| `--cursor <offset>` | Resume from a byte-offset cursor returned by a previous stream |
| `--json` | Output each log record as a JSON line |

Examples:

```bash
# Tail the last 200 lines and follow
bunx @prisma/compute-cli logs v_042 --tail 200

# Replay from the start of the available buffer
bunx @prisma/compute-cli logs v_042 --from-start

# Resume from where an earlier stream left off
bunx @prisma/compute-cli logs v_042 --cursor 104857600

# Emit structured JSON for pipelines or agents
bunx @prisma/compute-cli logs v_042 --json
```

### Using `@looma/prisma-cli`

```bash
npx @looma/prisma-cli app logs
npx @looma/prisma-cli app logs --deployment <deployment-id>
npx @looma/prisma-cli app logs --tail 200
```

| Option | Description |
|---|---|
| `--app <name>` | App name |
| `--deployment <id>` | Specific deployment to stream |
| `--tail <n>` | Number of recent lines to show |
| `--from-start` | Start from the beginning of the log buffer |
| `--cursor <offset>` | Resume from a prior log cursor |
| `--json` | Emit structured JSON output |

## Find a compute version ID

If you don't know the ID to pass to `logs`:

```bash
# With @prisma/compute-cli
bunx @prisma/compute-cli versions list

# With @looma/prisma-cli
npx @looma/prisma-cli app list-deploys
```

## Limitations during Early Access

:::warning

Log streaming has hard limits in the EA build. Plan around them when debugging:

- **10-minute stream cap** — a single `logs` stream disconnects after ~10 minutes. Reconnect (optionally with `--cursor`) to continue.
- **One concurrent stream per version** — only one client can stream a given compute version at a time. A second stream will fail or bump the first.

:::

These limits will be relaxed after EA. For now, prefer short, targeted log sessions and reach for `--tail` to grab a bounded recent window instead of long-lived streams.

## See also

- [CLI reference](/compute/cli)
- [Known limitations](/compute/limitations)
17 changes: 17 additions & 0 deletions apps/docs/content/docs/compute/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"title": "Compute",
"root": true,
"icon": "Cpu",
"pages": [
"---Introduction---",
"index",
"---Quickstart---",
"quickstart-nextjs",
"quickstart-bun",
"---CLI---",
"cli",
"logs",
"---More---",
"limitations"
]
}
Loading
Loading