---
title: "Commands & Flags"
description: "Complete reference for command arguments, subcommands, and interactive slash commands"
icon: "terminal"
---

## Usage

```bash
devin [OPTIONS] [prompt]
```

Pass an optional prompt to start a session with an initial message, or launch interactively with no arguments.

---

## Global Flags

| Flag | Short | Description |
|------|-------|-------------|
| `--model <MODEL>` | | Set the AI model for this session |
| `--permission-mode <MODE>` | | Permission mode (`normal`, `dangerous`, `bypass`) |
| `--continue` | `-c` | Resume the most recent session in the current directory |
| `--resume <SESSION_ID>` | `-r` | Resume a specific session by ID |
| `--print` | `-p` | Print response and exit (non-interactive mode) |
| `--prompt-file <FILE>` | | Load the initial prompt from a file |
| `--config <PATH>` | | Configuration file path |
| `--respect-workspace-trust` | | Whether to respect workspace trust settings |

**Examples:**

```bash
devin -- add a login page
devin --model opus -- refactor the auth module
devin -c                              # Resume last session
devin -r abc12345                     # Resume specific session
devin -p -- "list all TODO comments"  # Print response and exit
```

---

## Subcommands

### devin auth

Manage authentication.

| Command | Description |
|---------|-------------|
| `devin auth login` | Log in to your account |
| `devin auth logout` | Log out and remove stored credentials |
| `devin auth status` | Check authentication status |

**Options for `devin auth login`:**
- `--force-manual-token-flow` — Skip browser-based auth and manually paste a token (useful for remote/SSH sessions)

### devin mcp

Manage MCP (Model Context Protocol) servers.

| Command | Description |
|---------|-------------|
| `devin mcp add <name>` | Add a new MCP server |
| `devin mcp list` | List all configured MCP servers |
| `devin mcp get <name>` | Show details for a specific MCP server |
| `devin mcp remove <name>` | Remove a configured MCP server |
| `devin mcp login <name>` | Authenticate with an MCP server via OAuth |
| `devin mcp logout <name>` | Remove stored OAuth credentials for an MCP server |

**Options for `devin mcp add`:**
- `--transport <stdio|sse|http>` — Transport type (required)
- `--scope <project|user>` — Configuration scope (default: `user`)
- `--url <URL>` — URL for HTTP/SSE transports
- `--command <CMD>` — Command for stdio transport
- `--env <KEY=VALUE>` — Environment variables (repeatable)
- `--header <HEADER: VALUE>` — HTTP headers (repeatable)
- `--scopes <SCOPE,SCOPE>` — OAuth scopes to request (comma-separated)
- `-- [ARGS...]` — Arguments for stdio command (pass after `--` at the end)

**Options for `devin mcp remove`:**
- `--scope <project|user>` — Configuration scope (default: `user`)

**Options for `devin mcp login`:**
- `--scopes <SCOPE,SCOPE>` — OAuth scopes to request (comma-separated)

See [MCP Configuration](/extensibility/mcp/configuration) for details.

### devin rules

Manage agent rules.

| Command | Description |
|---------|-------------|
| `devin rules list` | List all available rules |
| `devin rules show <name>` | Show details for a specific rule |
| `devin rules paths` | Show rule directory locations |

**Options for `devin rules list`:**
- `--provider <cursor\|windsurf>` — Filter by rule provider

See [Rules](/extensibility/rules) for details.

### devin skills

Manage skills.

| Command | Description |
|---------|-------------|
| `devin skills list` | List all available skills |
| `devin skills show <name>` | Show details for a specific skill |
| `devin skills paths` | Show skill directory locations |

**Options for `devin skills list`:**
- `--trigger <user\|model>` — Filter by trigger type

See [Skills](/extensibility/skills/overview) for details.

### devin list

List sessions in the current directory. Alias: `devin ls`

| Command | Description |
|---------|-------------|
| `devin list` | Interactive session picker (default) |
| `devin list --format json` | Output sessions as JSON |
| `devin list --format csv` | Output sessions as CSV |

### devin version

Print the current version and exit.

```bash
devin version
```

This is equivalent to `devin --version`.

### devin update

Check for updates and optionally install them.

```bash
devin update
```

