{"id":13816559,"url":"https://github.com/yunabe/tslab","last_synced_at":"2025-05-15T13:05:59.317Z","repository":{"id":44816207,"uuid":"196690096","full_name":"yunabe/tslab","owner":"yunabe","description":"Interactive JavaScript and TypeScript programming with Jupyter","archived":false,"fork":false,"pushed_at":"2024-06-22T21:54:49.000Z","size":480,"stargazers_count":802,"open_issues_count":52,"forks_count":44,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-06T15:46:57.870Z","etag":null,"topics":["javascript","jupyter","jupyter-notebook","jupyterlab","nodejs","repl","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yunabe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-13T07:04:48.000Z","updated_at":"2025-04-30T16:40:47.000Z","dependencies_parsed_at":"2022-08-12T11:40:12.553Z","dependency_job_id":"31898211-2f11-41c3-8dfd-aec9b92fea81","html_url":"https://github.com/yunabe/tslab","commit_stats":{"total_commits":205,"total_committers":3,"mean_commits":68.33333333333333,"dds":0.009756097560975618,"last_synced_commit":"ced780c5e3b676c98b6b227f0b17bda12808f82c"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunabe%2Ftslab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunabe%2Ftslab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunabe%2Ftslab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yunabe%2Ftslab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yunabe","download_url":"https://codeload.github.com/yunabe/tslab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254346624,"owners_count":22055808,"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":["javascript","jupyter","jupyter-notebook","jupyterlab","nodejs","repl","typescript"],"created_at":"2024-08-04T05:00:45.705Z","updated_at":"2025-05-15T13:05:59.300Z","avatar_url":"https://github.com/yunabe.png","language":"TypeScript","readme":"# tslab\n\n[![CI](https://github.com/yunabe/tslab/actions/workflows/run_tests.yml/badge.svg)](https://github.com/yunabe/tslab/actions/workflows/run_tests.yml)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/yunabe/tslab-examples/master?filepath=notebooks%2Fgetting_started.ipynb)\n[![npm version](https://badge.fury.io/js/tslab.svg)](https://www.npmjs.com/package/tslab)\n\ntslab is an interactive programming environment and REPL with Jupyter for JavaScript and TypeScript users.\nYou can write and execute JavaScript and TypeScript interactively on browsers and save results as Jupyter notebooks.\n\n## Features\n\n- Interactive JavaScript and TypeScript programming with [Jupyter](https://jupyter.org/) and [Node.js](https://nodejs.org/).\n- The power of types from [TypeScript project](https://www.typescriptlang.org/).\n  - Type safety even in JavaScript mode.\n  - Rich code completion and code inspection thanks to types.\n- Display non-text contents like images, HTML, JavaScript, SVG, etc...\n- Interactive deep neural network machine learning ([TensorFlow.js](https://www.tensorflow.org/js/guide/nodejs)) and data exploration with JavaScript.\n- JavaScript is [40x faster than Python](https://www.google.com/search?hl=en\u0026q=python3+node.js+performance).\n- TypeScript 5.0 support.\n- Top-level [`await`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await) support.\n- REPL console support.\n\n### Screenshots: Code inspection (Shift-Tab) and completion (Tab)\n\n\u003cdiv\u003e\u003cimg src=\"docs/images/inspect.jpg\" width=\"400\" height=\"160\"\u003e\u003c/div\u003e\n\u003cdiv\u003e\u003cimg src=\"docs/images/complete.jpg\" width=\"400\" height=\"160\"\u003e\u003c/div\u003e\n\n## Try tslab without installing it\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/yunabe/tslab-examples/master?filepath=notebooks%2Fgetting_started.ipynb)\n\nThanks to [binder (mybinder.org)](https://mybinder.org/), you can try tslab on your browsers without installing it into your system.\nOpen a temporary Jupyter Notebook from the button above and enjoy interactive JavaScript and TypeScript programming.\n\n## Example notebooks\n\nTo learn what what we can do with JavaScript on Jupyter, view example notebooks in nbviewer.\n\n- [Getting Started](https://nbviewer.jupyter.org/github/yunabe/tslab-examples/blob/master/notebooks/getting_started.ipynb)\n- [Getting Started for JavaScript user](https://nbviewer.jupyter.org/github/yunabe/tslab-examples/blob/master/notebooks/getting_started_javascript.ipynb)\n- [Deep Learning with TensorFlow.js](https://nbviewer.jupyter.org/github/yunabe/tslab-examples/blob/master/notebooks/tensorflow.ipynb)\n\nIf nbviewer is down, please view the notebooks on GitHub instead.\n\n- [Getting Started](https://github.com/yunabe/tslab-examples/blob/master/notebooks/getting_started.ipynb)\n- [Getting Started for JavaScript user](https://github.com/yunabe/tslab-examples/blob/master/notebooks/getting_started_javascript.ipynb)\n- [Deep Learning with TensorFlow.js](https://github.com/yunabe/tslab-examples/blob/master/notebooks/tensorflow.ipynb)\n\n## Installing tslab\n\n### Prerequisites\n\n- Install [Node.js](https://nodejs.org/) (LTS or Current)\n- Install [Python3.x](https://www.python.org/downloads/)\n  - tslab works with Jupyter on Python2.7.\n  - But I recommend you to use Jupyter on Python3.x because\n    [the latest Jupyter does not support Python2.7](https://ipython.readthedocs.io/en/stable/whatsnew/version6.html)\n- Install the latest version of [JupyterLab or Jupyter Notebook](https://jupyter.org/install)\n\n### Installing tslab\n\nFirst, install `tslab` with `npm`.\n\n```shell\nnpm install -g tslab\n```\n\nPlease make sure `tslab` command is available in your terminal.\n\n```\ntslab install --version\n```\n\nThen, register `tslab` to your Jupyter environment.\n\n```shell\ntslab install [--python=python3]\n```\n\nBy default, tslab is registered with `python3` in unix-like system and `python` in Windows.\nIf Jupyter is installed with a different Python in your system, please specify the python command with `--python` flag.\n\nAfter you run `tslab install`, please check two kernels (jslab and tslab) are installed properly to jupyter.\n\n```shell\n$ jupyter kernelspec list\nAvailable kernels:\n  jslab      /usr/local/google/home/yunabe/.local/share/jupyter/kernels/jslab\n  tslab      /usr/local/google/home/yunabe/.local/share/jupyter/kernels/tslab\n```\n\n### Usage: JupyterLab and Jupyter Notebook\n\nAfter you register `tslab` to Jupyter, start JupyterLab and Jupyter Notebook as usual. You can now create JavaScript and TypeScript notebooks.\n\n```shell\n# JupyterLab\n# `--port=` to change the port to accept connections.\n# `--ip=0.0.0.0` to accept external connections.\njupyter lab [--port=8888] [--ip=0.0.0.0]\n\n# Jupyter Notebook\njupyter notebook\n```\n\nIn Jupyter, you can complete code by pressing `Tab` and show tooltips by pressing `Shift + Tab`.\n\n### Usage: REPL console\n\nYou can also use tslab and Jupyter as an interactive console (REPL).\nTo use tslab as REPL, please run `jupyter console` with `--kernel=jslab` (JavaScript) or `--kernel=tslab` (TypeScript).\n\n```shell\njupyter console --kernel=tslab\n```\n\n## Clarification\n\ntslab is an interactive JavaScript and TypeScript programming environment on Node.js (aka Server-side JavaScript).\ntslab does not support code execution on browsers (aka Client-side JavaScript) at this moment.\n\n## Read more\n\n- [Advanced topics](docs/advanced.md)\n- [Developing tslab](docs/developing.md)\n- [Internal design](docs/internal.md)\n","funding_links":[],"categories":["Javascript/Typescript Notebooks","TypeScript"],"sub_categories":["Typescript Jupyter kernel"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunabe%2Ftslab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyunabe%2Ftslab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyunabe%2Ftslab/lists"}