jupyterlab_commands_extension
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.
Features
- Command reference tab - Opens a new tab listing every registered JupyterLab command
- Full command IDs - Shows complete command identifiers, for example
iframe:openandfilebrowser: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-commandsCLI - Allowlist - Restricts the CLI to the command IDs in the
allowedCommandssetting
Requirements
- JupyterLab >= 4.6.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
file:download starts a browser download of a file the contents API serves. The path argument names the file relative to the server root; the file must exist, and folders are refused. The download starts in the browser tab that runs the relay, so the file lands on the user computer.
jupyterlab-commands execute file:download --args '{"path": "data/report.csv"}'
The optional --purpose flag names the purpose of an execution in at most 25 words, and the optional --owner flag names the agent or project that asked for it. The CLI treats both as optional; the agent skill requires them. An empty value, or a purpose over 25 words, is a usage error.
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.
Every execute request reaches the JupyterLab server log: the outcome, the command ID, the arguments as compact JSON truncated to 500 characters, the elapsed milliseconds, the caller's remote IP, and the purpose and owner when given, at INFO on success and WARNING on refusal or failure.
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, jupyterlab-commands-reference:open and file:download.
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 @stellarshenson/jupyterlab-commands-extension:plugin.
A user with a saved allowedCommands list keeps it; the extension does not rewrite the list, so add file:download with the Add to command executor button.
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, adds the rules the help cannot enforce, and carries six worked examples for the most common default commands. 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.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyterlab_commands_extension-1.1.12.tar.gz | 619.1 kB | Without provenance | Details for jupyterlab_commands_extension-1.1.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyterlab_commands_extension-1.1.12-py3-none-any.whl | Python 3 | none | any | Details for jupyterlab_commands_extension-1.1.12-py3-none-any.whl |
Total release size: 701.9 kB
Release files / jupyterlab_commands_extension-1.1.12.tar.gz
| Download URL | jupyterlab_commands_extension-1.1.12.tar.gz |
|---|---|
| Size | 619.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2ee9a5e9446bc99c109514e904597ac456226ae532562bda259841095bba317
|
|
BLAKE2b-256 checksum How to use checksums |
a2a9bea6847b99c96c665906a7a54200bc7eff7228db87283b70c6635c411a92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / jupyterlab_commands_extension-1.1.12-py3-none-any.whl
| Download URL | jupyterlab_commands_extension-1.1.12-py3-none-any.whl |
|---|---|
| Size | 82.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bf98fb071a5826f9f3facd3231f2fdb885669469179887c516d19e8bda135d0
|
|
BLAKE2b-256 checksum How to use checksums |
337fe64b34d56fa9352cf38e4a2a055ec6683b7974cb9bfd8c248d77f6bd7dba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Security for jupyterlab-commands-extension 1.1.12
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.