Skip to main content

jupyterlab_commands_extension

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

Display all available JupyterLab commands with their full reference IDs and arguments in a dedicated tab. The same tab exposes an allowlist of commands that the jupyterlab-commands CLI can run in the browser from a terminal.

Command Palette

Commands Reference Panel

Features

  • Command reference tab - Opens a new tab listing every registered JupyterLab command
  • Full command IDs - Shows complete command identifiers, for example iframe:open and filebrowser:copy
  • Argument inspection - Displays command arguments extracted from the running application
  • Searchable list - Filters commands by command ID, label or description
  • Command executor - Runs an allowed command from a terminal through the jupyterlab-commands CLI
  • Allowlist - Restricts the CLI to the command IDs in the allowedCommands setting

Requirements

  • JupyterLab >= 4.0.0
  • Python >= 3.10

Installation

pip install jupyterlab_commands_extension

For a development install from a clone, run make install.

Command line

jupyterlab-commands runs in a terminal of the lab. It finds the running Jupyter server, selects the most recently registered browser tab with the extension active, and asks that tab to run one command. Discovery uses the loopback address by default, and loopback requests bypass any proxy. An explicit --url with JUPYTERLAB_COMMANDS_TOKEN set reaches a remote server. The token is sent in the Authorization header and is never printed.

JUPYTERLAB_COMMANDS_TOKEN=... jupyterlab-commands --url https://remote-host:8888 --list

jupyterlab-commands --help and jupyterlab-commands <command> --help hold the full reference. The three subcommands are list, which prints the allowed command IDs, execute, which runs one allowed command, and activity. --json prints machine-readable output.

activity posts the current time to the JupyterHub activity route, the same write the single-user notifier makes. One call marks the server active once; the hub culls it as idle after its idle timeout counted from the last mark, so while work runs, repeat the call at an interval shorter than that timeout. It needs no browser tab, but it runs only in a lab started by JupyterHub: it posts {"last_activity": TS, "servers": {JUPYTERHUB_SERVER_NAME: {"last_activity": TS}}} to JUPYTERHUB_ACTIVITY_URL with the hub token from JUPYTERHUB_API_TOKEN or JPY_API_TOKEN, through no proxy and no redirect. The hub answers 200 even when the time does not move, because the route never moves time backwards. A hub refusal prints the hub message and exits 5. --url and --token do not apply to it.

jupyterlab-commands activity

Exit codes: 0 success, 2 discovery or usage error, 3 no browser client, 4 command not allowed, 5 execution error.

The browser tab is the executor: the command runs in the lab, not in the terminal.

Allowlist

The allowedCommands setting holds the command IDs the CLI may run. The defaults are docmanager:open, help:open, apputils:notify, notebook:create-new, console:create, terminal:create-new, launcher:create and jupyterlab-commands-reference:open.

The Add to command executor button in the Command Executor column of the reference tab appends that command ID to the setting, and the button then shows Added. The setting can also be edited directly in Settings > Settings Editor > Commands Executor, whose plugin ID is jupyterlab_commands_extension:plugin.

The reference tab opens from the command palette as Show Commands Reference under Help, and carries the text editor icon.

Agent skill

The agent skill at .agents/skills/jupyterlab-commands-extension/SKILL.md tells an AI assistant to read jupyterlab-commands --help first and adds only the rules the help cannot enforce. The wheel installs a copy at <sys.prefix>/share/jupyter/agents/skills/jupyterlab-commands-extension/SKILL.md. No agent reads that directory, so link the copy where agents look.

After pip install, with the Python that runs the lab, link the copy where Claude Code reads skills:

mkdir -p ~/.claude/skills && ln -s "$(python -c 'import sys; print(sys.prefix)')/share/jupyter/agents/skills/jupyterlab-commands-extension" ~/.claude/skills/jupyterlab-commands-extension

From a clone:

mkdir -p ~/.claude/skills && ln -s "$PWD/.agents/skills/jupyterlab-commands-extension" ~/.claude/skills/jupyterlab-commands-extension

Uninstall

pip uninstall jupyterlab_commands_extension

Contributing

If you would like to contribute to this extension, please refer to the Contributing Guide.

Metadata

Release files for jupyterlab-commands-extension 1.0.18

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-commands-extension 1.0.18
File Size Uploaded Provenance
jupyterlab_commands_extension-1.0.18.tar.gz 546.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jupyterlab-commands-extension 1.0.18
File Interpreter ABI Platform
jupyterlab_commands_extension-1.0.18-py3-none-any.whl Python 3 none any Details

Total release size: 621.6 kB

Release files / jupyterlab_commands_extension-1.0.18.tar.gz

Download URL jupyterlab_commands_extension-1.0.18.tar.gz
Size 546.8 kB
Tags Source
SHA-256 checksum
How to use checksums
67e3411868ae4617298d047bddc6e835c0961dad01cad09f6a14b78002a4deb5
BLAKE2b-256 checksum
How to use checksums
5ad50ca3da0548d09f1bc2673c673c16323ccfbe9cc3abbf2ac101809f52c55a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / jupyterlab_commands_extension-1.0.18-py3-none-any.whl

Download URL jupyterlab_commands_extension-1.0.18-py3-none-any.whl
Size 74.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01e0cffe50c768cc04c576cf1c4a8ab83857ea62baac45b458a346de858d0bb0
BLAKE2b-256 checksum
How to use checksums
f11669d8fbc4a50d2ab38db7e1615442a1696c47795c9bf198e95cd7471938d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for jupyterlab-commands-extension 1.0.18

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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