> ## Documentation Index
> Fetch the complete documentation index at: https://sen-f208ff9e.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Snippets

> Save commands you run often and send them to a terminal session with one click.

Snippets is a built-in plugin. It stores reusable shell commands and runs them in the terminal you are working in. The plugin is off until you turn it on in **Plugins** (sidebar). While it is off, the **Snippets** sidebar item and the terminal panel button are hidden.

## The Snippets screen

Once the plugin is on, click **Snippets** in the sidebar under **Tools**. The list shows each snippet with its label, a tag, the command and an optional description. The first time the plugin loads, it adds a few examples such as **Disk usage** (`df -h`) and **Open ports** (`ss -tlnp`).

![Snippets screen listing Disk usage, Memory info, Running processes, Tail syslog, Network interfaces and Open ports with their commands and tags](https://mintcdn.com/sen-f208ff9e/KwGOqbG40_L2ILah/images/15-plugins/03-snippets-screen.png?fit=max\&auto=format\&n=KwGOqbG40_L2ILah\&q=85\&s=1b50d49c01d1f2197aa58c085292fca4)

The Snippets screen with the built-in examples.

Type in **Search snippets…** to filter the list.

### Add a snippet

**1. Open the form**

Click **NEW SNIPPET**.

**2. Fill in the fields**

Enter a **Label** and a **Command**. Both are required. **Description (optional)** and **Tag (optional)** are for your own organization. Snippets with the same tag are grouped together in the terminal panel.

**3. Save**

Click **Add Snippet**.

### Work with a snippet

Hover a snippet to show its buttons:

| Button | What it does |
| - | - |
| **Run in terminal** | Sends the command to the active session and presses Enter. |
| **Copy** | Copies the command to the clipboard. |
| **Delete** | Removes the snippet. |

If no SSH session is active, YourSSH shows a notice and sends nothing.

> [!NOTE]
>
> The Snippets screen can add and delete snippets but has no edit form. To change a snippet, delete it and add a new one.

## The terminal side panel

You don't have to leave the terminal to use snippets. In a connected session, click **Toggle Snippets Panel** in the terminal header. The panel opens beside the terminal without resizing the session.

![Terminal session with the Snippets side panel showing the system and logs groups, each snippet with Run and Copy buttons](https://mintcdn.com/sen-f208ff9e/KwGOqbG40_L2ILah/images/03-first-connect/17-snippets-panel.png?fit=max\&auto=format\&n=KwGOqbG40_L2ILah\&q=85\&s=02e6f0e891b8ea987a891434dd2ea396)

The Snippets panel beside a terminal. Snippets are grouped by tag.

* Use **Search snippets…** to filter.
* Click **Run** to type the command into the focused session and press Enter. The panel shows **No active SSH pane selected** when there is no running session to receive it.
* Click **Copy** to copy the command instead.
* Click the close button to hide the panel.

The panel works in SSH sessions and local terminals. It is hidden for RDP and VNC tabs.

> [!WARNING]
>
> **Run** executes the command immediately. Check what a snippet does before you run it on a production host.

## Snippets on mobile

The **Snippets** tab in the Android app lists the same kind of snippets. Chips at the top filter by tag, with **All** showing everything. Tap a snippet to run it in the active session. The header shows which host receives it, or **No active session**.

![Android Snippets tab with tag chips All, system and logs and three snippet cards](https://mintcdn.com/sen-f208ff9e/qEqMDfcJBQhRyoaC/images/M1-mobile/06-snippets.png?fit=max\&auto=format\&n=qEqMDfcJBQhRyoaC\&q=85\&s=87ac7009c170e2501bc3a1605cacc683)

The Snippets tab in the Android app.

See [Mobile](https://sen-f208ff9e.mintlify.site/user-guide/mobile.md) for the rest of the Android app.

## Related pages

> [card] [Terminal](https://sen-f208ff9e.mintlify.site/user-guide/terminal.md)
>
> Sessions, split view and the header.

> [card] [Bulk actions](https://sen-f208ff9e.mintlify.site/user-guide/bulk-actions.md)
>
> Run a command on many hosts at once.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.