<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Brandon Díaz</title>
    <description>The latest articles on Forem by Brandon Díaz (@bzaid94).</description>
    <link>https://forem.com/bzaid94</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3735498%2Fc90b9ca4-7bee-4774-add4-48896fb9ce20.png</url>
      <title>Forem: Brandon Díaz</title>
      <link>https://forem.com/bzaid94</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/bzaid94"/>
    <language>en</language>
    <item>
      <title>The Terminal Has Eyes: Meet Contextual Ghost, Your Proactive AI Agent</title>
      <dc:creator>Brandon Díaz</dc:creator>
      <pubDate>Thu, 29 Jan 2026 19:06:47 +0000</pubDate>
      <link>https://forem.com/bzaid94/the-terminal-has-eyes-meet-contextual-ghost-your-proactive-ai-agent-4pj</link>
      <guid>https://forem.com/bzaid94/the-terminal-has-eyes-meet-contextual-ghost-your-proactive-ai-agent-4pj</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/github-2026-01-21"&gt;GitHub Copilot CLI Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Contextual Ghost (CG)&lt;/strong&gt; is a CLI-based "survival agent" designed for developers and DevOps engineers who want to eliminate the tedious "Error -&amp;gt; Copy -&amp;gt; Search -&amp;gt; Fix" cycle. &lt;/p&gt;

&lt;p&gt;Ghost acts as a transparent wrapper for any terminal command. It stays quiet in the shadows while your commands succeed, but the moment a process fails (exit code != 0), it manifests instantly. It automatically harvests your current &lt;strong&gt;Git state (diffs and logs)&lt;/strong&gt;, &lt;strong&gt;environment variables&lt;/strong&gt;, and &lt;strong&gt;error logs&lt;/strong&gt;, then sends this rich context to &lt;strong&gt;GitHub Copilot CLI&lt;/strong&gt; to provide a surgically accurate explanation and a specific fix—all without you ever leaving the terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;The project is hosted on GitHub: &lt;a href="https://github.com/Bzaid94/contextual-ghost" rel="noopener noreferrer"&gt;Bzaid94/contextual-ghost&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How it looks in action:
&lt;/h3&gt;

&lt;p&gt;When a command fails, Ghost transforms your terminal into an interactive analysis hub:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Context Harvesting&lt;/strong&gt;: Ghost gathers recent changes and intent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Analysis&lt;/strong&gt;: Consults Copilot with full local context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elegant UI&lt;/strong&gt;: Displays the solution using a refined, fuchsia-themed interface powered by &lt;code&gt;bubbletea&lt;/code&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example of failure manifestation:&lt;/span&gt;
./contextual-ghost &lt;span class="nb"&gt;ls&lt;/span&gt; /nonexistent-directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  My Experience with GitHub Copilot CLI
&lt;/h2&gt;

&lt;p&gt;Building Contextual Ghost allowed me to see the &lt;strong&gt;GitHub Copilot CLI&lt;/strong&gt; not just as a tool, but as an &lt;strong&gt;API-first engine for developer productivity&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Integrating the CLI into a Go sub-process was seamless. By using the &lt;code&gt;gh copilot&lt;/code&gt; command as our "Brain," we were able to provide answers that are significantly more accurate than a standard AI prompt, because we feed it the &lt;em&gt;actual&lt;/em&gt; environment state (the "Context" in Contextual Ghost). &lt;/p&gt;

&lt;p&gt;The impact on development experience is massive: instead of guessing why a build failed, you have an agent that's already read your &lt;code&gt;git diff&lt;/code&gt; and figured it out for you. It turns every error into a learning moment.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Getting Started
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;You can install Contextual Ghost via Go:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;install &lt;/span&gt;github.com/Bzaid94/contextual-ghost@latest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Or download the pre-compiled binaries from the &lt;a href="https://github.com/Bzaid94/contextual-ghost/releases" rel="noopener noreferrer"&gt;Releases&lt;/a&gt; page.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;p&gt;Simply prefix any command with &lt;code&gt;ghost&lt;/code&gt; (alias for &lt;code&gt;contextual-ghost&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ghost npm run build
ghost go build ./...
ghost terraform apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the command succeeds: &lt;strong&gt;Silence.&lt;/strong&gt;&lt;br&gt;
If the command fails: &lt;strong&gt;Salvation.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ and 👻 by &lt;a href="https://dev.to/bzaid94"&gt;@Bzaid94&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>githubchallenge</category>
      <category>cli</category>
      <category>githubcopilot</category>
    </item>
  </channel>
</rss>
