<commit_before># Extensions

JupyterLab extensions add functionality to the JupyterLab application. They can
provide new file viewer types, launcher activities, and output renderers, among
many other things. JupyterLab extensions are [npm](https://www.npmjs.com/) packages
(the standard package format in Javascript development).
For information about developing extensions, see the [developer documentation]().

In order to install JupyterLab extensions you need to have Node.js version 4+
installed.

If you use ``conda``, you can get it with:

```bash
conda -c conda-forge install nodejs
```

If you use [Homebrew](http://brew.sh/) on Mac OS X:

```bash
brew install node
```

## Installing Extensions

The base JupyterLab application includes a core set of extensions, which provide
the features described in this User Guide (Notebook, Terminal, Text Editor, etc.)
You can install new extensions into the application using the command:

```
jupyter labextension install <foo>
```

where `<foo>` is the name of a valid JupyterLab extension npm package on
[npm](https://www.npmjs.com). Use the `<foo>@<foo version>` syntax to install a
specific version of an extension, for example:

```
jupyter labextension install <foo>@1.2.3
```

You can also install an extension that is not uploaded to npm, i.e., `<foo>` can
be a local directory containing the extension, a gzipped tarball, or a URL to a
gzipped tarball.

We encourage extension authors to add the `jupyterlab-extensions` GitHub topic to
any repository with a JupyterLab extension to facilitate discovery.
You can see a list of extensions by searching Github for the
[jupyterlab-extensions](https://github.com/search?utf8=%E2%9C%93&q=topic%3Ajupyterlab-extensions&type=Repositories)
topic.

You can list the currently installed extensions by running the command:

```
jupyter labextension list
```

Uninstall an extension by running the command:

```
jupyter labextension uninstall <bar>
```

where `<bar>` is the name of the extension, as printed in the extension list.
You can also uninstall core extensions using this command (which can later be
re-installed).

Installing and uninstalling extensions can take some time, as they are
downloaded, bundled with the core extensions, and the whole application is rebuilt.
You can install/uninstall more than one extension in the same command by listing
their names after the `install` command.

If you are installing/uninstalling several extensions in several stages,
you may want to defer rebuilding the application by including the flag
`--no-build` in the install/uninstall step.
Once you are ready to rebuild, you can run the command:

```
jupyter lab build
```

## Disabling Extensions

You may want to disable specific JupyterLab extensions without rebuilding
the application. You can disable an extension by running the command:

```
jupyter labextension disable <bar>
```

where `<bar>` is the name of the extension.  This will prevent the extension
from loading in the browser, but does not require a rebuild.

You can re-enable the extension later using the command:

```
jupyter labextension enable <foo>
```

Core plugins can also be disabled (and then re-enabled).


## Advanced Usage

The JupyterLab application directory (where the application assets are built and
the settings reside) can be overridden using `--app-dir` in any of the
JupyterLab commands, or by setting the `JUPYTERLAB_DIR` environment variable.
If not specified, it will default to `<sys-prefix>/share/jupyter/lab`, where
`<sys-prefix>` is the site-specific directory prefix of the current Python
environment.  You can query the current application path by running `jupyter
lab path`.

### JupyterLab Build Process

To rebuild the app directory, run `jupyter lab build`.
By default the `jupyter lab install` command already builds the application,
so you typically do not need to call `build` directly.

Building consists of:

- Populating the `staging/` directory using template files
- Handling any locally installed packages
- Ensuring all installed assets are available
- Bundling the assets<commit_msg>Make extension shell examples have bash highlighting<commit_after># Extensions

JupyterLab extensions add functionality to the JupyterLab application. They can
provide new file viewer types, launcher activities, and output renderers, among
many other things. JupyterLab extensions are [npm](https://www.npmjs.com/) packages
(the standard package format in Javascript development).
For information about developing extensions, see the [developer documentation]().

In order to install JupyterLab extensions you need to have Node.js version 4+
installed.

If you use ``conda``, you can get it with:

```bash
conda -c conda-forge install nodejs
```

If you use [Homebrew](http://brew.sh/) on Mac OS X:

```bash
brew install node
```

## Installing Extensions

The base JupyterLab application includes a core set of extensions, which provide
the features described in this User Guide (Notebook, Terminal, Text Editor, etc.)
You can install new extensions into the application using the command:

```bash
jupyter labextension install <foo>
```

where `<foo>` is the name of a valid JupyterLab extension npm package on
[npm](https://www.npmjs.com). Use the `<foo>@<foo version>` syntax to install a
specific version of an extension, for example:

```bash
jupyter labextension install <foo>@1.2.3
```

You can also install an extension that is not uploaded to npm, i.e., `<foo>` can
be a local directory containing the extension, a gzipped tarball, or a URL to a
gzipped tarball.

We encourage extension authors to add the `jupyterlab-extensions` GitHub topic to
any repository with a JupyterLab extension to facilitate discovery.
You can see a list of extensions by searching Github for the
[jupyterlab-extensions](https://github.com/search?utf8=%E2%9C%93&q=topic%3Ajupyterlab-extensions&type=Repositories)
topic.

You can list the currently installed extensions by running the command:

```bash
jupyter labextension list
```

Uninstall an extension by running the command:

```bash
jupyter labextension uninstall <bar>
```

where `<bar>` is the name of the extension, as printed in the extension list.
You can also uninstall core extensions using this command (which can later be
re-installed).

Installing and uninstalling extensions can take some time, as they are
downloaded, bundled with the core extensions, and the whole application is rebuilt.
You can install/uninstall more than one extension in the same command by listing
their names after the `install` command.

If you are installing/uninstalling several extensions in several stages,
you may want to defer rebuilding the application by including the flag
`--no-build` in the install/uninstall step.
Once you are ready to rebuild, you can run the command:

```bash
jupyter lab build
```

## Disabling Extensions

You may want to disable specific JupyterLab extensions without rebuilding
the application. You can disable an extension by running the command:

```bash
jupyter labextension disable <bar>
```

where `<bar>` is the name of the extension.  This will prevent the extension
from loading in the browser, but does not require a rebuild.

You can re-enable the extension later using the command:

```bash
jupyter labextension enable <foo>
```

Core plugins can also be disabled (and then re-enabled).


## Advanced Usage

The JupyterLab application directory (where the application assets are built and
the settings reside) can be overridden using `--app-dir` in any of the
JupyterLab commands, or by setting the `JUPYTERLAB_DIR` environment variable.
If not specified, it will default to `<sys-prefix>/share/jupyter/lab`, where
`<sys-prefix>` is the site-specific directory prefix of the current Python
environment.  You can query the current application path by running `jupyter
lab path`.

### JupyterLab Build Process

To rebuild the app directory, run `jupyter lab build`.
By default the `jupyter lab install` command already builds the application,
so you typically do not need to call `build` directly.

Building consists of:

- Populating the `staging/` directory using template files
- Handling any locally installed packages
- Ensuring all installed assets are available
- Bundling the assets
{'fraction_non_alphanumeric': 0.06970833837589253, 'fraction_numerical': 0.0024204284158296017, 'mean_word_length': 4.932519741564968, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3492326', 'n_tokens_mistral': 2345, 'n_tokens_neox': 2193, 'n_words': 1130}