Skip to content

Commit 22ae470

Browse files
authored
Merge branch 'main' into mason/vercel-marketplace-docs
2 parents 7824fa9 + 03ec522 commit 22ae470

File tree

3 files changed

+76
-8
lines changed

3 files changed

+76
-8
lines changed

apps/deploy.mdx

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,74 @@ Once you deploy an app on Kernel, you can schedule its actions on a job or run t
99

1010
## Deploy the app
1111

12+
### From local directory
13+
1214
Use our CLI from the root directory of your project:
1315
```bash
14-
# entrypoint_file_name should be where you've defined your Kernel app
1516
kernel deploy <entrypoint_file_name>
1617
```
1718

19+
#### Notes
20+
21+
- The `entrypoint_file_name` is the file name where you [defined](/apps/develop) your app.
22+
- Include a `.gitignore` file to exclude dependency folders like `node_modules` and `.venv`.
23+
24+
### From GitHub
25+
26+
You can deploy an app directly from a public or private GitHub repository using the Kernel CLI — no need to clone or manually push code.
27+
28+
```bash
29+
kernel deploy github \
30+
--url https://github.com/<owner>/<repo> \
31+
--ref <branch|tag|commit> \
32+
--entrypoint <path/to/entrypoint> \
33+
[--path <optional/subdir>] \
34+
[--github-token <token>] \
35+
[--env KEY=value ...] \
36+
[--env-file .env] \
37+
[--version latest] \
38+
[--force]
39+
```
40+
41+
#### Notes
42+
- **`--path` vs `--entrypoint`:** Use `--path` to specify a subdirectory within the repo (useful for monorepos), and `--entrypoint` for the path to your app's entry file relative to that directory (or repo root if no `--path` is specified).
43+
- The CLI automatically downloads and extracts the GitHub source code and uploads your app for deployment.
44+
- For private repositories, provide a `--github-token` or set the `GITHUB_TOKEN` environment variable.
45+
1846
## Environment variables
1947

2048
You can set environment variables for your app using the `--env` flag. For example:
2149

2250
<CodeGroup>
23-
```bash Typescript/Javascript
51+
```bash Typescript/Javascript (inline)
2452
kernel deploy my_app.ts --env MY_ENV_VAR=my_value # Can add multiple env vars delimited by space
2553
```
2654

27-
```bash Python
55+
```bash Typescript/Javascript (from file)
56+
kernel deploy my_app.ts --env-file .env
57+
```
58+
59+
```bash Python (inline)
2860
kernel deploy my_app.py --env MY_ENV_VAR=my_value # Can add multiple env vars delimited by space
2961
```
62+
63+
```bash Python (from file)
64+
kernel deploy my_app.py --env-file .env
65+
```
3066
</CodeGroup>
3167

3268
## Deployment notes
3369

34-
- The `entrypoint_file_name` is the file name where you [defined](/apps/develop) your app.
35-
- **The entrypoint file and dependency manifest (`package.json` for JS/TS, `pyproject.toml` for Python) must both be in the root directory of your project.**
36-
- Include a `.gitignore` file to exclude dependency folders like `node_modules` and `.venv`.
70+
- **The dependency manifest (`package.json` for JS/TS, `pyproject.toml` for Python) must be present in the root directory of your project.**
71+
- View deployment logs using: `kernel deploy logs <deployment_id> --follow`
72+
- If you encounter a 500 error during deployment, verify that your entrypoint file name and extension are correct (e.g., `app.py` not `app` or `app.js`).
3773
- Kernel assumes the root directory contains at least this file structure:
3874

3975
<CodeGroup>
4076
```bash Typescript/Javascript
4177
project-root/
4278
├─ .gitignore # Exclude dependency folders like node_modules
43-
├─ my_app.ts # Entrypoint file
79+
├─ my_app.ts # Entrypoint file (can be located in a subdirectory, e.g. src/my_app.ts)
4480
├─ package.json
4581
├─ tsconfig.json # If using TypeScript
4682
└─ bun.lock | package-lock.json | pnpm-lock.yaml # One of these lockfiles

browsers/live-view.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,34 @@ To access the live view, visit the `browser_live_view_url` provided when you cre
1515
The `browser_live_view_url` supports additional query parameters to customize the live view:
1616
- `readOnly` (bool): when set to `true`, the view will be non-interactive.
1717

18+
## Kiosk mode
19+
20+
Kiosk mode provides a fullscreen live view experience without browser UI elements like the address bar and tabs. You can enable kiosk mode when creating a browser by setting the `kiosk_mode` parameter to `true`.
21+
22+
<CodeGroup>
23+
24+
```typescript Typescript/Javascript
25+
const kernelBrowser = await kernel.browsers.create({
26+
viewport: {
27+
width: 1920,
28+
height: 1080
29+
},
30+
kiosk_mode: true
31+
});
32+
```
33+
34+
```python Python
35+
kernel_browser = client.browsers.create(
36+
viewport={
37+
"width": 1920,
38+
"height": 1080
39+
},
40+
kiosk_mode=True
41+
)
42+
```
43+
44+
</CodeGroup>
45+
1846
## Browser persistence
1947

2048
`browser_live_view_url` becomes invalid once the browser is [deleted](/browsers/termination) manually or via timeout.

browsers/viewport.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ kernel_browser_auto = client.browsers.create(
5151

5252
</CodeGroup>
5353

54+
<Note>
55+
The `refresh_rate` parameter only applies to live view sessions and is ignored for [headless](/browsers/headless) browsers.
56+
</Note>
57+
5458
## Supported viewport configurations
5559

5660
Kernel supports specific viewport configurations. The server will reject unsupported combinations. When you provide width and height without specifying refresh_rate, it will be automatically determined if the dimensions match one of the supported resolutions exactly. The following resolutions are supported:
@@ -204,4 +208,4 @@ The server will reject any viewport configuration that doesn't exactly match one
204208
- Higher resolutions (like 2560x1440) may impact the performance and responsiveness of live view sessions
205209
- The viewport size affects how websites render, especially those with responsive designs
206210
- Screenshots taken from the browser will match the configured viewport dimensions
207-
- In [headless mode](/browsers/headless), the viewport configuration still applies for rendering and screenshots
211+
- In [headless mode](/browsers/headless), the viewport width and height still apply for rendering and screenshots, but the `refresh_rate` parameter is ignored

0 commit comments

Comments
 (0)