Transform your GitHub stars into a living knowledge graph and AI copilot framework
StarForge is a powerful toolkit that transforms your GitHub starred repositories from a flat list into a rich, structured knowledge framework that both you and AI assistants can leverage. It exports, analyzes, and organizes your GitHub stars to create a comprehensive profile of your technical interests, preferences, and knowledge landscape.
StarForge isn't just an exporter - it's a bridge between your curated GitHub knowledge and AI assistants:
- LLM Context Enhancement: Provide your stars data to LLMs to give them deep insight into your technical interests, tools, and frameworks
- Personalized AI Assistants: Create AI responses tailored to your technology stack and preferences
- Technical Knowledge Graph: Transform stars into a structured graph of technologies, domains, and relationships
- Self-Reflective Insights: Understand your own patterns, interests, and knowledge gaps
# Example: Using your GitHub stars to enhance LLM prompts
import json
import os
# Load your StarForge export
with open('your_github_stars.json') as f:
stars_data = json.load(f)
# Create a technology profile for AI context
tech_profile = {
"languages": {},
"frameworks": [],
"domains": [],
"top_interests": []
}
# Extract language preferences
for repo in stars_data:
lang = repo.get("language")
if lang:
tech_profile["languages"][lang] = tech_profile["languages"].get(lang, 0) + 1
# Find top frameworks (based on popular topics)
framework_keywords = ["react", "vue", "django", "flask", "tensorflow", "pytorch"]
for repo in stars_data:
for topic in repo.get("topics", []):
if topic.lower() in framework_keywords:
tech_profile["frameworks"].append(topic)
# Enhanced LLM prompt
enhanced_prompt = f"""
You're helping a developer with the following technology profile:
- Top languages: {sorted(tech_profile["languages"].items(), key=lambda x: x[1], reverse=True)[:5]}
- Frameworks of interest: {list(set(tech_profile["frameworks"]))[:10]}
Their question is: [ORIGINAL QUESTION HERE]
"""
# Now use this enhanced prompt with your favorite LLM API
- Multi-Format Export:
- JSON: Complete metadata for AI processing and analysis
- Markdown: Beautiful human-readable documentation
- Simplified JSON: Lightweight format for quick reference
- Smart Organization: Auto-categorization by language, topic, and domain
- Rich Metadata: Stars, forks, topics, licenses, creation dates, and more
- Dynamic Analysis: Generate insights about your technology preferences
- LLM-Ready Format: Optimized data structure for AI consumption
- LLM Integration
- Installation
- Usage
- Output Formats
- AI Copilot Patterns
- Knowledge Graph Integration
- Contributing
- License
- Python 3.7 or higher
requests
library
- Clone this repository:
git clone https://github.com/yourusername/starforge.git
cd starforge
- Install dependencies:
pip install -r requirements.txt
Export your GitHub stars in one command:
./export_stars_simple.sh yourusername
For customized exports:
- Edit the username in the export script:
GITHUB_USERNAME = "yourusername" # Replace with your GitHub username
- Run the full export:
python export_github_stars.py
StarForge generates multiple output formats, each optimized for different use cases:
Rich metadata optimized for AI processing:
[{
"name": "repo-name",
"full_name": "owner/repo-name",
"description": "Repository description",
"html_url": "https://github.com/owner/repo-name",
"language": "JavaScript",
"stars": 1234,
"forks": 567,
"topics": ["web", "frontend", "react"],
"license": "MIT License",
"created_at": "2020-01-15T21:00:45Z",
"updated_at": "2023-06-22T16:34:12Z"
}]
Beautifully organized documentation by language:
# Your Starred GitHub Repositories
_Exported on 2023-12-15 14:30:45_
Total repositories: **287**
## Table of Contents
- [JavaScript (45)](#javascript)
- [Python (32)](#python)
- [TypeScript (21)](#typescript)
## JavaScript
### [facebook/react](https://github.com/facebook/react)
A declarative, efficient, and flexible JavaScript library for building UI.
- **Stars:** 212,345
- **Forks:** 42,789
- **Topics:** ui, library, javascript, frontend
StarForge enables powerful AI copilot patterns by turning your GitHub stars into context:
def get_tech_stack_from_stars(stars_json_path):
"""Extract your technology stack from GitHub stars."""
with open(stars_json_path) as f:
repos = json.load(f)
languages = Counter()
frameworks = Counter()
for repo in repos:
if repo.get("language"):
languages[repo["language"]] += 1
for topic in repo.get("topics", []):
if topic.lower() in ["react", "vue", "angular", "django", "flask", "pytorch"]:
frameworks[topic] += 1
return {
"languages": dict(languages.most_common(10)),
"frameworks": dict(frameworks.most_common(10))
}
# Use this with LLM prompt:
"""
Based on your GitHub stars, I see you work primarily with {languages}
and have interest in {frameworks}. Given this, here's my recommendation for your question:
"""
def find_relevant_tools(stars_json_path, domain):
"""Find domain-specific tools from your stars."""
with open(stars_json_path) as f:
repos = json.load(f)
domain_tools = []
for repo in repos:
description = repo.get("description", "").lower()
topics = [t.lower() for t in repo.get("topics", [])]
if domain.lower() in description or domain.lower() in topics:
domain_tools.append({
"name": repo["name"],
"url": repo["html_url"],
"description": repo["description"],
"stars": repo["stargazers_count"]
})
return sorted(domain_tools, key=lambda x: x["stars"], reverse=True)
# Use with LLM:
"""
You're working on {domain} and from your starred repositories,
I see you might be interested in these tools: {tools}
"""
Analyze stars over time to recommend learning resources:
def generate_learning_path(stars_json_path):
"""Generate a personalized learning path based on stars."""
# Implementation details...
return {
"current_focus": ["react", "typescript"],
"suggested_next": ["graphql", "nextjs"],
"complementary": ["testing", "devops"]
}
Convert your stars into a knowledge graph:
def create_knowledge_graph(stars_json_path):
"""Transform stars into a knowledge graph."""
G = nx.Graph()
with open(stars_json_path) as f:
repos = json.load(f)
# Add nodes for languages, topics, and repositories
for repo in repos:
G.add_node(repo["full_name"], type="repository")
if repo.get("language"):
G.add_node(repo["language"], type="language")
G.add_edge(repo["full_name"], repo["language"])
for topic in repo.get("topics", []):
G.add_node(topic, type="topic")
G.add_edge(repo["full_name"], topic)
return G
# This graph can be used for recommendation, visualization, and analysis
Contributions are welcome! See CONTRIBUTING.md for details.
This project is licensed under the MIT License - see the LICENSE file for details.
โญ StarForge: Because your GitHub stars are more than just bookmarks - they're your knowledge constellation