Skip to main content

jupyterlab_basic_terminal_extension

GitHub Actions npm version PyPI version Total PyPI downloads JupyterLab 4 Brought To You By KOLOMOLO Donate PayPal

Launch a utility terminal in JupyterLab that runs without a shell. Perfect for spawning short-lived console utilities that close their tab automatically when the underlying process exits, instead of leaving behind an idle shell prompt.

Features

  • Shell-less terminal command - Adds a JupyterLab command that opens a terminal bound directly to a utility process, with no surrounding shell
  • Auto-close on exit - Terminal tab closes as soon as the utility process finishes, keeping the workspace tidy
  • Server extension companion - Python jupyter_server extension exposes the route used by the frontend to spawn the process
  • JupyterLab 4 native - Built against @jupyterlab/application 4.x and ships as a prebuilt federated extension

Installation

Requires JupyterLab 4.6 or higher, and bash on the server - the terminal initialisation step uses bash-specific syntax, so a sh-only image will not work.

pip install jupyterlab_basic_terminal_extension

Usage

The extension deliberately adds no menu item, palette entry or launcher tile. Its entire surface is one command, invoked programmatically by other extensions, notebook code, or a jupyter_app_launcher tile:

await app.commands.execute('basic-terminal:launch', {
  argv: ['/opt/utils/my-utility.sh'],
  cwd: 'projects/demo'
});
  • argv (required) - non-empty array of strings. argv[0] is executed directly; there is no shell, so no globbing, pipes or redirection
  • cwd (optional) - absolute path used as-is, or a server-relative path resolved against ServerApp.root_dir ('' is the root). Omit it and the current file browser folder is used, unless the browser is on a registered non-default drive - such a drive is not assumed to map onto the server filesystem, so the server's own working directory is used instead. A path that does not resolve to a directory is rejected with HTTP 400
  • shutdownOnClose (optional, default false) - when true, closing the tab this command opened while the program still runs shuts the terminal session down, which ends the program; a tab the lab restores after a page reload does not carry the argument. When false or omitted, the lab's terminal setting Shut down on close decides, as in 1.0.8; its default false leaves the program running on the server after the tab is closed

The command resolves to the terminal widget, and rejects if the process exits before the widget can be displayed.

Uninstall

To remove the extension, execute:

pip uninstall jupyterlab_basic_terminal_extension

Metadata

Release files for jupyterlab-basic-terminal-extension 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jupyterlab-basic-terminal-extension 1.0.9
File Size Uploaded
jupyterlab_basic_terminal_extension-1.0.9.tar.gz 370.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-basic-terminal-extension 1.0.9
File Interpreter ABI Platform
jupyterlab_basic_terminal_extension-1.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 405.0 kB

Release files / jupyterlab_basic_terminal_extension-1.0.9.tar.gz

Download URL jupyterlab_basic_terminal_extension-1.0.9.tar.gz
Size 370.1 kB
Tags Source
SHA-256 checksum
How to use checksums
330d640bb5dd5b3c0920de033edb579042115768ef6885e547b7df46fa6203e7
BLAKE2b-256 checksum
How to use checksums
c80c86b9b3762c6f45f82573e4d87b6b2dd415efe463356109e1b494b773df44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / jupyterlab_basic_terminal_extension-1.0.9-py3-none-any.whl

Download URL jupyterlab_basic_terminal_extension-1.0.9-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2843a46c862861e7496765f108598ef35cdef567ffd58ea42f0dc17fe80a9d32
BLAKE2b-256 checksum
How to use checksums
036c40ea5bfe91520ed9ab9ec7907469678aef221ee5be5ca08bbfd61a68fd5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

This release

1.0.9 This release

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page