### devin setup

Interactive setup wizard for authentication and MCP configuration.

```bash
devin setup
devin setup --force-manual-token-flow  # For remote/SSH sessions
```

### devin uninstall

Uninstall Devin for Terminal and optionally remove all data.

| Option | Description |
|--------|-------------|
| `--clean` | Remove all data including configuration, history, and custom data |
| `--force` | Skip confirmation prompt |

---

## Slash Commands

These commands are available inside an interactive session. Type them at the prompt.

### Mode & Model

| Command | Description |
|---------|-------------|
| `/mode [normal\|accept-edits\|plan\|bypass]` | Show or switch the current mode |
| `/normal` | Switch to Normal mode (default) |
| `/accept-edits` | Switch to Accept Edits mode (auto-approve file edits in workspace) |
| `/plan` | Switch to Plan mode (read-only planning) |
| `/ask <question>` | Ask a question without making code changes (oneshot) |
| `/bypass` | Switch to Bypass mode (auto-approve all actions) |
| `/model [name]` | Show or change the current model |
| `/theme` | Switch between themes (dark, light, 16-color, no-color) |

<Note>
`/bypass` has aliases `/yolo` and `/dangerous`. All three do the same thing.
</Note>

### Session Management

| Command | Description |
|---------|-------------|
| `/clear` | Clear conversation history and start a new session |
| `/continue [session-id]` | Resume a previous session |
| `/fork` | Fork the current session to a new session ID |
| `/ls [--all]` | List recent sessions (current directory only by default). Alias: `/list-sessions` |
| `/rm-session <session-id>` | Irreversibly delete a session and all its data |
| `/exit` | Exit the application (alias: `/quit`). You can also type `exit` or `quit` without the `/` prefix. |

### Workspace

| Command | Description |
|---------|-------------|
| `/workspace` | List workspace directories (alias: `/workspaces`) |
| `/add-dir <path>` | Add an 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 |

### Extensibility

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

### Utilities

| Command | Description |
|---------|-------------|
| `/help` | Show available slash commands |
| `/bug [description]` | Submit a bug report |
| `/update` | Check for and install updates |
| `/upgrade` | Upgrade your subscription plan |
| `/login` | Authenticate with your account |
| `/logout` | Clear stored credentials and exit |
| `/context` | Show context window usage |
| `/compact` | Force conversation compaction |

---

## Modes

Modes control the agent's autonomy level by combining a permission mode with an agent profile.

<Tabs>
  <Tab title="Normal (default)">
    Full autonomy for complex coding tasks. The agent can read, write, and execute commands with normal permission checks.

    - **Permission mode:** Normal
    - **Profile:** Normal
    - **Use for:** Multi-file refactoring, feature implementation, bug fixes
  </Tab>
  <Tab title="Plan">
    Planning only — the agent proposes changes without making them. Read-only tool access ensures no code is modified.

    - **Permission mode:** Normal
    - **Profile:** Plan (read-only tools)
    - **Use for:** Architecture design, understanding codebases, planning before implementation
  </Tab>
  <Tab title="Bypass">
    All permission prompts are auto-approved. The agent executes freely without asking for confirmation.

    - **Permission mode:** Dangerous
    - **Profile:** Normal
    - **Use for:** Trusted tasks where interruptions slow you down

    <Warning>
    Use Bypass mode only for tasks you fully trust. All tool calls (including destructive commands) are auto-approved.
    </Warning>
  </Tab>
</Tabs>

Cycle between modes with `/mode`, or switch directly with `/normal`, `/accept-edits`, `/plan`, or `/bypass`. Use `/ask <question>` as a oneshot command to ask questions without switching modes.

---

## Profiles

Profiles determine the agent's available tools and behavior. Profiles are automatically set when you switch modes.

| Profile | Description | Tool Access |
|---------|-------------|-------------|
| `normal` | Full coding assistant (used by Normal, Accept Edits, and Bypass modes) | All tools |
| `plan` | Structured planning workflow (used by Plan mode) | Read-only tools (grep, glob, read, todo, ask_user_question, exit_plan_mode) |
| `ask` | Question answering (used by the `/ask` command) | Read-only tools (grep, glob, read, todo, ask_user_question) |
