Commands#

Commands are the entry points for triggering actions for the user interface. They are linked to menu entries, keyboard shortcuts, the launcher and the command palette.

A command has an unique id that is used for referencing it or executing it. It could also require input arguments. Those arguments are maybe different in the command palette and the keyboard shortcuts for example. That can explain varying behavior depending on the source of a command trigger.

Commands in Markdown Files#

JupyterLab supports using commands in Markdown files with the following syntax:

`<button data-commandLinker-command="help:about" href="#">TEST</button>`

The value of data-commandLinker-command must be a valid command identifier (see list below).

This allows you to embed buttons or other elements with custom commands in your Markdown documents.

Command Palette#

All user actions in JupyterLab are processed through a centralized command system. These commands are shared and used throughout JupyterLab (menu bar, context menus, keyboard shortcuts, etc.). The command palette provides a keyboard-driven way to search for and run JupyterLab commands:

The command palette can be accessed from the View menu or using the keyboard shortcut Command/Ctrl Shift C.

The command palette can be displayed in the sidebar by adding 'modal': false to the Settings.

Commands List#

The table below display the list of commands and the associated keyboard shortcuts. The unique identifier is useful if you want to customize the menus, the toolbars or the keyboard shortcuts.

Note

On Mac OS, the Ctrl key should be replaced by Cmd.

Command id

Label

Shortcuts

application:activate-next-tab

Activate Next Tab

Ctrl Shift ]

application:activate-next-tab-bar

Activate Next Tab Bar

Ctrl Shift .

application:activate-previous-tab

Activate Previous Tab

Ctrl Shift [

application:activate-previous-tab-bar

Activate Previous Tab Bar

Ctrl Shift ,

application:close

Close Tab

Alt W

application:close-all

Close All Tabs

application:close-other-tabs

Close All Other Tabs

application:close-right-tabs

Close Tabs to Right

application:reset-layout

Reset Default Layout

application:set-mode

Set the layout mode.

application:toggle-header

Show Header

application:toggle-left-area

Show Left Sidebar

Ctrl B

application:toggle-mode

Simple Interface

Ctrl Shift D

application:toggle-presentation-mode

Presentation Mode

application:toggle-right-area

Show Right Sidebar

Ctrl J

application:toggle-side-tabbar

Toggle Sidebar Element

Alt 1

application:toggle-side-tabbar

Show Left Activity Bar

apputils:activate-command-palette

Activate Command Palette

Ctrl Shift C

apputils:adaptive-theme

Synchronize with System Settings

apputils:change-dark-theme

Switch to the provided dark theme.

apputils:change-font

waiting for fonts

apputils:change-light-theme

Switch to the provided light theme.

apputils:change-theme

Switch to the provided theme.

apputils:decr-font-size

Decrease Font Size

apputils:dismiss-notification

Dismiss a notification

apputils:display-notifications

Show Notifications

apputils:display-shortcuts

Show Keyboard Shortcuts

Ctrl Shift H

apputils:incr-font-size

Increase Font Size

apputils:load-statedb

Load state for the current workspace.

apputils:notify

Emit a notification

apputils:print

Print…

Ctrl P

apputils:reset

Reset Application State

apputils:reset-on-load

Reset state when loading for the workspace.

apputils:run-all-enabled

Run All Enabled Commands Passed as Args

apputils:run-first-enabled

Run First Enabled Command

apputils:theme-scrollbars

Theme Scrollbars

apputils:toggle-header

Show Header Above Content

apputils:update-notification

Update a notification

code-viewer:open

Open Code Viewer

completer:invoke-console

Display the completion helper.

Tab

completer:invoke-file

Display the completion helper.

Tab

completer:invoke-notebook

Display the completion helper.

Tab

completer:select-console

Select the completion suggestion.

Enter

completer:select-file

Select the completion suggestion.

Enter

completer:select-notebook

Select the completion suggestion.

Enter

console:change-kernel

Change Kernel…

console:clear

Clear Console Cells

console:close-and-shutdown

Close and Shut Down…

console:create

Console

console:get-kernel

Get Kernel

console:inject

Inject some code in a console.

console:interaction-mode

Set the console interaction mode.

console:interrupt-kernel

Interrupt Kernel

console:linebreak

Insert Line Break

Ctrl Enter

console:open

Open a console for the provided path.

console:replace-selection

Replace Selection in Console

console:restart-kernel

Restart Kernel…

console:run-forced

Run Cell (forced)

Shift Enter

console:run-unforced

Run Cell (unforced)

Enter

console:shutdown

Shut Down

console:toggle-autoclosing-brackets

Auto Close Brackets for Code Console Prompt

console:toggle-show-all-kernel-activity

Show All Kernel Activity

csv:go-to-line

Go to Line

debugger:continue

Pause

F9

debugger:copy-to-clipboard

Copy to Clipboard

debugger:copy-to-globals

Copy Variable to Globals

debugger:evaluate

Evaluate Code

debugger:inspect-variable

Inspect Variable

debugger:next

Next

F10

debugger:open-source

Open Source

debugger:pause-on-exceptions

Breakpoints on exception

debugger:render-mime-variable

Render Variable

debugger:restart-debug

Restart Kernel and Debug…

debugger:show-panel

Debugger Panel

Ctrl Shift E

debugger:stepIn

Step In

F11

debugger:stepOut

Step Out

Shift F11

debugger:terminate

Terminate

Shift F9

docmanager:clone

New View for

docmanager:delete

Delete

docmanager:delete-file

Delete

docmanager:download

Download

docmanager:duplicate

Duplicate

docmanager:new-untitled

New undefined

docmanager:open

Open the provided path.

docmanager:open-browser-tab

Open in New Browser Tab

docmanager:reload

Reload from Disk

docmanager:rename

Rename…

docmanager:restore-checkpoint

Revert to Checkpoint…

docmanager:save

Save

Ctrl S

docmanager:save-all

Save All

docmanager:save-as

Save As…

Ctrl Shift S

docmanager:show-in-file-browser

Show in File Browser

docmanager:toggle-autosave

Autosave Documents

documentsearch:end

End Search

Escape

documentsearch:highlightNext

Find Next

Ctrl G

documentsearch:highlightPrevious

Find Previous

Ctrl Shift G

documentsearch:start

Find…

Ctrl F

documentsearch:startWithReplace

Find and Replace…

documentsearch:toggleSearchInSelection

Search in Selection

Alt L

editmenu:clear-all

Clear All

editmenu:clear-current

Clear

editmenu:go-to-line

Go to Line…

editmenu:open

Open Edit Menu

editmenu:redo

Redo

Ctrl Shift Z

editmenu:undo

Undo

Ctrl Z

extensionmanager:show-panel

Extension Manager

Ctrl Shift X

extensionmanager:toggle

Enable Extension Manager

filebrowser:activate

Open the file browser for the provided path.

filebrowser:copy

Copy

Ctrl C

filebrowser:copy-download-link

Copy Download Link

filebrowser:copy-path

Copy Path

filebrowser:create-new-directory

New Folder

filebrowser:create-new-file

New File

filebrowser:create-new-markdown-file

New Markdown File

filebrowser:cut

Cut

Ctrl X

filebrowser:delete

Delete

Delete

filebrowser:download

Download

filebrowser:duplicate

Duplicate

Ctrl D

filebrowser:go-to-path

Update the file browser to display the provided path.

filebrowser:go-up

go up

Backspace

filebrowser:hide-main

Hide the file browser.

filebrowser:open

Open

filebrowser:open-browser-tab

Open in New Browser Tab

filebrowser:open-path

Open from Path…

filebrowser:open-url

Open from URL…

filebrowser:paste

Paste

Ctrl V

filebrowser:refresh

Refresh File List

filebrowser:rename

Rename

F2

filebrowser:search

Search on File Names

filebrowser:share-main

Copy Shareable Link

filebrowser:shutdown

Shut Down Kernel

filebrowser:toggle-file-checkboxes

Show File Checkboxes

filebrowser:toggle-file-size

Show File Size Column

filebrowser:toggle-hidden-files

Show Hidden Files

filebrowser:toggle-last-modified

Show Last Modified Column

filebrowser:toggle-main

File Browser

Ctrl Shift F

filebrowser:toggle-navigate-to-current-directory

Show Active File in File Browser

filebrowser:toggle-show-full-path

Show Full Path

filebrowser:toggle-sort-notebooks-first

Sort Notebooks Above Files

fileeditor:change-font-size

Decrease Font Size

fileeditor:change-language

Change editor language.

fileeditor:change-tabs

Indent with Tab

fileeditor:change-theme

jupyter

fileeditor:copy

Copy

fileeditor:create-console

Create Console for Editor

fileeditor:create-new

Text File

fileeditor:create-new-markdown-file

Markdown File

fileeditor:cut

Cut

fileeditor:find

Find…

fileeditor:go-to-line

Go to Line…

fileeditor:markdown-preview

Show Markdown Preview

fileeditor:paste

Paste

fileeditor:redo

Redo

fileeditor:replace-selection

Replace Selection in Editor

fileeditor:restart-console

Restart Kernel

fileeditor:run-all

Run All Code

fileeditor:run-code

Run Selected Code

fileeditor:select-all

Select All

fileeditor:toggle-autoclosing-brackets

Auto Close Brackets in Text Editor

fileeditor:toggle-autoclosing-brackets-universal

Auto Close Brackets

fileeditor:toggle-current-line-numbers

Show Line Numbers

fileeditor:toggle-current-line-wrap

Wrap Words

fileeditor:toggle-current-match-brackets

Match Brackets

fileeditor:toggle-line-numbers

Show Line Numbers

fileeditor:toggle-line-wrap

Word Wrap

fileeditor:toggle-match-brackets

Match Brackets

fileeditor:undo

Undo

filemenu:close-and-cleanup

Close and Shut Down

Ctrl Shift Q

filemenu:create-console

New Console for Activity

filemenu:logout

Log Out

filemenu:open

Open File Menu

filemenu:shutdown

Shut Down

help:about

About JupyterLab

help:jupyter-forum

Jupyter Forum

help:license-report

Download All Licenses as Markdown

help:licenses

Licenses

help:licenses-refresh

Refresh Licenses

help:open

Open the provided url in a tab.

helpmenu:get-kernel

Get Kernel

helpmenu:open

Open Help Menu

htmlviewer:trust-html

Trust HTML File

imageviewer:flip-horizontal

Flip image horizontally

H

imageviewer:flip-vertical

Flip image vertically

V

imageviewer:invert-colors

Invert Colors

I

imageviewer:reset-image

Reset Image

0

imageviewer:rotate-clockwise

Rotate Clockwise

]

