---
title: "Shell Integration"
description: "Hotkeys and shortcuts for an enhanced Devin CLI experience."
icon: "square-terminal"
---

<Note>Shell integration (Ctrl+G, command-not-found handler, comment syntax) is available on macOS, Linux, and WSL. Works with Bash, Zsh, and Fish. Windows users can run Devin for Terminal from Git Bash or PowerShell, but shell integration features are not yet supported on Windows.</Note>

With shell integration, you can hit `Ctrl+G` to instantly invoke Devin CLI. Devin also can see your recent shell history, helping it understand what you're trying to do.

## Setup

Shell integration is included by default in `devin setup`. This means that it's very likely that Shell Integration already works for you! If not, to set up manually:

```bash
devin shell setup
```

Then restart your terminal or `source ~/.bashrc` (or `~/.zshrc`).

---

## Features

### Ctrl+G Shortcut

Hit `Ctrl+G` anywhere in your shell to invoke Devin with your current command line prefilled as context.

```bash
$ git status   # type this, then hit Ctrl+G instead of Enter
# Devin opens with "git status" + your recent shell history
```

### Command-Not-Found Handler

Type any unknown command and Devin CLI takes over instead of showing "command not found".

```bash
$ fix the tests
# Devin CLI starts with "fix the tests" as the prompt
```

### Comment Syntax (Zsh only)

Start a line with `#`, type a message, and press Enter to pass it to Devin CLI.

```bash
$ # explain what this directory contains
# Devin opens with your comment as the prompt
```

---

## Configuration

In `~/.config/cognition/config.json`:

```json
// ~/.config/cognition/config.json
{
  "shell": {
    "integration_enabled": true,
    "keybinding_trigger": "C-g",
    "enable_command_not_found_handler": true,
    "enable_comments": true
  }
}
```
