What I Built
We’ve all been there. You open YouTube to watch a 10-minute tutorial on Docker or React, but the algorithm has other plans. You get hit by a "Short," then a trending trailer, and suddenly, two hours are gone. Your focus is shattered, and you never even watched the tutorial.
I built gh-focus to reclaim that lost time. It is a distraction-free YouTube client that lives entirely in your terminal.
The Problem:
The "Algorithmic Trap"
Standard YouTube is designed to keep you watching anything, not necessarily what you need. For developers, this is the ultimate productivity killer.
The Solution:
Intentional Learning
gh-focus turns YouTube into a curated "Focus Feed." It bypasses the homepage, the ads, the comments, and the recommendations.
let's see how it works
Cover Image

Hero Section / Home Page

All categories listed + Top learned content also adds up

Available categories listed

Select your category you want to learn, select the video and choose at action tab

Video launched correctly at MVP no ads, comments, distraction

Video added to github gist automatically

A beautifully formatted Markdown learning log, automatically updated on my GitHub Gist after every focus session.

New Channel added successfully

Removing any channel or category is easy and not prone to error

Want to use...
Visit on github repository follow the guide at Readme.md file and you can run it locally in your system too.
Quick Start
Install the extension:
gh extension install Pakeeza1508/gh-focus
Run it:
gh focus
Key Features include:
🧠 Curated Categories: Organize your learning into custom categories like Coding, DevOps, or Deep Work.
⚡ Zero-Distraction Playback: Videos launch in MPV, a lightweight, ad-free player. No sidebar, no comments, no rabbit holes.
🛠️ The "Hacker" Fetcher: A custom engine that uses RSS feeds and parallel scraping. No YouTube API keys required.
**🔄 GitHub Gist Sync: **Automatically sync your watch history to a public GitHub Gist to build a learning portfolio.
Why it matters to me?
As a developer, my most valuable asset is my Focus. I wanted to build a tool that treats YouTube as a library, not a casino. By integrating it with the GitHub CLI, I’ve turned "watching a video" into a professional "commit" to my personal growth.
Demo
Extension Repo link : https://github.com/Pakeeza1508/gh-focus
Watch the gh-focus walkthrough here
Youtube link: https://youtu.be/Sz9DY1g3fl8?si=mCjftMO_oQ4MSQu2
My Experience with GitHub Copilot CLI
Developing a terminal-based video manager came with some unique hurdles. GitHub Copilot CLI wasn't just a code generator; it was my Architect and Debugger
The URL Resolution Engine: YouTube URLs come in four different formats (handles, custom IDs, raw IDs, etc.). I described the complexity to Copilot, and it generated the robust Regex patterns that allow gh-focus to resolve any YouTube link instantly.
Concurrency at Scale: I wanted the feed to load instantly. Copilot helped me implement a Parallel ThreadPoolExecutor to fetch data from 20+ RSS feeds simultaneously. What would have been a 10-second wait now happens in less than one second.
Cross-Platform Shell Wrappers: Ensuring this worked as a native gh extension on Windows, Mac, and Linux was tricky. Copilot helped me write the .cmd and .sh wrappers that manage the Python virtual environment automatically for the user.
Without Copilot, I would have spent days on the "plumbing" of the app. Instead, I was able to focus on the User Experience and the Gist Integration.
When I Failed (And why I pivoted)
Initially, I planned to build this using the Official YouTube Data API. It seemed like the "right" way to do it. However, I quickly hit a major wall: The Quota System.
YouTube's API limits are extremely restrictive for a free tool. If a user has 20+ channels in their feed, the API quota would be exhausted in just a few refreshes. Furthermore, I didn't want users to have to go through the "hell" of creating a Google Cloud Project just to get an API key.
The Pivot:
I decided to go "Old School." I realized that every YouTube channel still provides an RSS feed.
The Problem: RSS feeds only show the last 15 videos and don't include all metadata.
The Solution: I used GitHub Copilot to help me build a "Hybrid Fetcher." It uses RSS feeds for speed and no-key access, and falls back to yt-dlp scraping for channels that have RSS disabled.
This pivot turned gh-focus into a "Zero-Config" tool. You install it, and it just works. No keys, no quotas, no barriers.
Contributors
@pz_khalid [https://github.com/Pakeeza1508]
@minhal-zubair [https://github.com/Minhal-Zubair]
@babar_khan_406006f06fa416 [https://github.com/babar0081]
Final Thoughts
This project started as a silly idea to stop my own doomscrolling, but it turned into a deep dive into terminal UI design and the GitHub CLI ecosystem. Using GitHub Copilot CLI felt like having a senior engineer sitting next to me—helping me bridge the gap between "I have an idea" and "I have a working tool."
In a world full of algorithms fighting for our attention, gh-focus is my way of taking that power back.
May your terminal be productive and your focus be sharp!
❤️ Special Thanks
A huge thank you to the organizers and moderators of the #githubchallenge for hosting such an inspiring event and fostering a creative space for developers to build.
Special shoutout to @ben (https://dev.to/ben), @jess (https://dev.to/jess), and @peter (https://dev.to/peter) for their work in making this challenge possible! 🚀
Top comments (0)