Skip to content

Commit 866e9e0

Browse files
committed
docs(vercel): update marketplace integration guide
1 parent 76b837f commit 866e9e0

File tree

1 file changed

+113
-3
lines changed

1 file changed

+113
-3
lines changed

integrations/vercel.mdx

Lines changed: 113 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,114 @@
11
---
2-
title: "Vercel"
3-
url: "https://github.com/onkernel/vercel-template"
4-
---
2+
title: "Vercel Marketplace"
3+
description: "Integrate Kernel through the Vercel Marketplace"
4+
---
5+
6+
## Integrate Kernel through the Vercel Marketplace
7+
8+
The Vercel Marketplace allows Vercel users to install and configure third-party services, like Kernel, directly from the Vercel dashboard. Kernel offers an [official integration](https://vercel.com/marketplace/kernel) that Vercel users can install to integrate Kernel into their Vercel projects.
9+
10+
### Installing the Kernel Integration
11+
12+
{/* <Tip>
13+
Deploy an example Next.js application and install the Kernel integration with our [template](https://github.com/onkernel/vercel-template).
14+
</Tip> */}
15+
16+
1. Navigate to the [Kernel integration](https://vercel.com/marketplace/kernel) in the Vercel Marketplace.
17+
2. Click **Install** to add Kernel to your Vercel team.
18+
3. Select your pricing plan.
19+
4. Provide a name for your Kernel installation. (this is not used for billing or anything else)
20+
5. Click **Create**.
21+
22+
Vercel will automatically provision a Kernel account, organization, and API key for you. Vercel calls the provisioned account, organization, and API key a **Resource**.
23+
24+
Each Vercel team has an associated Kernel Organization. Kernel will automatically provision a new account for you, or link to an existing Kernel account if an account is found with the same email address. An equivalent role in Kernel is assigned to the user based on their Vercel team role. Roles and Vercel team membership are automatically synced to Kernel.
25+
26+
### Connecting to your Vercel projects
27+
28+
Once you've installed Kernel, you will need to connect it to one of your Vercel projects. Generally, a Kernel organization should be connected to a single Vercel project.
29+
30+
Connecting to a project will automatically sync your Kernel API key to your Vercel project's environment variables. The following environment variable will be automatically synced to all environments:
31+
32+
- `KERNEL_API_KEY`
33+
34+
<Tip>
35+
Running `vercel env pull` in your project will automatically sync the development environment variables locally.
36+
</Tip>
37+
38+
### Configuring your Kernel integration
39+
40+
Most of your Kernel integration configuration will be done through the Kernel Dashboard. To access the Dashboard after installing the Kernel integration, navigate to your installation details page and click the **Open in Kernel** button.
41+
42+
### Using Kernel in your application
43+
44+
Once your Kernel API key is synced to your Vercel project, you can use it in your application. Here's a quick example:
45+
46+
<CodeGroup>
47+
```typescript TypeScript
48+
import { Kernel } from '@onkernel/sdk';
49+
import { chromium } from 'playwright';
50+
51+
const kernel = new Kernel({ apiKey: process.env.KERNEL_API_KEY });
52+
53+
// Create a Kernel browser
54+
const kernelBrowser = await kernel.browsers.create();
55+
56+
// Connect over CDP with Playwright
57+
const browser = await chromium.connectOverCDP(kernelBrowser.cdp_ws_url);
58+
59+
try {
60+
const context = browser.contexts()[0];
61+
const page = context.pages()[0];
62+
await page.goto('https://example.com');
63+
const title = await page.title();
64+
console.log('Page title:', title);
65+
} finally {
66+
await browser.close();
67+
await kernel.browsers.deleteByID(kernelBrowser.session_id);
68+
}
69+
```
70+
71+
```python Python
72+
from kernel import AsyncKernel
73+
from playwright.async_api import async_playwright
74+
75+
kernel = AsyncKernel(api_key=os.environ.get("KERNEL_API_KEY"))
76+
77+
# Create a Kernel browser
78+
kernel_browser = await kernel.browsers.create()
79+
80+
# Connect over CDP with Playwright
81+
playwright = await async_playwright().start()
82+
browser = await playwright.chromium.connect_over_cdp(kernel_browser.cdp_ws_url)
83+
84+
try:
85+
context = browser.contexts[0]
86+
page = context.pages[0]
87+
await page.goto("https://example.com")
88+
title = await page.title()
89+
print(f"Page title: {title}")
90+
finally:
91+
await browser.close()
92+
await kernel.browsers.delete_by_id(kernel_browser.session_id)
93+
```
94+
</CodeGroup>
95+
96+
For more examples and features like profiles, stealth mode, and live view, check out the [Browsers documentation](/browsers/create-a-browser).
97+
98+
### Pricing
99+
100+
The pricing for plans and add-ons purchased through the Vercel Marketplace is the same as the pricing when purchased directly through Kernel. For more information on Kernel's pricing and available plans, see the [Pricing page](https://onkernel.com/#pricing).
101+
102+
Billing and usage data are reported hourly to Vercel and can be viewed directly in the Vercel Dashboard.
103+
104+
### Limitations
105+
106+
The following limitations apply when using Kernel through the Vercel Marketplace:
107+
108+
- Vercel-managed Organizations cannot be deleted from the Kernel Dashboard, they can only be deleted by uninstalling the Kernel integration.
109+
- Billing plan management can be done through both the Vercel Dashboard and the Kernel Dashboard.
110+
- Existing Kernel organizations cannot be moved to be managed by the Kernel Vercel Integration.
111+
112+
### Support
113+
114+
If you encounter any issues with the Kernel Vercel integration, please contact our support team through the Kernel Dashboard or reach out on [Discord](https://discord.gg/onkernel).

0 commit comments

Comments
 (0)