DEV Community

Youssef Tarek Ali
Youssef Tarek Ali

Posted on

Archy: An Intelligent Arch Linux Assistant Built with GitHub Copilot CLI

GitHub Copilot CLI Challenge Submission

This is a submission for the GitHub Copilot CLI Challenge

What I Built

Archy is an intelligent Arch Linux assistant that remembers your system preferences across conversations and provides real-time package information. Built entirely with GitHub Copilot CLI in ~5 hours.

🎯 Key Features

🧠 Cross-Chat Memory

You (Chat 1): "I use Hyprland and yay"
[Memory stored]

You (Chat 2): "How do I update my system?"
Archy: "Run yay -Syu to update..." (uses your AUR helper!)
Enter fullscreen mode Exit fullscreen mode

📦 Real-Time Package Data - Fetches live versions from archlinux.org
🔍 Web Search - Searches when it doesn't know something
🛡️ Strict Boundaries - Only responds to Arch Linux topics (zero tolerance)
💬 Modern UI - Skeleton loading, stop button, markdown rendering

Tech Stack

  • Backend: FastAPI + PostgreSQL + Ollama (llama3.2)
  • Frontend: React + Vite
  • Deployment: Docker Compose (fully containerized)

Demo

🚀 Try It Live

git clone https://github.com/RealOrangeKun/arch-linux-assistant.git
cd arch-linux-assistant
docker-compose up -d
docker exec -it arch-assistant-ollama ollama pull llama3.2
# Visit http://localhost:3000
Enter fullscreen mode Exit fullscreen mode

🔐 Test Account (for judges)

  • Email: judge@devto.com
  • Password: ArchyDemo2024!
  • Automatically created on first startup via database seed script
  • Includes sample chat demonstrating the memory feature

Screenshots

Chat Interface with Memory
Chat Demo

GitHub Copilot CLI Experience

🚀 The Game Changer

GitHub Copilot CLI transformed this from a 2-3 week project into a 5-hour sprint:

Rapid Prototyping

Me: "Create streaming chat endpoint with Ollama"
Copilot: [Complete async implementation with error handling]
Me: "Add skeleton loading with shimmer effect"
Copilot: [Full CSS animation + React component]
Enter fullscreen mode Exit fullscreen mode

Instant Debugging

  • SQLAlchemy session errors? Fixed in one go.
  • CORS for streaming? Configured instantly.
  • bcrypt compatibility? Downgraded and patched automatically.

Architecture Guidance
Copilot didn't just write code - it suggested:

  • Using AbortController for cancellable requests
  • Pattern matching for memory extraction
  • Proper Docker networking with health checks

💡 Key Moments

Most Impressive: Asked for "skeleton loading animation" - got complete CSS with keyframes, shimmer effect, and React integration. First try. Just worked.

Time Saved: What would take 2-3 weeks of Stack Overflow searches took 5 focused hours.

Technical Highlights

Memory Extraction

patterns = [
    (r"i use (hyprland|i3|kde)", "window_manager", "name"),
    (r"i prefer (yay|paru)", "aur_helper", "name"),
]
# Auto-stores in PostgreSQL for cross-chat recall
Enter fullscreen mode Exit fullscreen mode

Real-Time Package Intelligence

if "install" in message:
    pkg = extract_package_name(message)
    data = await fetch_arch_api(pkg)  # Live version!
    inject_into_llm_context(data)
Enter fullscreen mode Exit fullscreen mode

Strict Boundaries

SYSTEM_PROMPT = """
ABSOLUTE RULES - ZERO TOLERANCE:
- Only help with Arch Linux topics
- Refuse all off-topic questions immediately
- No fallback offers
"""
Enter fullscreen mode Exit fullscreen mode

Development Timeline

  • Hour 1: Docker Compose + FastAPI + Auth ✅
  • Hour 2-3: Chat streaming + Session management ✅
  • Hour 4: Memory system + Package API ✅
  • Hour 5: UI polish + Web search ✅

Total: 5 hours from zero to production-ready!

Challenges Solved

LLM Hallucinations → Real-time API + context injection
Rate Limits → Graceful fallback with error messages
Boundary Violations → Extremely strict system prompts

What I Learned

  1. Copilot CLI is a 10x multiplier - Not replacing devs, amplifying them
  2. LLMs need guardrails - Strict prompts prevent scope creep
  3. Context injection - Real-time data prevents hallucinations
  4. UX matters - Loading states and stop buttons improve experience

Future Plans

  • [ ] RAG with Arch Wiki
  • [ ] AUR package support
  • [ ] Voice interface

Repository

🔗 GitHub: RealOrangeKun/arch-linux-assistant

⭐ Star if you find it useful!


Built with: GitHub Copilot CLI, FastAPI, React, Ollama, PostgreSQL, Docker
Time: 5 hours | Lines: ~3,000 | Fun: Immeasurable 🚀

Try Archy and never repeat your system config again!

GitHubCopilot #ArchLinux #AI #OpenSource

Top comments (0)