# Github Insights Generator (`judicial_zircon/github-insights-generator`) Actor

Comprehensive GitHub repository analysis providing tech stack detection, code quality scoring (0-100), activity trends, contributor insights, and health scores. Perfect for VCs conducting due diligence, recruiters evaluating candidates, and developers assessing open-source projects.

- **URL**: https://apify.com/judicial_zircon/github-insights-generator.md
- **Developed by:** [Sanjay Balam](https://apify.com/judicial_zircon) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 8 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $100.00 / 1,000 repository analyses

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## GitHub Repository Insights Generator

**Analyze GitHub repositories and generate comprehensive insights reports** including tech stack detection, code quality metrics, activity trends, contributor analytics, and overall repository health scores.

Perfect for **VCs**, **recruiters**, **developer tools**, and anyone who needs deep insights into GitHub repositories.

### 🚀 Features

#### 📊 **Tech Stack Analysis**

- Primary and secondary languages with percentage breakdown
- Framework detection (React, Vue, Django, Laravel, etc.)
- Build tools (Webpack, Vite, Gradle, etc.)
- Package managers (npm, Yarn, pip, Cargo, etc.)
- CI/CD tools (GitHub Actions, CircleCI, Jenkins, etc.)
- Dependency analysis for Node.js projects

#### 💎 **Code Quality Metrics**

- Documentation analysis (README, Contributing, License, Docs)
- Test coverage estimation
- Code standards (linting, formatting, type checking)
- File structure and organization
- Overall quality score (0-100)

#### 📈 **Activity Trends**

- Commit frequency and patterns
- Issue management metrics (open/close rates, response time)
- Pull request statistics (merge rates, turnaround time)
- Release cadence analysis
- Activity trends (increasing, stable, decreasing)

#### 👥 **Contributor Insights**

- Total contributor count
- Top contributors (all-time and recent)
- Contributor diversity and distribution
- Active vs. casual contributors
- Community engagement metrics

#### 🏥 **Health Score**

- Overall repository health (0-100)
- Detailed breakdown by category:
  - **Popularity** (stars, forks, watchers)
  - **Activity** (recent commits, regular updates)
  - **Maintenance** (issue management, PR handling)
  - **Community** (contributors, engagement)
  - **Quality** (documentation, testing, standards)

### 💰 Use Cases

#### For VCs and Investors

- Evaluate potential investment targets
- Assess technical health of portfolio companies
- Compare competing projects
- Due diligence automation

#### For Recruiters

- Evaluate candidate's open-source contributions
- Assess project quality and impact
- Verify technical skills
- Compare developers based on contributions

#### For Developer Tools

- Repository analytics dashboards
- Automated project assessment
- Dependency tracking
- Tech stack discovery

#### For Engineering Teams

- Competitive analysis
- Open-source project evaluation
- Tech debt assessment
- Team productivity metrics

### 📝 Input

```json
{
  "repositoryUrls": [
    "https://github.com/apify/crawlee",
    "https://github.com/microsoft/vscode"
  ],
  "githubToken": "ghp_xxxxx...",
  "includeCodeQuality": true,
  "includeContributorInsights": true,
  "includeActivityTrends": true,
  "analyzeDays": 90
}
```

#### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `repositoryUrls` | Array | ✅ | - | List of GitHub repository URLs to analyze |
| `githubToken` | String | ❌ | - | GitHub Personal Access Token (increases rate limit from 60 to 5000 req/hr) |
| `includeCodeQuality` | Boolean | ❌ | `true` | Include code quality analysis |
| `includeContributorInsights` | Boolean | ❌ | `true` | Include contributor analytics |
| `includeActivityTrends` | Boolean | ❌ | `true` | Include activity trend analysis |
| `analyzeDays` | Integer | ❌ | `90` | Number of days to analyze (7-365) |

#### Getting a GitHub Token (Optional but Recommended)

1. Go to https://github.com/settings/tokens
2. Click "Generate new token (classic)"
3. Select scopes: `public_repo`, `read:user`
4. Copy the token and paste it in the input

**Why use a token?** Without a token, you're limited to 60 requests per hour. With a token, you get 5,000 requests per hour.

### 📤 Output

The Actor generates a comprehensive JSON report for each repository:

```json
{
  "url": "https://github.com/apify/crawlee",
  "owner": "apify",
  "repo": "crawlee",
  "analyzedAt": "2025-12-29T10:30:00.000Z",
  "healthScore": 87,
  "healthBreakdown": {
    "popularity": { "score": 18, "maxScore": 20 },
    "activity": { "score": 22, "maxScore": 25 },
    "maintenance": { "score": 18, "maxScore": 20 },
    "community": { "score": 16, "maxScore": 20 },
    "quality": { "score": 13, "maxScore": 15 }
  },
  "basicInfo": {
    "name": "crawlee",
    "fullName": "apify/crawlee",
    "description": "A web scraping and browser automation library",
    "stars": 15240,
    "forks": 650,
    "watchers": 180,
    "openIssues": 42,
    "license": "Apache-2.0",
    "createdAt": "2018-09-18T10:00:00Z",
    "updatedAt": "2025-12-28T15:30:00Z"
  },
  "techStack": {
    "primaryLanguage": "TypeScript",
    "languages": ["TypeScript", "JavaScript", "Shell"],
    "frameworks": ["Node.js"],
    "buildTools": ["TypeScript", "Webpack"],
    "packageManagers": ["npm"],
    "cicdTools": ["GitHub Actions"],
    "dependencies": {
      "production": ["cheerio", "playwright", "puppeteer"],
      "development": ["jest", "eslint", "prettier"],
      "totalCount": 45
    }
  },
  "codeQuality": {
    "score": 85,
    "documentation": {
      "hasReadme": true,
      "hasLicense": true,
      "hasContributing": true,
      "hasDocsFolder": true,
      "documentationScore": 95
    },
    "testing": {
      "testFileCount": 120,
      "estimatedCoveragePercentage": "75.5",
      "hasTestingFramework": true,
      "testingScore": 80
    },
    "codeStandards": {
      "hasLinting": true,
      "hasFormatting": true,
      "hasTypeChecking": true
    }
  },
  "contributors": {
    "totalContributors": 87,
    "topContributors": [...],
    "recentActivity": {
      "contributorsInPeriod": 15,
      "activeContributors": 8,
      "casualContributors": 7
    },
    "diversity": {
      "contributorConcentration": 45.2,
      "isHealthyDistribution": true
    }
  },
  "activityTrends": {
    "commits": {
      "total": 234,
      "averagePerDay": "2.60",
      "trend": "stable"
    },
    "issues": {
      "total": 89,
      "open": 42,
      "closed": 47,
      "closeRate": 52.81
    },
    "pullRequests": {
      "total": 156,
      "open": 12,
      "closed": 144,
      "mergeRate": 92.31
    },
    "releases": {
      "total": 24,
      "recentCount": 3,
      "latestRelease": {
        "name": "v3.7.0",
        "tagName": "v3.7.0",
        "publishedAt": "2025-12-15T10:00:00Z"
      }
    }
  },
  "success": true
}
```

### 🎯 API Rate Limits

- **Without token**: 60 requests/hour
- **With token**: 5,000 requests/hour

Each repository analysis uses approximately 5-10 API calls depending on settings.

### 🔧 Development

#### Local Testing

```bash
## Clone the repository
cd github-insights-generator

## Install dependencies
npm install

## Create .env file with your GitHub token (optional)
echo "GITHUB_TOKEN=your_token_here" > .env

## Build the project
npm run build

## Run locally
npm start
```

#### Deploy to Apify

1. Install Apify CLI: `npm install -g apify-cli`
2. Login: `apify login`
3. Push to Apify: `apify push`

### 📊 Example Use Cases

#### Evaluate a potential dependency

```json
{
  "repositoryUrls": ["https://github.com/lodash/lodash"],
  "analyzeDays": 180
}
```

#### Compare frameworks

```json
{
  "repositoryUrls": [
    "https://github.com/facebook/react",
    "https://github.com/vuejs/vue",
    "https://github.com/angular/angular"
  ]
}
```

#### Assess candidate's project

```json
{
  "repositoryUrls": ["https://github.com/username/their-project"],
  "includeContributorInsights": true,
  "analyzeDays": 365
}
```

### 🏆 What Makes This Actor Unique?

1. **Comprehensive Analysis**: Combines multiple data points into actionable insights
2. **Health Score Algorithm**: Proprietary scoring system based on best practices
3. **Smart Detection**: Automatically detects tech stacks, frameworks, and tools
4. **Flexible Configuration**: Customize analysis depth and scope
5. **Fast & Efficient**: Optimized API usage for quick results
6. **No Login Required**: Works with public repositories (token optional)

### 🤝 Support

- **Issues**: Report bugs or request features via GitHub issues
- **Questions**: Contact support@apify.com
- **Discord**: Join the Apify community on Discord

### 📜 License

Apache-2.0

### 🎉 Built for the Apify $1M Challenge

This Actor was built as part of the Apify $1M Challenge to help developers, investors, and recruiters gain deep insights into GitHub repositories.

***

**Made with ❤️ by Sanjay** | [Apify Store](https://apify.com/store) | [Documentation](https://docs.apify.com)

# Actor input Schema

## `repositoryUrls` (type: `array`):

List of GitHub repository URLs to analyze (e.g., https://github.com/owner/repo)

## `githubToken` (type: `string`):

Optional GitHub token for higher API rate limits (5000 req/hr vs 60 req/hr). Create at: https://github.com/settings/tokens

## `includeCodeQuality` (type: `boolean`):

Analyze code quality metrics (file structure, documentation, test coverage indicators)

## `includeContributorInsights` (type: `boolean`):

Analyze contributor activity, top contributors, and commit patterns

## `includeActivityTrends` (type: `boolean`):

Analyze commit frequency, issue/PR trends, and release patterns

## `analyzeDays` (type: `integer`):

Number of days to look back for activity trends

## Actor input object example

```json
{
  "repositoryUrls": [
    "https://github.com/apify/crawlee",
    "https://github.com/microsoft/vscode"
  ],
  "includeCodeQuality": true,
  "includeContributorInsights": true,
  "includeActivityTrends": true,
  "analyzeDays": 90
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "repositoryUrls": [
        "https://github.com/apify/crawlee"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("judicial_zircon/github-insights-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "repositoryUrls": ["https://github.com/apify/crawlee"] }

# Run the Actor and wait for it to finish
run = client.actor("judicial_zircon/github-insights-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "repositoryUrls": [
    "https://github.com/apify/crawlee"
  ]
}' |
apify call judicial_zircon/github-insights-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,judicial_zircon/github-insights-generator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9ZVakaVDm7YOI5avX/builds/LdsDfiwhR7UmclK3k/openapi.json
