This is a submission for the GitHub Copilot CLI Challenge
What I Built
Stuck with an unknown repository at 2 AM?
Accidentally deleted production code and trying to figure out what it even did?
Inherited a codebase with zero documentation?
We’ve all been there.
I built gh-excavate — an AI-powered GitHub CLI extension designed for code archaeology.
It’s a terminal-native assistant that helps you understand not just what code does, but why it exists.
Instead of manually browsing commits, scanning files, and piecing together context, you run a single command and gh-excavate digs through the repository for you.
It can:
- Analyse a repository or folder to explain its purpose, architecture, and risks
- Trace the life of a file from creation to deletion
- Detect likely dead or forgotten code
- Help investigate “why does this exist?” moments
- Work on both local paths and remote GitHub repositories
The CLI handles the structure.
Git handles the history.
GitHub Copilot is the brain and soul of the operation, aka the reasoning engine.
Copilot synthesises context, interprets intent, and transforms raw code and git history into human-level explanations directly in the terminal.
gh-excavate doesn’t just read code.It interprets it.
Demo
Repository:
[gh-excavate](https://github.com/Anika-Jha/gh-excavate)
gh-excavate is a GitHub CLI extension. Once installed, it runs directly inside your terminal.
Installation
Verification
Commands
Example runs
My Experience with GitHub Copilot CLI
GitHub Copilot CLI fundamentally changed how I approached building this project.
Instead of relying on brittle heuristics and heavy parsing logic alone, I focused on designing meaningful prompts, extracting the right context from Git history, and structuring the CLI intelligently — while Copilot handled deeper reasoning.
Copilot became:
- The interpretation engine
- The architectural analyst
- The technical historian
- The context synthesiser
gh-excavate gathers the evidence — commit logs, file history, structural context. Copilot CLI connects the dots.
The most important realisation during development was this: the real problem isn’t accessing code — it’s understanding intent. Git tells you what changed. Copilot helps reason about why.
Working directly in the terminal with Copilot felt natural and developer-native. I could validate Git commands, reason about edge cases like file deletions, and refine workflows without leaving the CLI.
This project isn’t just about automation.
It’s about augmenting developer cognition.
Because when you're lost in a codebase, you don’t need autocomplete.
You need understanding.
Code ages. Context fades.
gh-excavate helps bring it back.
** When the git log gets cryptic, and production is on fire — excavate. Because “Who wrote this?” is not a strategy.**
**







Top comments (0)