Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
32 changes: 30 additions & 2 deletions apps/deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <entrypoint_file_name>
```

#### 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/<owner>/<repo> \
--ref <branch|tag|commit> \
--entrypoint <path/to/entrypoint> \
[--path <optional/subdir>] \
[--github-token <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:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also show an example using --env-file .env with an env file instead of in-line values?

I find this is an easier pattern to replicate and one I use most consistently. I know this isn't exactly related to the branch, but thought I would just ask to have it included.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added! Now showing both --env inline and --env-file .env examples in the CodeGroup.

Expand All @@ -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 <deployment_id> --follow`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a bullet here that says something like "If you see 500 error returned during deployment, please ensure you have specified the entrypoint file name and type correctly.". We had a ticket in Linear related to a user seeing this error.

Copy link
Contributor Author

@jarugupj jarugupj Oct 15, 2025

Choose a reason for hiding this comment

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

Yeah, that's a nice to have!

Something like this should be good:-

  • 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).

lmk what you think?

- Kernel assumes the root directory contains at least this file structure:

<CodeGroup>
Expand Down
2 changes: 2 additions & 0 deletions quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ kernel deploy main.py # --env ANTHROPIC_API_KEY=XXX if Browser Use or Computer U

</CodeGroup>

**Advanced:** You can also [deploy directly from GitHub](/apps/deploy#from-github) without downloading code locally.

## 5. Invoke the app

<CodeGroup>
Expand Down