Skip to content

Repository files navigation

✨ StarForge ✨

Transform your GitHub stars into a living knowledge graph and AI copilot framework

License: MITPythonLLM Compatible

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.

🧠 LLM Integration: Your Personal AI Knowledge Base

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 promptsimportjsonimportos# Load your StarForge exportwithopen('your_github_stars.json') asf:
stars_data=json.load(f)
# Create a technology profile for AI contexttech_profile= {
"languages": {},
"frameworks": [],
"domains": [],
"top_interests": []
}
# Extract language preferencesforrepoinstars_data:
lang=repo.get("language")
iflang:
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"]
forrepoinstars_data:
fortopicinrepo.get("topics", []):
iftopic.lower() inframework_keywords:
tech_profile["frameworks"].append(topic)
# Enhanced LLM promptenhanced_prompt=f"""You're helping a developer with the following technology profile:- Top languages: {sorted(tech_profile["languages"].items(), key=lambdax: 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

🚀 Key Features

  • 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

📋 Table of Contents

🔧 Installation

Prerequisites

  • Python 3.7 or higher
  • requests library

Setup

  1. Clone this repository:
git clone https://github.com/yourusername/starforge.git
cd starforge
  1. Install dependencies:
pip install -r requirements.txt

🎮 Usage

Quick Start

Export your GitHub stars in one command:

./export_stars_simple.sh yourusername

Advanced Usage

For customized exports:

  1. Edit the username in the export script:
GITHUB_USERNAME="yourusername"# Replace with your GitHub username
  1. Run the full export:
python export_github_stars.py

📊 Output Formats

StarForge generates multiple output formats, each optimized for different use cases:

Complete JSON (your_github_stars.json)

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"
}]

Human-Readable Markdown (your_github_stars.md)

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

🤖 AI Copilot Patterns

StarForge enables powerful AI copilot patterns by turning your GitHub stars into context:

1. Technical Stack Awareness

defget_tech_stack_from_stars(stars_json_path):
"""Extract your technology stack from GitHub stars."""withopen(stars_json_path) asf:
repos=json.load(f)
languages=Counter()
frameworks=Counter()
forrepoinrepos:
ifrepo.get("language"):
languages[repo["language"]] +=1fortopicinrepo.get("topics", []):
iftopic.lower() in ["react", "vue", "angular", "django", "flask", "pytorch"]:
frameworks[topic] +=1return {
"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:"""

2. Domain-Specific Recommendations

deffind_relevant_tools(stars_json_path, domain):
"""Find domain-specific tools from your stars."""withopen(stars_json_path) asf:
repos=json.load(f)
domain_tools= []
forrepoinrepos:
description=repo.get("description", "").lower()
topics= [t.lower() fortinrepo.get("topics", [])]
ifdomain.lower() indescriptionordomain.lower() intopics:
domain_tools.append({
"name": repo["name"],
"url": repo["html_url"],
"description": repo["description"],
"stars": repo["stargazers_count"]
})
returnsorted(domain_tools, key=lambdax: 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}"""

3. Learning Recommendation System

Analyze stars over time to recommend learning resources:

defgenerate_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"]
}

🔬 Knowledge Graph Integration

Convert your stars into a knowledge graph:

defcreate_knowledge_graph(stars_json_path):
"""Transform stars into a knowledge graph."""G=nx.Graph()
withopen(stars_json_path) asf:
repos=json.load(f)
# Add nodes for languages, topics, and repositoriesforrepoinrepos:
G.add_node(repo["full_name"], type="repository")
ifrepo.get("language"):
G.add_node(repo["language"], type="language")
G.add_edge(repo["full_name"], repo["language"])
fortopicinrepo.get("topics", []):
G.add_node(topic, type="topic")
G.add_edge(repo["full_name"], topic)
returnG# This graph can be used for recommendation, visualization, and analysis

👥 Contributing

Contributions are welcome! See CONTRIBUTING.md for details.

📝 License

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

About

Transform your GitHub stars into a living knowledge graph and AI copilot framework

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages