This is a submission for the GitHub Copilot CLI Challenge
What I Built
Cupid-Commit is a custom GitHub Copilot CLI extension that acts as a "Couples Counselor for Code."
With Valentine's Day upon us, I wanted to build something fun but technically complex. I recently built a project called Codebase Cartographer to visually map out codebase dependencies, which got me thinking about how different repositories "communicate." What if we could use AI to figure out if two different tech stacks would make a good match?
I built a Node.js CLI tool that accepts any two remote GitHub repositories as arguments. It uses the GitHub CLI (gh repo view) to dynamically scrape their languages, descriptions, and popularity. It then feeds this "DNA" into a custom GitHub Copilot Agent (.agent.md) using programmatic mode.
The AI categorizes the repositories into archetypes (like The Romantic, The Stoic, or The Socialite), analyzes their tech-stack compatibility, and outputs a perfectly formatted Markdown file containing a Compatibility Report and a Love Letter from Repo A to Repo B.
Demo
GitHub Repository: https://github.com/dev-jash15/cupid-commit
My Experience with GitHub Copilot CLI
Working with the Copilot CLI ecosystem was an incredible learning experience, especially when pushing the boundaries of non-interactive automation.
1. Taming the Custom Agent (.agent.md): I learned that you can enforce incredibly strict personas using the .agent.md framework. By defining "Core Directives" and "Tone Constraints," I was able to force the LLM to completely abandon standard coding assistance and strictly act as a witty relationship counselor, outputting beautifully formatted markdown instead of raw JSON or code snippets.
2. Bypassing the Programmatic Sandbox: The biggest technical hurdle I faced was the CLI's security sandbox. I wanted to use programmatic mode (copilot -p) to fully automate the pipeline. However, in this mode, Copilot strictly restricts access to files outside the current working directory.
To solve this, I engineered a "Drop and Clean" strategy using Node.js. My orchestrator script:
- Fetches the remote repository data using
ghcommands. - Writes that data to a hidden
.temp-dna.jsonfile directly inside the user's current directory. - Copies my
.cupid.agent.mdfile into the same directory. - Executes the Copilot CLI using the
@fileoperator to read those local temp files. - Captures the output, strips the CLI telemetry, and automatically deletes the temporary files to leave the user's workspace perfectly clean.
This combination of standard Node orchestration and Copilot's @file context mapping allowed me to build a highly dynamic, multi-repo tool that feels completely native to the terminal.
Top comments (0)