Integrating with Bob IDE

Connect Bob Shell directly to your code editor for a seamless development experience. This integration enhances Bob Shell's capabilities by providing real-time workspace awareness and enabling powerful features like in-editor diff viewing.

Overview

FeatureDescriptionBenefit
Workspace awarenessBob Shell sees your recent files and cursor positionMore contextually relevant assistance
Native diff viewingReview code changes in your editor's diff toolEasier code review and modification
Command integrationAccess Bob Shell features from editor commandsStreamlined workflow
Seamless file editingAccept changes directly in your editorFaster implementation of suggestions

Currently, Bob IDE and compatible editors are supported. Additional editor support may be added in future releases.

Getting started

  1. Start Bob Shell from your Bob IDE terminal
  2. Accept the automatic integration prompt when it appears
  3. Use Bob Shell normally - it now has access to your workspace context
  4. When Bob Shell suggests code changes, they'll appear in Bob IDE's diff viewer

Benefits of IDE integration

Enhanced context awareness

Without IDE integration, Bob Shell only knows about files you explicitly reference. With integration enabled, Bob Shell automatically gains:

  • Access to your 10 most recently accessed files
  • Knowledge of your current cursor position
  • Visibility of your selected text (up to 16KB)

This contextual awareness allows Bob Shell to provide more relevant assistance without requiring you to manually reference files.

Seamless code modifications

When Bob Shell suggests code changes:

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│                 │     │                 │     │                 │
│  Bob Shell       │────▶│  Bob IDE        │────▶│  Your codebase  │
│  suggests       │     │  diff viewer    │     │  with changes   │
│  changes        │     │  shows changes  │     │  applied        │
│                 │     │                 │     │                 │
└─────────────────┘     └─────────────────┘     └─────────────────┘

This workflow allows you to:

  • Review changes in your familiar editor environment
  • Edit the suggested changes before accepting them
  • Accept or reject changes using standard editor commands
  • Keep your hands on the keyboard throughout the process

Installation methods

Choose the installation method that works best for you:

When you run Bob Shell inside Bob IDE's integrated terminal, it automatically detects the environment and offers to set up integration:

┌─────────────────────────────────────────────────────────────────────────────┐
│ > Do you want to connect Bob IDE to Bob Shell?                               │
│ If you select Yes, we'll install an extension that allows the CLI to ac ... │
│                                                                             │
│   1. Yes                                                                    │
|   2. No                                                                     │
|   3. No, don't ask again                                                    │
└─────────────────────────────────────────────────────────────────────────────┘

Selecting "Yes" will:

  1. Install the Bob Shell Companion extension
  2. Configure the necessary connection settings
  3. Establish the connection automatically

Method 2: Command-line installation

If you dismissed the automatic prompt or need to reinstall, use the built-in command:

/ide install

This command:

  • Detects your current IDE
  • Finds the appropriate extension
  • Installs it automatically
  • Provides setup instructions

Managing the connection

Connection commands

CommandPurposeExample
/ide enableActivate the IDE connection/ide enable
/ide disableDeactivate the IDE connection/ide disable
/ide statusCheck connection status and context/ide status
/ide installInstall the companion extension/ide install

Checking connection status

To verify your connection and see what context Bob Shell has access to:

/ide status

Example output:

🟢 Connected to Bob IDE
Recent files:
- src/components/Header.tsx
- src/utils/api.js
- package.json

Working with code changes

When Bob Shell suggests code modifications, you'll see them in your editor's diff viewer.

Accepting changes

You have multiple ways to accept suggested changes:

MethodAction
Editor UIClick the ✓ checkmark in the diff editor's title bar
KeyboardPress Cmd+S (macOS) or Ctrl+S (Windows/Linux)
Command PaletteRun Bob Shell: Accept Diff
Bob Shell CLIType yes when prompted

Rejecting changes

To reject suggested changes:

MethodAction
Editor UIClick the ✗ icon in the diff editor's title bar
KeyboardClose the diff editor tab
Command PaletteRun Bob Shell: Close Diff Editor
Bob Shell CLIType no when prompted

Modifying suggestions

You can edit the suggested code directly in the diff editor before accepting it. This allows you to:

  • Fix minor issues in the suggestion
  • Adapt the code to your specific needs
  • Add comments or additional logic
  • Ensure the changes match your coding style

For frequently repeated changes, select "Yes, allow always" in Bob Shell to auto-accept similar changes in the future.

Advanced usage

Bob IDE commands

Access Bob Shell features directly from Bob IDE's Command Palette (Cmd+Shift+P or Ctrl+Shift+P):

CommandFunction
Bob Shell: RunStart a new Bob Shell session in the terminal
Bob Shell: Accept DiffAccept changes in the active diff editor
Bob Shell: Close Diff EditorReject changes and close the diff editor
Bob Shell: View Third-Party NoticesShow third-party notices

Using with sandboxed environments

macOS sandboxing

When using Bob Shell with macOS Seatbelt sandboxing:

  • The IDE integration requires network access
  • Use a Seatbelt profile that allows network connections
  • The default permissive-open profile works with IDE integration

Docker containers

When running Bob Shell in a Docker container:

  • The integration can still connect to Bob IDE on your host machine
  • Bob Shell automatically finds the IDE server via host.docker.internal
  • Ensure your Docker networking allows container-to-host connections

Troubleshooting

Common issues and solutions

IssuePossible CausesSolution
Connection failsExtension not installed or runningInstall extension and run /ide enable
Directory mismatchBob Shell running outside workspacecd to your workspace directory
Connection lostNetwork issue or IDE restartRun /ide enable to reconnect
No workspace openMissing workspace in IDEOpen a folder/workspace in your IDE

Error message reference

Connection errors

🔴 Disconnected: Failed to connect to IDE companion extension in [IDE Name]

Solution:

  1. Verify the Bob Shell Companion extension is installed and enabled
  2. Open a new terminal in your IDE
  3. Run /ide enable
🔴 Disconnected: IDE connection error. The connection was lost unexpectedly

Solution:

  1. Run /ide enable to reconnect
  2. If the issue persists, restart your IDE

Configuration errors

🔴 Disconnected: Directory mismatch

Solution:

  1. Navigate to the same directory that's open in your IDE
  2. Restart Bob Shell
🔴 Disconnected: To use this feature, please open a workspace folder

Solution:

  1. Open a folder or workspace in your IDE
  2. Restart Bob Shell

General errors

IDE integration is not supported in your current environment

Solution: Run Bob Shell from within a supported IDE's integrated terminal

No installer is available for IDE

Solution: Install the Bob Shell Companion extension manually from your IDE's marketplace

Best practices

  • Start Bob Shell from your IDE's terminal for automatic integration
  • Keep your workspace focused on relevant files for better context
  • Review diffs carefully before accepting changes
  • Use keyboard shortcuts for faster workflow
  • Check connection status if Bob Shell seems to be missing context
How is this topic?