imageviewer:rotate-counterclockwise

Rotate Counterclockwise

[

imageviewer:zoom-in

Zoom In

=

imageviewer:zoom-out

Zoom Out

-

inline-completer:accept

Accept Inline Completion

Alt End

inline-completer:invoke

Invoke Inline Completer

Alt </kbd>

inline-completer:next

Next Inline Completion

Alt ]

inline-completer:previous

Previous Inline Completion

Alt [

inspector:close

Hide Contextual Help

Ctrl I

inspector:open

Show Contextual Help

Ctrl I

inspector:toggle

Show Contextual Help

jupyterlab-translation:en

English

jupyterlab-translation:zh_CN

Chinese (Simplified, China) - 中文 (简体, 中国)

kernelmenu:change

Change Kernel…

kernelmenu:interrupt

Interrupt Kernel

I, I

kernelmenu:open

Open Kernel Menu

kernelmenu:reconnect-to-kernel

Reconnect to Kernel

kernelmenu:restart

Restart Kernel…

0, 0

kernelmenu:restart-and-clear

Restart Kernel and Clear…

kernelmenu:shutdown

Shut Down Kernel

kernelmenu:shutdownAll

Shut Down All Kernels…

launcher:create

New Launcher

Ctrl Shift L

logconsole:add-checkpoint

Add Checkpoint

logconsole:clear

Clear Log

logconsole:open

Show Log Console

logconsole:set-level

Set log level to level.

mainmenu:open-first

Open First Menu

markdownviewer:edit

Show Markdown Editor

markdownviewer:open

Markdown Preview

mathjax:clipboard

MathJax Copy Latex

mathjax:scale

Mathjax Scale Reset

mermaid:copy-source

Mermaid Copy Diagram Source

notebook:access-next-history-entry

Access Next Kernel History Entry

Alt ArrowDown

notebook:access-previous-history-entry

Access Previous Kernel History Entry

Alt ArrowUp

notebook:change-cell-to-code

Change to Code Cell Type

Y

notebook:change-cell-to-heading-1

Change to Heading 1

1

notebook:change-cell-to-heading-2

Change to Heading 2

2

notebook:change-cell-to-heading-3

Change to Heading 3

3

notebook:change-cell-to-heading-4

Change to Heading 4

4

notebook:change-cell-to-heading-5

Change to Heading 5

5

notebook:change-cell-to-heading-6

Change to Heading 6

6

notebook:change-cell-to-markdown

Change to Markdown Cell Type

M

notebook:change-cell-to-raw

Change to Raw Cell Type

R

notebook:change-kernel

Change Kernel…

notebook:clear-all-cell-outputs

Clear Outputs of All Cells

notebook:clear-cell-output

Clear Cell Output

notebook:close-and-shutdown

Close and Shut Down Notebook

notebook:collapse-all-headings

Collapse All Headings

Ctrl Shift ArrowLeft

notebook:copy-cell

Copy Cell

C

notebook:copy-to-clipboard

Copy Output to Clipboard

notebook:create-console

New Console for Notebook

notebook:create-new

Notebook

notebook:create-output-view

Create New View for Cell Output

notebook:cut-cell

Cut Cell

X

notebook:delete-cell

Delete Cell

D, D

notebook:deselect-all

Deselect All Cells

notebook:disable-output-scrolling

Disable Scrolling for Outputs

notebook:duplicate-below

Duplicate Cell Below

notebook:enable-output-scrolling

Enable Scrolling for Outputs

notebook:enter-command-mode

Enter Command Mode

Escape

notebook:enter-edit-mode

Enter Edit Mode

Enter

notebook:expand-all-headings

Expand All Headings

Ctrl Shift ArrowRight

notebook:export-to-format

Save and Export Notebook to the given format.

notebook:extend-marked-cells-above

Extend Selection Above

Shift ArrowUp

notebook:extend-marked-cells-below

Extend Selection Below

Shift ArrowDown

notebook:extend-marked-cells-bottom

Extend Selection to Bottom

Shift End

notebook:extend-marked-cells-top

Extend Selection to Top

Shift Home

notebook:get-kernel

Get Kernel

notebook:hide-all-cell-code

Collapse All Code

notebook:hide-all-cell-outputs

Collapse All Outputs

notebook:hide-cell-code

Collapse Selected Code

notebook:hide-cell-outputs

Collapse Selected Outputs

notebook:insert-cell-above

Insert Cell Above

A

notebook:insert-cell-below

Insert Cell Below

B

notebook:insert-heading-above

Insert Heading Above Current Heading

Shift A

notebook:insert-heading-below

Insert Heading Below Current Heading

Shift B

notebook:interrupt-kernel

Interrupt Kernel

notebook:merge-cell-above

Merge Cell Above

Ctrl Backspace

notebook:merge-cell-below

Merge Cell Below

Ctrl Shift M

notebook:merge-cells

Merge Selected Cells

Shift M

notebook:move-cell-down

Move Cell Down

Ctrl Shift ArrowDown

notebook:move-cell-up

Move Cell Up

Ctrl Shift ArrowUp

notebook:move-cursor-down

Select Cell Below

ArrowDown

notebook:move-cursor-heading-above-or-collapse

Select Heading Above or Collapse Heading

ArrowLeft

notebook:move-cursor-heading-below-or-expand

Select Heading Below or Expand Heading

ArrowRight

notebook:move-cursor-up

Select Cell Above

ArrowUp

notebook:paste-and-replace-cell

Paste Cell and Replace

notebook:paste-cell-above

Paste Cell Above

notebook:paste-cell-below

Paste Cell Below

V

notebook:reconnect-to-kernel

Reconnect to Kernel

notebook:redo

Redo

notebook:redo-cell-action

Redo Cell Operation

Shift Z

notebook:render-all-markdown

Render All Markdown Cells

notebook:replace-selection

Replace Selection in Notebook Cell

notebook:restart-and-run-to-selected

Restart Kernel and Run up to Selected Cell…

notebook:restart-clear-output

Restart Kernel and Clear Outputs of All Cells…

notebook:restart-kernel

Restart Kernel…

notebook:restart-run-all

Restart Kernel and Run All Cells…

notebook:run-all-above

Run All Above Selected Cell

notebook:run-all-below

Run Selected Cell and All Below

notebook:run-all-cells

Run All Cells

notebook:run-cell

Run Selected Cell and Do not Advance

Ctrl Enter

notebook:run-cell-and-insert-below

Run Selected Cell and Insert Below

Alt Enter

notebook:run-cell-and-select-next

Run Selected Cell

Shift Enter

notebook:run-in-console

Run Selected Text or Current Line in Console

notebook:select-all

Select All Cells

Ctrl A

notebook:select-last-run-cell

Select current running or last run cell

notebook:set-side-by-side-ratio

Set side-by-side ratio

notebook:show-all-cell-code

Expand All Code

notebook:show-all-cell-outputs

Expand All Outputs

notebook:show-cell-code

Expand Selected Code

notebook:show-cell-outputs

Expand Selected Outputs

notebook:shutdown-kernel

Shut Down Kernel

notebook:split-cell-at-cursor

Split Cell

Ctrl Shift -

notebook:toggle-all-cell-line-numbers

Show Line Numbers

notebook:toggle-autoclosing-brackets

Auto Close Brackets for All Notebook Cell Types

notebook:toggle-heading-collapse

Toggle Collapse Notebook Heading

notebook:toggle-render-side-by-side-current

Render Side-by-Side

Shift R

notebook:toggle-virtual-scrollbar

Virtual Scrollbar

notebook:trust

Trust Notebook

notebook:undo

Undo

notebook:undo-cell-action

Undo Cell Operation

Z

pluginmanager:open

Advanced Plugin Manager

pluginmanager:refresh

Refresh Plugin List

property-inspector:show-panel

Property Inspector

Ctrl Shift U

rendermime:handle-local-link

Handle Local Link

runmenu:open

Open Run Menu

runmenu:restart-and-run-all

Restart Kernel and Run All

runmenu:run

Run Selected

Shift Enter

runmenu:run-all

Run All

running:kernel-new-console

New Console for Kernel

running:kernel-new-notebook

New Notebook for Kernel

running:kernel-open-session

Unknown Session

running:kernel-shut-down

Shut Down Kernel

running:show-panel

Sessions and Tabs

Ctrl Shift B

settingeditor:open

Settings Editor

Ctrl ,

settingeditor:open-json

Advanced Settings Editor

settingeditor:revert

Revert User Settings

settingeditor:save

Save User Settings

Ctrl S

settingsmenu:open

Open Settings Menu

sidebar:switch

Switch Sidebar Side

statusbar:toggle

Show Status Bar

tabsmenu:activate-by-id

Activate a widget by its id.

tabsmenu:activate-previously-used-tab

Activate Previously Used Tab

Ctrl Shift ‘

tabsmenu:open

Open Tabs Menu

terminal:copy

Copy

terminal:create-new

Terminal

terminal:decrease-font

Decrease Terminal Font Size

terminal:increase-font

Increase Terminal Font Size

terminal:open

Open a terminal by its name.

terminal:paste

Paste

terminal:refresh

Refresh Terminal

terminal:set-theme

Set terminal theme to the provided theme.

terminal:shut-down

Shutdown Terminal

toc:display-h1-numbering

Show first-level heading number

toc:display-numbering

Show heading number in the document

toc:display-outputs-numbering

Show output headings

toc:run-cells

Select and Run Cell(s) for this Heading

toc:show-panel

Table of Contents

Ctrl Shift K

toc:toggle-collapse

Collapse All Headings

tooltip:dismiss

Dismiss the tooltip

Escape

tooltip:launch-console

Open the tooltip

Shift Tab

tooltip:launch-file

Open the tooltip

Shift Tab

tooltip:launch-notebook

Open the tooltip

Shift Tab

tsv:go-to-line

Go to Line

viewmenu:line-numbering

Show Line Numbers

Shift L

viewmenu:match-brackets

Match Brackets

viewmenu:open

Open View Menu

viewmenu:word-wrap

Wrap Words

workspace-ui:save

Save Current Workspace

workspace-ui:save-as

Save Current Workspace As…