Combat doom scrolling. Stay focused. Lock in.
Leo's Last Hope is a VS Code extension designed to keep your attention on your screen during those critical moments when you're waiting for Copilot or Codex to generate code. Instead of reaching for your phone and losing focus, Leo's Last Hope serves you a personalized feed of curated articles on topics you care about—keeping your mind engaged and your focus intact.
demo1.mov
As a developer, those 1-2 minute wait times while Copilot generates code are productivity killers. The screen goes silent. Your brain gets restless. You reach for your phone. You doom scroll. By the time the code arrives, you've already mentally checked out. Getting back into flow state takes minutes.
The result? Fragmented focus, reduced productivity, and that nagging feeling that you're not truly "locked in."
Leo's Last Hope fills those idle moments with value in two ways:
Option 1: Stay Sharp with Articles
- Instant Feed Display – Press
Cmd+Shift+G(or trigger manually) to see a personalized feed - Smart Scraping – Automatically fetches articles from your configured websites and interests
- AI Summarization – Articles are summarized into digestible 3-4 paragraph reads
- Stay Locked In – Read relevant content without ever leaving VS Code
Option 2: Decompress with Games When you're stressed, tired, or mentally drained, shift gears and play our fun, self-developed CS mini-games. Learn computer science terms in a lighthearted way while your brain gets a break from code.
Instead of doom scrolling on your phone, you're:
- Reading industry news relevant to your interests OR playing a fun CS game
- Learning something new (whether technical articles or CS fundamentals) in under 2 minutes
- Staying mentally engaged and ready to tackle the next task
Configure your interests and favorite sources in VS Code settings. Leo's Last Hope learns what matters to you.
Press Cmd+Shift+G to scrape 4 new articles from your configured websites, summarize them with AI, and add them to your feed instantly.
Uses OpenAI's GPT-4o-mini to create intelligent, readable summaries of full articles—no fluff, just the essentials.
When stress and fatigue hit, play our custom-built mini-games to learn computer science terms in a fun, interactive way. Master CS concepts wrongly! while taking a mental break from coding.
Seamlessly toggle between reading mode (for focused learning) and game mode (for stress relief and fun).
- Choose your topics (e.g., "AI", "Startups", "Web Development")
- Select your sources (e.g., tldr.tech, Medium, Dev.to)
- Set preferences in VS Code settings
- Clone the repository:
git clone https://github.com/nictjh/lockINorOut.git
cd lockINorOut- Install dependencies:
npm install
cd game && npm install
cd ../serp-fetcher && npm install- Set up environment variables:
serp-fetcher/.env
DATABASE_URL="postgresql://user:password@localhost:5432/your_db"
EXA_API_KEY="your_exa_api_key"
game/.env
OPENAI_API_KEY="your_openai_api_key"
DATABASE_URL="postgresql://user:password@localhost:5432/your_db"
VITE_SCRAPING_API_URL="http://localhost:3000/api/scrape-and-summarize"
- Build and run the extension:
npm run compileTerminal 1: Database + Backend API
cd serp-fetcher
npm run build
npm run server # Starts on http://localhost:3000Terminal 2: Game/Feed Frontend
cd game
npm run dev # Starts on http://localhost:5173- Open VS Code Settings (
Cmd+,) - Search for "IdleMode"
- Configure:
- IdleMode: Interests – Topics you care about (e.g.,
["AI", "Startups", "Web Dev"]) - IdleMode: Websites – Sources to scrape (e.g.,
["tldr.tech", "medium.com", "dev.to"])
- IdleMode: Interests – Topics you care about (e.g.,
- Open the extension workspace:
File > Open Folder > Select attemptVSCExt - Press
F5to launch the VS Code extension host - The extension loads automatically
Option 1: Manual Trigger
Cmd+Shift+G → Scrape articles → View feed automatically
Option 2: Command Palette
Cmd+Shift+P → Search "IdleMode: Scrape and Update Feed" → Enter
VS Code Extension (Leo's Last Hope)
↓
├─ Reads configuration (interests, websites)
└─ Calls API endpoint on Cmd+Shift+G
↓
serp-fetcher Backend
├─ Exa API (search articles from websites)
├─ Fetch full content from article URLs
├─ OpenAI (summarize articles)
└─ PostgreSQL (store summarized articles)
↓
game Frontend (SvelteKit)
├─ Displays personalized feed
├─ Shows loading/error states
└─ Renders in VS Code webview panel
Extension (src/extension.ts)
- Registers commands
- Handles keyboard shortcuts (Cmd+Shift+G)
- Makes API calls to scrape-and-summarize endpoint
- Manages webview display and overlay
Backend API (serp-fetcher/src/server.ts)
POST /api/scrape-and-summarize– Scrape websites + summarize articlesGET /api/feed– Retrieve all summarized articles
Scraper (serp-fetcher/src/fetcher.ts)
- Phase 1: Fetch article links from websites using Exa API
- Phase 2: Fetch full article content from URLs
- Phase 3: Summarize content using OpenAI
Frontend (game/src/routes/+page.svelte)
- Fetches feed from backend
- Displays articles in card layout
- Expandable summaries with read more functionality
- Loading and error states
Database (serp-fetcher/prisma/schema.prisma)
SummarizedArticlemodel stores: title, summary, url, source, topic, timestamp
POST /api/scrape-and-summarize
Content-Type: application/json
{
"interests": ["AI", "Startups"],
"websites": ["tldr.tech"]
}Response:
{
"success": true,
"articlesCount": 4,
"articles": [
{
"id": "cuid...",
"title": "Article Title",
"summary": "3-4 paragraph summary...",
"url": "https://...",
"source": "tldr.tech",
"timestamp": "2026-01-18T..."
}
]
}GET /api/feedResponse:
{
"success": true,
"articles": [...],
"count": 4
}Edit VS Code settings to personalize Leo's Last Hope:
{
"idlemode.interests": ["AI", "Startups", "Web Development"],
"idlemode.websites": ["tldr.tech", "medium.com", "dev.to"]
}Note: Don't include https:// in website URLs. Just use tldr.tech, not https://tldr.tech.
| Shortcut | Action |
|---|---|
Cmd+Shift+G |
Scrape new articles and update feed |
Cmd+Shift+P + "IdleMode: Scrape and Update Feed" |
Alternative trigger |
- You're waiting for Copilot – Code generation is running
- Press Cmd+Shift+G – Leo's Last Hope springs into action
- Backend scrapes – Exa API searches your configured websites for articles matching your interests
- Content fetched – Full article text is retrieved from each URL
- AI summarizes – OpenAI creates concise 3-4 paragraph summaries
- Feed displays – Articles appear in your VS Code webview instantly
- You read – Stay engaged, maintain focus, learn something useful
- Code arrives – You're ready to dive back in with fresh context
- You're overwhelmed – Deadlines, complex debugging, mental fatigue
- Open the game – Switch to game mode for a mental reset
- Learn CS concepts – Play engaging games about CS terms and fundamentals
- Decompress – Have fun while reinforcing your knowledge
- Return refreshed – Get back to work with renewed mental clarity
- Frontend: SvelteKit, Vite, TailwindCSS, Svelte
- Backend: Express, TypeScript, Prisma ORM
- Database: PostgreSQL
- AI: OpenAI API (GPT-4o-mini)
- Search: Exa API
- Extension: VS Code API, TypeScript
serp-fetcher/.env
DATABASE_URL=postgresql://user:password@localhost:5432/database
EXA_API_KEY=your_exa_api_key
game/.env
OPENAI_API_KEY=sk-proj-...
DATABASE_URL=postgresql://user:password@localhost:5432/database
VITE_SCRAPING_API_URL=http://localhost:3000/api/scrape-and-summarize
VITE_APP_NAME=IdleMode
"Please configure Leo's Last Hope interests and websites in settings first"
- Open VS Code Settings (
Cmd+,) - Search for "IdleMode"
- Add your interests and websites
"Failed to connect to server"
- Ensure serp-fetcher is running:
npm run serverin serp-fetcher directory - Check it's on http://localhost:3000
- Verify your .env files are set up correctly
"No articles found"
- Verify your website domains are correct (e.g.,
tldr.technothttps://tldr.tech) - Check EXA_API_KEY is valid in serp-fetcher/.env
- Verify PostgreSQL is running and DATABASE_URL is correct
Articles not displaying in feed
- Ensure game dev server is running:
npm run devin game directory - Check OPENAI_API_KEY is set in game/.env
- Verify database connection string is correct
attemptVSCExt/
├── src/
│ ├── extension.ts # VS Code extension main file
│ └── test/
├── game/ # SvelteKit frontend
│ ├── src/
│ │ ├── routes/
│ │ │ ├── +page.svelte # Feed display
│ │ │ └── api/
│ │ │ ├── feed/ # Feed endpoint
│ │ │ └── summarize/# Summarization endpoint
│ │ └── lib/
│ └── ...
├── serp-fetcher/ # Express backend
│ ├── src/
│ │ ├── server.ts # API routes
│ │ ├── fetcher.ts # Scraping logic
│ │ ├── index.ts # Batch scraper
│ │ └── ...
│ ├── prisma/
│ │ └── schema.prisma # Database models
│ └── ...
└── package.json
honestly a whole lot of possibilitiesss
Found a bug? Want to help improve Leo's Last Hope? PRs are welcome!
leCOOKEd
Stay on screen. Stay sharp. Stay locked in.
Built with ❤️ by developers, for developers who refuse to doom scroll. Leo we got you.