JupyterLab Desktop comes with a CLI (jlab
) that provides a rich set of commands and options to launch and configure the application. Below are the CLI options with examples.
JupyterLab Desktop installers for Windows and Linux create jlab
CLI command as part of the installation process. However, macOS application creates this command at first launch and after updates. This command creation might sometimes fail if the user doesn't have the required permissions. See this troubleshooting section to properly setup CLI on macOS.
jlab
Application launchjlab env
Python environment managementjlab config
Application and project setting managementjlab appdata
Access application cache datajlab logs
Access application logs
- Open directories using relative or absolute path
jlab .
launch in current directoryjlab ../notebooks
launch with relative pathjlab /Users/username/notebooks
launch with absolute path
- Open notebooks and other files using relative or absolute path
jlab /Users/username/notebooks/test.ipynb
launch notebook with absolute pathjlab ../notebooks/test.ipynb
launch notebook with relative pathjlab ../test.py
launch python file with relative path
- Open with a custom Python environment
jlab --python-path /Users/username/custom_env/bin/python ../notebooks/test.ipynb
launch notebook with custom Python environment
- Connect to existing JupyterLab server
jlab https://example.org/lab?token=abcde
See Python environment management documentation for jlab env
CLI options.
-
Show application settings together with any project level overrides. If
--project-path
is set then setting overrides for the project in the specified directory are listed otherwise overrides for the current working directory are listed.Examples:
# list global application settings and project overrides in current working directory jlab config list # list global application settings and project overrides in /opt/test-project jlab config list --project-path=/opt/test-project
-
Set global application setting or project setting. If called without
--project
and--project-path
sets global application setting. Calling with--project
sets the project override for the current working directory. Calling with--project-path
sets the project override for the specified directory.Examples:
# set checkForUpdatesAutomatically to false jlab config set checkForUpdatesAutomatically false # set theme to "dark" jlab config set theme "dark" # set the global default Python path for JupyterLab server jlab config set pythonPath /Users/username/custom_env/bin/python # set the default Python path for JupyterLab server for project at current working directory jlab config set pythonPath /Users/username/custom_env/bin/python --project # set the default Python path for JupyterLab server for particular project jlab config set pythonPath /Users/username/custom_env/bin/python --project-path=/opt/test-project # set conda channels to ["conda-forge", "bioconda"] on Windows jlab config set condaChannels [\"conda-forge\",\"bioconda\"] # set conda channels to ["conda-forge", "bioconda"] on macOS and Linux config set condaChannels '["conda-forge","bioconda"]'
-
Unset/reset global application setting or project setting. If called without
--project
and--project-path
unsets global application setting. Calling with--project
unsets the project override for the current working directory. Calling with--project-path
unsets the project override for the specified directory. Once a project setting is unset it defaults to global setting. Once a global setting is unset its default value is used.Examples:
# unset checkForUpdatesAutomatically jlab config unset checkForUpdatesAutomatically # unset the global default Python path for JupyterLab server jlab config unset pythonPath # unset the default Python path for JupyterLab server for project at current working directory jlab config unset pythonPath --project # unset the default Python path for JupyterLab server for particular project jlab config unset pythonPath --project-path=/opt/test-project
-
Open the settings JSON file for the global settings or project settings using the default File editor on system. If called without
--project
and--project-path
opens global application settings file. Calling with--project
opens the settings file for the the project at current working directory. Calling with--project-path
opens the settings file for the project at specified directory.Examples:
# open global settings file jlab config open-file # open settings file for project at current working directory jlab config open-file --project # open settings file for particular project jlab config open-file --project-path=/opt/test-project
-
Show application data. This is the data cached by the app and reused at restart. Some of the data is not listed for simplicity but can be accessed using the
open-file
option.Examples:
# list application data jlab appdata list
-
Open the application data JSON file using the default File editor on system.
Examples:
# open the application data file jlab appdata open-file
-
Show application logs in system Terminal.
Examples:
# show application data jlab logs show
-
Open the application log file using the default File editor on system.
Examples:
# open the application log file jlab logs open-file
For additional CLI options run jlab --help
in command line.