> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Terminal

> Use Devin Desktop's enhanced terminal with Command mode, agent integration, and allow, ask, and deny permission rules for agent-run commands.

# Command in the terminal

Use our [Command](https://docs.devin.ai/desktop/command/windsurf-overview.md) modality in the terminal (`Cmd/Ctrl+I`) to generate the proper CLI syntax from prompts in natural language.

![](https://mintcdn.com/cognitionai/hxeMffzXgF_RWx-U/desktop/assets/windsurf-terminal-command.png?fit=max\&auto=format\&n=hxeMffzXgF_RWx-U\&q=85\&s=3e67784716df176170b2bccf1e002839)

# Send terminal selection to the agent

Highlight a portion of the stack trace and press `Cmd/Ctrl+L` to send it to the agent panel, where you can reference this selection in your next prompt.

![](https://mintcdn.com/cognitionai/hxeMffzXgF_RWx-U/desktop/assets/windsurf-terminal-selection-mention.png?fit=max\&auto=format\&n=hxeMffzXgF_RWx-U\&q=85\&s=9b04fbc1dd2ea876ff784e2745f4dd8a)

# @-mention your terminal

Chat with the agent about your active terminals.

<video autoPlay muted loop playsInline src="https://mintcdn.com/cognitionai/hxeMffzXgF_RWx-U/desktop/assets/terminal-at-mention.mp4?fit=max&auto=format&n=hxeMffzXgF_RWx-U&q=85&s=2e28c374b0c7c9a413ecc4accb50faa0" />

# Auto-executed agent commands

The agent can run terminal commands on its own. Your [permission rules](https://docs.devin.ai/desktop/devin-local/permissions.md) and the session [mode](https://docs.devin.ai/desktop/devin-local/modes.md) decide which commands run without asking and which prompt you first.

## Command permissions

Each command the agent wants to run is checked against your permission rules:

| Rule | Effect |
| - | - |
| **Deny** | The command is blocked. Deny rules have the highest priority. |
| **Ask** | The agent always asks before running the command. |
| **Allow** | The command runs without a prompt. |

A command that no rule covers follows the session mode. **Code** asks before running it, **Smart** lets a fast model auto-approve commands it judges safe, and **Bypass Permissions** runs it unless your organization's policy requires approval.

Configure your own rules in **Devin Local settings** under **Allow**, **Deny**, and **Ask**. Rules use the Devin CLI permission syntax, for example `Exec(git status)` or `Exec(npm run)`. See [permissions](https://docs.devin.ai/cli/reference/permissions.md#permission-syntax) for the full syntax, including path and URL scopes.

## Approving from the command card

When the agent asks for approval, the command card lets you run the command once, allow it for the rest of the session, or allow it permanently, which adds a rule to your settings. You can also edit the command before approving it. See [responding to permission requests](https://docs.devin.ai/desktop/devin-local/permissions.md#responding-to-permission-requests).

## Team-wide rules (Teams & Enterprise)

Administrators can set allow, ask, and deny rules for every member, enforce sandbox mode, and limit which modes members can select. Organization deny and ask rules take priority over a member's own rules and over Bypass Permissions. Devin Enterprise admins configure them in the Devin dashboard under **Settings → Enterprise → Devin Desktop**; Windsurf Enterprise admins use the [Devin CLI settings page](https://windsurf.com/team/cli-settings). See [terminal permissions](https://docs.devin.ai/cli/enterprise/team-settings.md#terminal-permissions) for the rule format.

# Dedicated terminal

Devin Desktop provides a dedicated terminal for the agent to use for running commands on macOS and Linux.
This dedicated terminal is separate from your default terminal and uses a fixed shell for each platform: `zsh` on macOS and `bash` on Linux.

![](https://mintcdn.com/cognitionai/WE51TvKjsiyk1ZHl/desktop/assets/windsurf/dedicated-terminal.png?fit=max\&auto=format\&n=WE51TvKjsiyk1ZHl\&q=85\&s=5950aff728dc78dcfb4d3f1304232496)

The dedicated terminal *will* use your configuration for that shell, so aliases and environment variables will be available from your shell configuration files (for example, `.zshrc` on macOS or `.bashrc` on Linux).

If your default terminal uses a different shell, and you want Devin Desktop to use shared environment variables, we recommend creating a shared configuration file that both shells can source.


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