{"id":23507346,"url":"https://github.com/simplyhexagonal/typescript-jupyter-kernel","last_synced_at":"2025-05-12T15:50:57.983Z","repository":{"id":71910296,"uuid":"458786053","full_name":"simplyhexagonal/typescript-jupyter-kernel","owner":"simplyhexagonal","description":"Typescript kernel for Jupyter Notebook and Labs","archived":false,"fork":false,"pushed_at":"2022-08-29T05:33:05.000Z","size":2015,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-06T20:26:14.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/simplyhexagonal.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,"governance":null}},"created_at":"2022-02-13T11:13:58.000Z","updated_at":"2024-05-15T01:28:59.000Z","dependencies_parsed_at":"2023-09-24T03:50:39.144Z","dependency_job_id":null,"html_url":"https://github.com/simplyhexagonal/typescript-jupyter-kernel","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"519d5d7d6d1d0bb91912b3f8767db44b37de22ea"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyhexagonal%2Ftypescript-jupyter-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyhexagonal%2Ftypescript-jupyter-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyhexagonal%2Ftypescript-jupyter-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplyhexagonal%2Ftypescript-jupyter-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplyhexagonal","download_url":"https://codeload.github.com/simplyhexagonal/typescript-jupyter-kernel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253524965,"owners_count":21922003,"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":[],"created_at":"2024-12-25T10:18:12.430Z","updated_at":"2025-05-12T15:50:57.960Z","avatar_url":"https://github.com/simplyhexagonal.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Install\n\nMake sure you have Jupyter Notebook or Jupyter Lab installed.\n\nThen, install the package with:\n\n```sh\nnpm install -g typescript-jupyter-kernel\n```\n\nOnce npm has finished, run the following command:\n\n```\nts-kernel install\n```\n\nYou can now check if the installation succeeded:\n\n```sh\njupyter kernelspec list\n\n# Available kernels:\n#  typescript        ~/.local/share/jupyter/kernels/typescript\n```\n\n## Features\n\n**Code completion:** using the `TAB` key, driven by the official [Typescript LSP Server](https://github.com/typescript-language-server/typescript-language-server) (same used by VSCode)\n\n![](https://raw.githubusercontent.com/simplyhexagonal/typescript-jupyter-kernel/main/assets/typescript-jupyter-kernel-code-completion.gif)\n\n**Use NPM dependencies:** simply navigate to your notebook's directory and add a `package.json` file\n\n```sh\ncd /path/to/notebook\nnpm init\nnpm install --save short-unique-id\n```\n\n**Fully written in Typescript:** the kernel is written entirely in Typescript 🦾\n\n**SWC Optimized:** the kernel compiles your code with [SWC](https://github.com/swc-project/swc), making it blazing fast!\n\n**Able to render HTML:** the kernel can render HTML in the notebook\n\n![](https://raw.githubusercontent.com/simplyhexagonal/typescript-jupyter-kernel/main/assets/typescript-jupyter-kernel-html-output.png)\n\n**Custom output command:** the kernel includes a handy `jupyter.out` function so your notebooks\naren't riddled with unsightly `console.log` calls\n\n**Fully compatible:** works both in JupyterLab and Jupyter Notebook\n\n![](https://raw.githubusercontent.com/simplyhexagonal/typescript-jupyter-kernel/main/assets/typescript-jupyter-kernel-in-jupyter-lab.png)\n\n## Convenience `jupyter` functionalities\n\nWe have implemented a handy `jupyter` object containing several useful functions:\n\n- `dom`\n\n  This is a virtual dom (JSDOM) which allows you to build html in the notebook.\n\n```ts\n\n```\n\n- `html`\n\n  This is an alias for the included D3 Selection library which allows powerful HTML manipulation.\n\n- `render`\n\n  This is a function that renders the html in the notebook.\n\n- `out`\n\n  This is a function that prints a given string to the notebook between `\u003cpre\u003e` tags, useful for printing the raw output of a function or process.\n\n- `escape`\n\n  This is a function that escapes the given string so it can be safely printed in the notebook.\n\n- `data`\n\n  This is an alias for the included D3 DSV library which allows to read data from/to CSV, TSV or JSON files/strings.\n\n- `table`\n\n  This is a function that renders a table in the notebook from data using one of the `data` functions.\n\n- `load`\n\n  You can use the `load` helper to load either a `js` or `css` file into the notebook.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplyhexagonal%2Ftypescript-jupyter-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplyhexagonal%2Ftypescript-jupyter-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplyhexagonal%2Ftypescript-jupyter-kernel/lists"}