> For the complete documentation index, see [llms.txt](/llms.txt).
> Markdown versions of each page are available by appending .md to any URL.

# Warp Drive Notebooks

Save interactive playbooks to simplify onboarding and development.

Notebooks are interactive, runnable documents in Warp Drive that combine markdown text with executable shell command blocks. Use them for onboarding playbooks, debugging runbooks, and development workflows that teammates can search, share, and execute directly from the terminal.

### What is a Notebook?

Notebooks are runnable documentation consisting of markdown text and list elements, code blocks, and runnable shell snippets that can be automatically executed in your terminal session. Notebooks are searchable and accessible through the [Command Palette](/terminal/command-palette/) so you can access and run your documentation without ever leaving the terminal. You can also export Notebooks in .md format at any time.

### How to save and edit notebooks

You can create a new notebook from various entry points in Warp

-   [macOS](#tab-panel-676)
-   [Windows](#tab-panel-677)
-   [Linux](#tab-panel-678)

-   From Warp Drive, + > New notebook
-   From the [Command Palette](/terminal/command-palette/), create a new team or personal notebook.

-   From Warp Drive, + > New notebook
-   From the [Command Palette](/terminal/command-palette/), create a new team or personal notebook.

-   From Warp Drive, + > New notebook
-   From the [Command Palette](/terminal/command-palette/), create a new team or personal notebook.

Any of these entry points will open the notebook editor where you can:

-   Title your notebook.
-   Start adding text and code elements.

Note

The notebook will not be saved until either title or body text is added.

![Editing a Notebook](/assets/terminal/notebooks_editor.gif)

Editing a Notebook.

### Working with Notebooks

#### Adding new elements

Notebook elements (text, code, list items) can be added in several ways:

-   Using the appropriate markdown shortcut (e.g. ### for Heading 3).
-   Typing /, which will open up a selection menu of supported elements.
-   Pressing the + icon which appears when hovering over a line and selecting from the menu of supported elements.

![Markdown element types](/_astro/markdown-element-types.CTLJx7pw_Zcgi1B.webp?dpl=dpl_4yvYLRn9vB89hSZqa48gsAPpRMKc)

Available Markdown element types in the Notebook editor.

#### Styling existing elements

Existing notebook elements can be styled in several ways:

-   Selecting an existing element and selecting text decorations (like bold, italics, or inline code) from the hover menu.
-   Using markdown syntax for text stylings like \*\*bold\*\* or \*italic\*.
-   Selecting an existing element and changing the overall type of the element via the dropdown element menu.

![Styling menu](/_astro/styling-menu.C8WyUNfM_Z1TEpp0.webp?dpl=dpl_4yvYLRn9vB89hSZqa48gsAPpRMKc)

#### Using command and code blocks

Command and code blocks have several unique properties such as syntax highlighting and quick actions that make working with code-based documentation simple. You can create a code or command block by either:

-   Selecting Command or Code from the new element menu
-   Typing ` ``` ` (triple backticks)

Once you’ve inserted your code block you can select the language at the bottom of the block from numerous options which will apply the appropriate syntax highlighting if available (or default to Code if your language is not found). All code and command blocks will apply syntax highlighting and provide a quick copy button for easy access.

![Example code block](/_astro/notebook-code-block.BzAcc2Oq_Vvxqk.webp?dpl=dpl_4yvYLRn9vB89hSZqa48gsAPpRMKc)

A code block with syntax highlighting in a Notebook.

#### Special properties of command blocks

If you insert a Command block or specify the language as “Shell”, Warp provides extra functionality to simplify terminal work.

#### Executing command blocks

Developers can execute shell command blocks by:

-   [macOS](#tab-panel-679)
-   [Windows](#tab-panel-680)
-   [Linux](#tab-panel-681)

-   Using the insert button at the bottom of the block
-   Pressing `CMD-ENTER` while the block is selected (a blue highlight will appear)

-   Using the insert button at the bottom of the block
-   Pressing `CTRL-ENTER` while the block is selected (a blue highlight will appear)

-   Using the insert button at the bottom of the block
-   Pressing `CTRL-ENTER` while the block is selected (a blue highlight will appear)

The command text will be inserted into the developer’s active terminal session, or a new session if none are active.

![Run option for command block](/_astro/notebook-cmd-block-run.C-jOs0Zk_ZNOywX.webp?dpl=dpl_4yvYLRn9vB89hSZqa48gsAPpRMKc)

The run button on a command block in a Notebook.

#### Adding arguments to command blocks

Command blocks accept parameters in the same format as [Workflows](/knowledge-and-collaboration/warp-drive/workflows/). To add an argument to your command block, use `{{double_curly_brackets}}` to specify your argument term.

![Command block with parameters](/_astro/notebook-cmd-with-params.C4qN63Ng_Zdbua9.webp?dpl=dpl_4yvYLRn9vB89hSZqa48gsAPpRMKc)

A command block with editable parameters.

#### Navigating command blocks with the keyboard

Command Blocks also support keyboard navigation. There are two ways to enter the keyboard navigation mode:

-   [macOS](#tab-panel-682)
-   [Windows](#tab-panel-683)
-   [Linux](#tab-panel-684)

-   Clicking on a shell block.
-   Pressing `CMD-UP` or `CMD-DOWN.`

Once a command block is selected, press `CMD-ENTER` to insert it into the terminal input. You can also use `UP, DOWN, CMD-UP`, and `CMD-DOWN` to navigate between command blocks. While the Notebook is focused, press `CMD-L` to switch focus back to the terminal without inserting a command.

-   Clicking on a shell block.
-   Pressing `CTRL-UP` or `CTRL-DOWN.`

Once a command block is selected, press `CTRL-ENTER` to insert it into the terminal input. You can also use `UP, DOWN, CTRL-UP,` and `CTRL-DOWN` to navigate between command blocks. While the Notebook is focused, press `CTRL-L` to switch focus back to the terminal without inserting a command.

-   Clicking on a shell block.
-   Pressing `CTRL-UP` or `CTRL-DOWN.`

Once a command block is selected, press `CTRL-ENTER` to insert it into the terminal input. You can also use `UP, DOWN, CTRL-UP,` and `CTRL-DOWN` to navigate between command blocks. While the Notebook is focused, press `CTRL-L` to switch focus back to the terminal without inserting a command.

#### Adding existing Workflows to notebooks

If you have existing [Workflows](/knowledge-and-collaboration/warp-drive/workflows/) that you’d like to insert into your notebook rather than duplicating their content, you can select Embedded Workflow from the new element menu and select from the available Workflows. Once embedded in a notebook, the workflow will be executable like a regular command block. To edit the content of the embedded workflow, you will need to edit the source workflow which can be found by searching for the title in the [Command Palette](/terminal/command-palette/).

![Embedding an existing workflow in a notebook.](/_astro/embedding-a-workflow.CIgUXFwn_1C2gaq.webp?dpl=dpl_4yvYLRn9vB89hSZqa48gsAPpRMKc)

Embedding an existing workflow in a notebook.

### Working with Notebooks in a team

If the notebook is shared with a team, all team members will have access to edit the notebook and updates will sync immediately for all members of the team.

Note

Only one editor is allowed at a given time. Opening the notebook while there is an active editor will open the notebook in Viewing mode. Your mode (view vs edit) can be toggled above the notebook’s title.

![View mode example](/_astro/notebook-view-mode.Bguvl8rp_ZOI8y8.webp?dpl=dpl_4yvYLRn9vB89hSZqa48gsAPpRMKc)

A Notebook displayed in view mode.

### Import and export notebooks in Warp Drive

Please see our [Warp Drive Import and Export](/knowledge-and-collaboration/warp-drive/#import-and-export) instructions.
