Terminal Mentions
The terminal mention lets you bring your terminal output directly into your conversation with Cline. Just type @terminal
and Cline can see the recent output from your terminal.
When you type @
in chat, select “Terminal” from the menu or just type @terminal
directly. Cline will immediately see the recent output from your active terminal, including error messages, build logs, or command results.
I use the terminal mention all the time when I’m dealing with build errors, test failures, or debugging output. Instead of trying to copy and paste terminal output (which often loses formatting), I just ask:
This gives Cline the complete terminal output with all its formatting intact. Cline can then analyze the error messages, stack traces, and surrounding context to provide more accurate help.
The terminal mention is especially powerful when combined with file mentions. When I’m debugging a failed API call, I’ll reference both:
This approach gives Cline everything it needs - the exact error output, the client code, and the server implementation - all without me having to copy anything manually.
Next time you’re running into issues with command output or build errors, try using @terminal
instead of copying the output. You’ll get more accurate help because Cline can see the complete terminal context with proper formatting.
How It Works Under the Hood
When you use the terminal mention in your message, here’s what happens behind the scenes:
-
When you send your message, Cline detects the
@terminal
pattern in your text -
The extension calls
getLatestTerminalOutput()
which accesses VSCode’s terminal API -
It captures the recent output buffer from your active terminal
-
The terminal output is appended to your message in a structured format:
-
This enhanced message with the embedded terminal output is sent to the AI
-
The AI can now “see” the complete terminal output with all formatting preserved
This process happens automatically whenever you use the terminal mention, giving the AI access to your command results, error messages, and other terminal output without you having to copy it manually.