---
title: "Essential Commands"
description: "If you remember nothing else..."
icon: "terminal"
---

## Starting Devin for Terminal

By default, sessions happen in a REPL, a graphical terminal interface where you can chat back and forth and observe Devin's actions.

```bash
devin                           # Start interactive REPL (no prompt)
devin -- your prompt here        # Start REPL with initial prompt
devin -p -- "prompt"            # Single-turn, no REPL: print response to stdout and exits
```

<Note>Use `--` before your prompt so it is interpreted as a prompt and not a subcommand.</Note>

<Tip>Single-turn mode (`-p`) is great for scripts and automations.</Tip>

<Note>
Type `@` in the prompt input to open autocomplete for local files/directories. Selecting one adds it as context for your message.
</Note>

<Tip>
You can paste images from your clipboard with **Ctrl+V**. Attached images appear in the input area and can be managed with **Left/Right** to navigate and **Backspace** to remove.
</Tip>

---

## Modes

Devin for Terminal supports 5 built-in modes: **Normal**, **Accept Edits**, **Plan**, **Bypass**, and **Autonomous**. You can also use `/ask` as a oneshot command to ask questions without switching modes.

<AccordionGroup>
  <Accordion title="Normal" icon="robot" defaultOpen>
    Auto-approves read-only tools, asks for permission for write/execute operations.

    ```bash
    /normal
    # or
    /mode normal
    ```

    This is the default mode.
  </Accordion>

  <Accordion title="Accept Edits" icon="check">
    Auto-approves file edits within the workspace while still prompting for shell commands and other actions.

    ```bash
    /accept-edits
    # or
    /mode accept-edits
    ```
  </Accordion>

  <Accordion title="Plan" icon="map">
    Planning-only mode. The agent excels at creating detailed, code-grounded implementation plans. It has access to all tools but doesn't make changes.

    ```bash
    /plan
    # or
    /mode plan
    ```
  </Accordion>

  <Accordion title="Bypass" icon="bolt">
    <Warning>Auto-approves **all** tool calls, including writes and shell commands.</Warning>

    ```bash
    /bypass
    # or
    /mode bypass
    ```

    You can also start in bypass mode:

    ```bash
    devin --permission-mode bypass
    ```

    Aliases: `/yolo`, `/dangerous`

    <Note>
    Bypass mode does **not** override organization-level permissions configured by your admin via [Team Settings](/enterprise/team-settings). Admin-enforced deny and ask rules remain active even in bypass mode.
    </Note>
  </Accordion>
</AccordionGroup>

## Session History

Your conversation history is saved so you can resume a session later.

```bash
devin -c              # Continue the most recent session in the current directory
devin --continue

devin -r              # Pick from recent sessions
devin --resume
```

---

## Slash Commands

You can use these commands while in an active session.

### Navigation & Control

| Command | Description |
|---------|-------------|
| `/help` | See all available commands |
| `/exit` or `/quit` | Exit the application |
| `/clear` | Clear conversation history (start fresh) |

<Tip>You can also type `exit` or `quit` as plain text (without the `/` prefix) to exit.</Tip>

### Mode Switching

| Command | Description |
|---------|-------------|
| `/mode` | Show current mode |
| `/mode <name>` | Switch mode (`normal`, `accept-edits`, `plan`, `bypass`) |
| `/normal` | Switch to Normal mode (default) |
| `/plan` | Switch to Plan mode |
| `/ask <question>` | Ask a question without making code changes (oneshot) |
| `/bypass` | Switch to Bypass mode (aliases: `/yolo`, `/dangerous`) |

### Model Switching

| Command | Description |
|---------|-------------|
| `/model` | Show model selector |
| `/model <name>` | Switch model (`swe`, `opus`, `sonnet`, `gpt`) |

### Session Management

| Command | Description |
|---------|-------------|
| `/ls` | List recent sessions in current directory (alias: `/list-sessions`) |
| `/ls --all` | List all sessions across all directories |
| `/continue` | Resume most recent session |
| `/continue <id>` | Resume session by ID |
| `/rm-session <id>` | Irreversibly delete a session by ID |

### Workspace

| Command | Description |
|---------|-------------|
| `/workspace` | List workspace directories (alias: `/workspaces`) |
| `/add-dir <path>` | Add additional workspace directory |
| `/undo-add-dir <path>` | Remove a workspace directory |

### Automation

| Command | Description |
|---------|-------------|
| `/loop <prompt>` | Run a prompt then auto-review the diff in a loop (requires clean git state to start) |

### Extensibility

| Command | Description |
|---------|-------------|
| `/hooks` | List all loaded hooks with their IDs, event types, and source paths |

### Account & System

| Command | Description |
|---------|-------------|
| `/login` | Authenticate with Windsurf |
| `/logout` | Clear stored credentials and exit |
| `/update` | Check for and install updates |
| `/upgrade` | Upgrade your subscription plan |
| `/bug` | Submit a bug report |
| `/compact` | Force conversation compaction |

---

## Key Shortcuts

Here are the most important keyboard shortcuts. See [Keyboard Shortcuts](/reference/keyboard-shortcuts) for the full reference.

| Shortcut | Description |
|----------|-------------|
| `Shift+Tab` | Cycle between modes (Normal, Accept Edits, Plan, Bypass, Autonomous) |
| `Ctrl+C` | Clear input text, or cancel the running agent |
| `Esc` | Cancel the running agent |
| `Shift+Enter` | Insert a newline (multi-line input) |
| `Ctrl+V` | Paste image from clipboard |
| `Ctrl+G` | Open external editor |
| `Ctrl+O` | Open full-screen thinking trace viewer |
| `@` | Mention files to add as context |

### Agent Question Shortcuts

When the agent asks a multi-choice question, these shortcuts are available:

| Shortcut | Description |
|----------|-------------|
| `Up` / `Down` | Move between options |
| `Space` | Toggle selection (multi-select questions) |
| `e` or `Shift+Enter` | Type a custom answer for the selected option |
| `Tab` / `Shift+Tab` | Navigate between questions (multi-question panels) |
| `?` | Ask the agent to help you decide |
| `Enter` | Submit your answer |
| `Esc` | Cancel typing / exit text editing |
