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
| Feature | Description | Benefit |
|---|---|---|
| Workspace awareness | Bob Shell sees your recent files and cursor position | More contextually relevant assistance |
| Native diff viewing | Review code changes in your editor's diff tool | Easier code review and modification |
| Command integration | Access Bob Shell features from editor commands | Streamlined workflow |
| Seamless file editing | Accept changes directly in your editor | Faster implementation of suggestions |
Currently, Bob IDE and compatible editors are supported. Additional editor support may be added in future releases.
Getting started
- Start Bob Shell from your Bob IDE terminal
- Accept the automatic integration prompt when it appears
- Use Bob Shell normally - it now has access to your workspace context
- 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:
Method 1: Automatic setup (recommended)
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:
- Install the Bob Shell Companion extension
- Configure the necessary connection settings
- 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 installThis command:
- Detects your current IDE
- Finds the appropriate extension
- Installs it automatically
- Provides setup instructions
Managing the connection
Connection commands
| Command | Purpose | Example |
|---|---|---|
/ide enable | Activate the IDE connection | /ide enable |
/ide disable | Deactivate the IDE connection | /ide disable |
/ide status | Check connection status and context | /ide status |
/ide install | Install the companion extension | /ide install |
Checking connection status
To verify your connection and see what context Bob Shell has access to:
/ide statusExample output:
🟢 Connected to Bob IDE
Recent files:
- src/components/Header.tsx
- src/utils/api.js
- package.jsonWorking 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:
| Method | Action |
|---|---|
| Editor UI | Click the ✓ checkmark in the diff editor's title bar |
| Keyboard | Press Cmd+S (macOS) or Ctrl+S (Windows/Linux) |
| Command Palette | Run Bob Shell: Accept Diff |
| Bob Shell CLI | Type yes when prompted |
Rejecting changes
To reject suggested changes:
| Method | Action |
|---|---|
| Editor UI | Click the ✗ icon in the diff editor's title bar |
| Keyboard | Close the diff editor tab |
| Command Palette | Run Bob Shell: Close Diff Editor |
| Bob Shell CLI | Type 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):
| Command | Function |
|---|---|
Bob Shell: Run | Start a new Bob Shell session in the terminal |
Bob Shell: Accept Diff | Accept changes in the active diff editor |
Bob Shell: Close Diff Editor | Reject changes and close the diff editor |
Bob Shell: View Third-Party Notices | Show 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-openprofile 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
| Issue | Possible Causes | Solution |
|---|---|---|
| Connection fails | Extension not installed or running | Install extension and run /ide enable |
| Directory mismatch | Bob Shell running outside workspace | cd to your workspace directory |
| Connection lost | Network issue or IDE restart | Run /ide enable to reconnect |
| No workspace open | Missing workspace in IDE | Open a folder/workspace in your IDE |
Error message reference
Connection errors
🔴 Disconnected: Failed to connect to IDE companion extension in [IDE Name]Solution:
- Verify the Bob Shell Companion extension is installed and enabled
- Open a new terminal in your IDE
- Run
/ide enable
🔴 Disconnected: IDE connection error. The connection was lost unexpectedlySolution:
- Run
/ide enableto reconnect - If the issue persists, restart your IDE
Configuration errors
🔴 Disconnected: Directory mismatchSolution:
- Navigate to the same directory that's open in your IDE
- Restart Bob Shell
🔴 Disconnected: To use this feature, please open a workspace folderSolution:
- Open a folder or workspace in your IDE
- Restart Bob Shell
General errors
IDE integration is not supported in your current environmentSolution: Run Bob Shell from within a supported IDE's integrated terminal
No installer is available for IDESolution: 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