Sypha AI Docs
FeaturesCommands and shortcuts

Terminal Integration

Sypha's terminal integration enables you to incorporate your terminal output directly into your conversations with Sypha. Rather than copying and pasting error messages or command results, you can transmit them to Sypha with a simple right-click in the terminal.

Terminal Integration

Right-Click Terminal Integration

When you're working in the VSCode terminal and encounter output you want to discuss with Sypha:

  1. Right-click within the terminal
  2. Select "Add to Sypha" from the context menu
  3. The terminal output is immediately transmitted to the Sypha chat panel

This is ideal for:

  • Debugging build errors
  • Comprehending test failures
  • Analyzing command output
  • Obtaining assistance with error messages

The right-click terminal integration is particularly beneficial when you're already working in the terminal and encounter an issue.

Rather than switching context to the Sypha chat panel and typing a description of the problem, you can transmit the terminal output directly to Sypha with just a couple of clicks.

Alternatively, you can utilize the @terminal mention to send the full terminal output to Sypha.

For information about using @terminal mentions in your chat messages, see the Terminal Mentions documentation.

How Terminal Integration Works

When you utilize the right-click terminal integration, Sypha:

  1. Captures the terminal output with all formatting preserved
  2. Includes the complete context, including command history and results
  3. Formats it appropriately for the AI to comprehend
  4. Enables the AI to see exactly what you're seeing

This provides Sypha the full context it requires to deliver accurate assistance with terminal-related issues.

Behind the Scenes

The terminal integration utilizes a clever technique to capture terminal output:

  1. When you trigger the integration, Sypha:

    • Temporarily saves your current clipboard content
    • Selects all terminal content (or uses your existing selection)
    • Copies it to the clipboard
    • Reads the clipboard to obtain the terminal content
    • Restores your original clipboard content
  2. The terminal content is then:

    • Formatted with proper syntax highlighting
    • Added to your message or sent as a new message
    • Enhanced with additional context when necessary

This approach ensures that all terminal output, including colors and formatting, is accurately captured without affecting your clipboard.

Tips for Effective Use

  • Use terminal integration for error messages: When you encounter an error in the terminal, transmitting it to Sypha often results in faster resolution than attempting to describe the error.

  • Select specific output when needed: By default, the integration captures all terminal content, but you can also select specific lines before right-clicking to focus on just the relevant output.

  • Combine terminal outputs with file mentions: After transmitting terminal output to Sypha, you can enhance your question by mentioning relevant files utilizing the @ mentions feature.

  • Contextualize build & test outputs with the terminal: Terminal integration is particularly beneficial for comprehending complex build errors or test failures that span multiple lines.

Next time you're staring at a cryptic error message in your terminal, try utilizing Sypha's terminal integration instead of copying and pasting. You'll obtain more accurate assistance because Sypha can see the complete terminal context with proper formatting.

Troubleshooting Terminal Issues

If you're experiencing issues with terminal integration, such as "Shell Integration Unavailable" or commands not displaying output, please refer to our comprehensive Terminal Integration Troubleshooting Guide.

The troubleshooting guide covers:

  • Common terminal integration issues and quick fixes
  • Platform-specific solutions for Windows, macOS, and Linux
  • Shell-specific configurations for zsh, bash, PowerShell, and more
  • Advanced debugging techniques
  • Terminal settings optimization

Quick Fix: Most terminal issues can be resolved by switching to bash in the Sypha settings and increasing the shell integration timeout to 10 seconds.

On this page