From d0def05d9d6434775d62af422b687e9307421031 Mon Sep 17 00:00:00 2001 From: phani Date: Tue, 14 Oct 2025 12:22:12 -0400 Subject: [PATCH 1/3] deploy from github docs update --- apps/deploy.mdx | 32 ++++++++++++++++++++++++++++++-- quickstart.mdx | 2 ++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/apps/deploy.mdx b/apps/deploy.mdx index 92bb6b0..bd6b95a 100644 --- a/apps/deploy.mdx +++ b/apps/deploy.mdx @@ -9,12 +9,41 @@ Once you deploy an app on Kernel, you can schedule its actions on a job or run t ## Deploy the app +### From local directory + Use our CLI from the root directory of your project: ```bash # entrypoint_file_name should be where you've defined your Kernel app kernel deploy ``` +#### Notes + +- The `entrypoint_file_name` is the file name where you [defined](/apps/develop) your app. +- Include a `.gitignore` file to exclude dependency folders like `node_modules` and `.venv`. + +### From GitHub + +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. + +```bash +kernel deploy github \ + --url https://github.com// \ + --ref \ + --entrypoint \ + [--path ] \ + [--github-token ] \ + [--env KEY=value ...] \ + [--env-file .env] \ + [--version latest] \ + [--force] +``` + +#### Notes + +- The CLI automatically downloads and extracts the GitHub source, prunes large dependency folders (like `node_modules`), and uploads your app for deployment. +- For private repositories, provide a `--github-token` or set the `GITHUB_TOKEN` environment variable. + ## Environment variables You can set environment variables for your app using the `--env` flag. For example: @@ -31,9 +60,8 @@ kernel deploy my_app.py --env MY_ENV_VAR=my_value # Can add multiple env vars de ## Deployment notes -- The `entrypoint_file_name` is the file name where you [defined](/apps/develop) your app. - **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.** -- Include a `.gitignore` file to exclude dependency folders like `node_modules` and `.venv`. +- View deployment logs using: `kernel deploy logs --follow` - Kernel assumes the root directory contains at least this file structure: diff --git a/quickstart.mdx b/quickstart.mdx index f633d21..6cba35d 100644 --- a/quickstart.mdx +++ b/quickstart.mdx @@ -71,6 +71,8 @@ kernel deploy main.py # --env ANTHROPIC_API_KEY=XXX if Browser Use or Computer U +**Advanced:** You can also [deploy directly from GitHub](/apps/deploy#from-github) without downloading code locally. + ## 5. Invoke the app From d9ed45f4e47bc12bdda45b945e67145c53d8c684 Mon Sep 17 00:00:00 2001 From: phani Date: Tue, 14 Oct 2025 15:21:43 -0400 Subject: [PATCH 2/3] PR changes --- apps/deploy.mdx | 9 ++++----- quickstart.mdx | 2 -- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/deploy.mdx b/apps/deploy.mdx index bd6b95a..9b634cd 100644 --- a/apps/deploy.mdx +++ b/apps/deploy.mdx @@ -13,7 +13,6 @@ Once you deploy an app on Kernel, you can schedule its actions on a job or run t Use our CLI from the root directory of your project: ```bash -# entrypoint_file_name should be where you've defined your Kernel app kernel deploy ``` @@ -40,8 +39,8 @@ kernel deploy github \ ``` #### Notes - -- The CLI automatically downloads and extracts the GitHub source, prunes large dependency folders (like `node_modules`), and uploads your app for deployment. +- **`--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). +- The CLI automatically downloads and extracts the GitHub source code and uploads your app for deployment. - For private repositories, provide a `--github-token` or set the `GITHUB_TOKEN` environment variable. ## Environment variables @@ -60,7 +59,7 @@ kernel deploy my_app.py --env MY_ENV_VAR=my_value # Can add multiple env vars de ## Deployment notes -- **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.** +- **The dependency manifest (`package.json` for JS/TS, `pyproject.toml` for Python) must be present in the root directory of your project.** - View deployment logs using: `kernel deploy logs --follow` - Kernel assumes the root directory contains at least this file structure: @@ -68,7 +67,7 @@ kernel deploy my_app.py --env MY_ENV_VAR=my_value # Can add multiple env vars de ```bash Typescript/Javascript project-root/ ├─ .gitignore # Exclude dependency folders like node_modules - ├─ my_app.ts # Entrypoint file + ├─ my_app.ts # Entrypoint file (can be located in a subdirectory, e.g. src/my_app.ts) ├─ package.json ├─ tsconfig.json # If using TypeScript └─ bun.lock | package-lock.json | pnpm-lock.yaml # One of these lockfiles diff --git a/quickstart.mdx b/quickstart.mdx index 6cba35d..f633d21 100644 --- a/quickstart.mdx +++ b/quickstart.mdx @@ -71,8 +71,6 @@ kernel deploy main.py # --env ANTHROPIC_API_KEY=XXX if Browser Use or Computer U -**Advanced:** You can also [deploy directly from GitHub](/apps/deploy#from-github) without downloading code locally. - ## 5. Invoke the app From 0e7259fdcda3be835aec33ecb4eba6b60822c33d Mon Sep 17 00:00:00 2001 From: phani Date: Wed, 15 Oct 2025 15:20:30 -0400 Subject: [PATCH 3/3] pr suggestions applied --- apps/deploy.mdx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/deploy.mdx b/apps/deploy.mdx index 9b634cd..84f69b6 100644 --- a/apps/deploy.mdx +++ b/apps/deploy.mdx @@ -48,19 +48,28 @@ kernel deploy github \ You can set environment variables for your app using the `--env` flag. For example: -```bash Typescript/Javascript +```bash Typescript/Javascript (inline) kernel deploy my_app.ts --env MY_ENV_VAR=my_value # Can add multiple env vars delimited by space ``` -```bash Python +```bash Typescript/Javascript (from file) +kernel deploy my_app.ts --env-file .env +``` + +```bash Python (inline) kernel deploy my_app.py --env MY_ENV_VAR=my_value # Can add multiple env vars delimited by space ``` + +```bash Python (from file) +kernel deploy my_app.py --env-file .env +``` ## Deployment notes - **The dependency manifest (`package.json` for JS/TS, `pyproject.toml` for Python) must be present in the root directory of your project.** - View deployment logs using: `kernel deploy logs --follow` +- 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`). - Kernel assumes the root directory contains at least this file structure: