Repolode
timkpaine

timkpaine/jupyterlab-commands

A JupyterLab extension that lets you register arbitrary Python functions as commands in the command palette.

Stars
63
Forks
7
Open issues
1
Last commit
4 days ago

What is it?

jupyterlab-commands adds user-defined Python functions to JupyterLab's command palette. Each command is a small Python function registered through the JupyterLab server configuration, and it runs on the server side, so it does not need to be written into a notebook cell.

This is useful for repeatable tasks that are not really part of a notebook's analysis, such as running a predefined nbconvert export or calling a version control operation. Command output is shown in a terminal inside JupyterLab, so results are visible without leaving the interface.

The project is installed with pip and configured by setting a dictionary of commands on the JupyterLabCommands class in jupyter_lab_config.py. A related project, jupyterlab-nbconvert-nocode, provides notebook conversion that removes code cells.

Key features

  • 01Adds custom Python functions to the JupyterLab command palette.
  • 02Runs commands on the server outside notebooks and consoles.
  • 03Displays command output in a JupyterLab terminal.
  • 04Configured through jupyter_lab_config.py with a simple dictionary.

Use cases

  • Running a predefined nbconvert export on a notebook with one click.
  • Triggering version control actions without recording them in a notebook.
  • Exposing team-specific helper scripts as palette commands.

Quick start

  1. 1

    Install the package from PyPI

    pip install jupyterlab-commands
  2. 2

    Add your Python command functions to jupyter_lab_config.py and set c.JupyterLabCommands.commands

Things to know

  • Commands are defined as Python functions in the Jupyter config file, so setup requires editing configuration.

Topics

FAQ

What is jupyterlab-commands?
A JupyterLab extension that lets you register arbitrary Python functions as commands in the command palette. jupyterlab-commands adds user-defined Python functions to JupyterLab's command palette. Each command is a small Python function registered through the JupyterLab server configuration, and it runs on the server side, so it does not need to be written into a notebook cell.
Is jupyterlab-commands free to use? What license does it have?
jupyterlab-commands is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is jupyterlab-commands still maintained?
Actively maintained. The last commit to jupyterlab-commands was on Nov 1, 2026.
What can I use jupyterlab-commands for?
Running a predefined nbconvert export on a notebook with one click. Triggering version control actions without recording them in a notebook. Exposing team-specific helper scripts as palette commands.
How do I install jupyterlab-commands?
Install the package from PyPI: pip install jupyterlab-commands Add your Python command functions to jupyter_lab_config.py and set c.JupyterLabCommands.commands
Where can I get jupyterlab-commands?
The source code and installation instructions are on GitHub: https://github.com/timkpaine/jupyterlab-commands

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects