{"id":16546916,"url":"https://github.com/JovianHQ/kernel-run","last_synced_at":"2025-10-28T15:32:00.871Z","repository":{"id":62574054,"uuid":"187409748","full_name":"JovianHQ/kernel-run","owner":"JovianHQ","description":"Run any Jupyter notebook instantly using Kaggle kernels","archived":false,"fork":false,"pushed_at":"2020-04-11T09:25:52.000Z","size":29,"stargazers_count":63,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T19:50:02.216Z","etag":null,"topics":["command-line-tool","jupyter-notebook","kaggle","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JovianHQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-18T22:09:04.000Z","updated_at":"2024-02-26T15:04:11.000Z","dependencies_parsed_at":"2022-11-03T18:36:16.907Z","dependency_job_id":null,"html_url":"https://github.com/JovianHQ/kernel-run","commit_stats":null,"previous_names":["swiftace-ai/kernel-run"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JovianHQ%2Fkernel-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JovianHQ%2Fkernel-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JovianHQ%2Fkernel-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JovianHQ%2Fkernel-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JovianHQ","download_url":"https://codeload.github.com/JovianHQ/kernel-run/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238672684,"owners_count":19511309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","jupyter-notebook","kaggle","machine-learning"],"created_at":"2024-10-11T19:13:00.881Z","updated_at":"2025-10-28T15:31:55.527Z","avatar_url":"https://github.com/JovianHQ.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `kernel-run` 🔥🚀\n\nInstantly create and run a Kaggle kernel from any Jupyter notebook (local file or URL).\n\n![kaggle-run-demo](https://i.imgur.com/KsrIYH3.gif)\n\n```\n$ pip install kernel-run --upgrade\n\n$ kernel-run path/to/notebook.ipynb\nKernel created successfully: https://www.kaggle.com/aakashns/kr-notebook/edit\n\n$ kernel-run http://cs231n.stanford.edu/notebooks/pytorch_tutorial.ipynb\nKernel created successfully: https://www.kaggle.com/aakashns/kr-pytorch-tutorial/edit\n```\n\n`kernel-run` uploads the Jupyter notebook to a private kernel in your Kaggle account, and launches a browser window so you can start editing/executing the code immediately.\n\n## Installation\n\n```\npip install kernel-run --upgrade\n```\n\nThe above command install a command-line tool called `kernel-run` which can be invoked from the terminal/command prompt.\n\nNote: To allow `kaggle-run` to upload the notebook to your Kaggle account, you need to download the [Kaggle API credentials file `kaggle.json`](https://github.com/Kaggle/kaggle-api#api-credentials). To download the `kaggle.json` file:\n\n1. Go to https://kaggle.com\n2. Log in and go to your account page\n3. Click the \"Create New API Token\" button in the \"API\" section\n4. Move the downloaded `kaggle.json` file to the folder `~/.kaggle/`\n\n## CLI Usage \u0026 Options\n\nRun the `kernel-run` command on your terminal/command prompt with a Jupyter notebook's path (or URL) as the argument:\n\n```\n$ kernel-run path/to/notebook.ipynb\nKernel created successfully: https://www.kaggle.com/aakashns/kr-notebook/edit\n\n$ kernel-run http://cs231n.stanford.edu/notebooks/pytorch_tutorial.ipynb\nKernel created successfully: https://www.kaggle.com/aakashns/kr-pytorch-tutorial/edit\n```\n\nThere are various options you can configure. Run `kernel-run -h` to see the options:\n\n```\nusage: kernel-run notebook_path_or_url [-h] [--public] [--new] [--no-browser] [--strip-output] [--prefix PREFIX]\n\npositional arguments:\n  notebook_path_or_url  Path/URL of the Jupyter notebook\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --public              Create a public kernel\n  --new                 Create a new kernel, if a kernel with the same name exists\n  --no-browser          Don't open a browser window automatically\n  --strip-output        Clear output cells before uploading notebook (useful for large files)\n  --prefix PREFIX       Prefix added to kernel title to easy identification (defaults to 'kr/')\n```\n\n## Python API\n\nYou can also use the library form a Python script or Jupyter notebook. It can be imported as `kernel_run`.\n\n```python\nfrom kernel_run import create_kernel\n\ncreate_kernel('path/to/notebook.ipynb', public=True, no_browser=True)\n# Kernel created successfully: https://www.kaggle.com/aakashns/kr-notebook/edit\n```\n\nThe arguments to `create_kernel` are identical to the CLI options:\n\n```python\ndef create_kernel(path_or_url, public=False, no_browser=False, new=False,\n                  strip_output=False, prefix='kr/', creds_path=None):\n    \"\"\"Instantly create and run a Kaggle kernel from a Jupyter notebook (local file or URL)\n\n    Arguments:\n        path_or_url (string): Path/URL to the Jupyter notebook\n        public (bool, optional): If true, creates a public kernel. A private kernel\n            is created by default.\n        no_browser (bool, optional): If true, does not attempt to automatically open\n            a browser tab to edit the created Kernel\n        new (bool, optional): If true, creates a new Kernel by adding a random\n            5-letter string at the end of the title\n        prefix (string, optional): A prefix added to the Kernel title, to indicate that\n            the Kernel was created using kernel-run\n        creds_path (string, optional): Path to the 'kaggle.json' credentials file\n            (defaults to '~/.kaggle/kaggle.json')\n        strip_output (bool, optional): Clear output cells before uploading notebook.\n    \"\"\"\n```\n\n## Credits\n\nDeveloped with love by the Jovian team ( https://www.jvn.io )! Contributions welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJovianHQ%2Fkernel-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJovianHQ%2Fkernel-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJovianHQ%2Fkernel-run/lists"}