
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
github-package-analyzer
Advanced tools
Analyze GitHub repositories for package implementation and code quality
A powerful tool to analyze GitHub repositories for package implementation and code quality using the GitHub API and OpenAI's GPT models. Evaluate your dependencies, verify implementations, and get AI-powered suggestions for improvement.
📦 Comprehensive Package Analysis
🤖 AI-Powered Code Analysis
📊 Detailed Reporting
🔄 Repository Tools
npm install github-package-analyzer
You'll need to provide authentication tokens:
const analyzer = new PackageAnalyzer({
githubToken: process.env.GITHUB_TOKEN, // GitHub Personal Access Token
openaiKey: process.env.OPENAI_API_KEY // OpenAI API Key
});
const PackageAnalyzer = require('github-package-analyzer');
const dotenv = require('dotenv');
dotenv.config();
async function main() {
const analyzer = new PackageAnalyzer({
githubToken: process.env.GITHUB_TOKEN,
openaiKey: process.env.OPENAI_API_KEY
});
const result = await analyzer.analyze('owner', 'repo', ['react', 'express']);
console.log(JSON.stringify(result, null, 2));
}
main().catch(console.error);
const PackageAnalyzer = require('github-package-analyzer');
const dotenv = require('dotenv');
dotenv.config();
async function analyzeFullStack() {
// Define custom patterns for various frameworks and libraries
const customPatterns = {
'next': {
filePatterns: ['.js', '.ts', '.jsx', '.tsx'],
codePatterns: [
'from "next"',
'from "next/app"',
'from "next/document"',
'from "next/router"'
]
},
'prisma': {
filePatterns: ['.ts', '.js'],
codePatterns: [
'from "@prisma/client"',
'new PrismaClient',
'prisma.$connect'
]
},
'tailwind': {
filePatterns: ['.css', '.config.js'],
codePatterns: [
'tailwind.config',
'@tailwind base',
'@tailwind components',
'@tailwind utilities'
]
},
'jest': {
filePatterns: ['.test.js', '.spec.js', '.test.ts', '.spec.ts'],
codePatterns: [
'describe(',
'test(',
'it(',
'expect(',
'jest.mock'
]
}
};
// Initialize analyzer with custom patterns
const analyzer = new PackageAnalyzer({
githubToken: process.env.GITHUB_TOKEN,
openaiKey: process.env.OPENAI_API_KEY,
patterns: customPatterns
});
try {
// Analyze multiple aspects of a full-stack application
const result = await analyzer.analyze(
'owner',
'repo',
['react', 'next', 'prisma', 'tailwind', 'jest']
);
// Generate detailed report
console.log('Analysis Summary:');
console.log('----------------');
console.log(`Overall Grade: ${result.summary.grade}`);
console.log(`Average Score: ${result.summary.averageScore}`);
console.log('\nPackage Details:');
result.details.dependencies.forEach(pkg => {
console.log(`\n${pkg.package}:`);
console.log(` Installed: ${pkg.installed}`);
console.log(` Implemented: ${pkg.implementation}`);
if (pkg.scores) {
console.log(` Code Quality: ${pkg.scores.codeQuality}`);
console.log(` Implementation Quality: ${pkg.scores.implementationQuality}`);
console.log(` Grade: ${pkg.grade}`);
}
});
// Save detailed report to file
const fs = require('fs');
fs.writeFileSync(
'analysis-report.json',
JSON.stringify(result, null, 2)
);
} catch (error) {
console.error('Analysis failed:', error);
}
}
analyzeFullStack().catch(console.error);
The analyzer performs multiple levels of analysis:
The analyzer generates detailed reports in the following structure:
{
"passed": true,
"summary": {
"totalScore": 85,
"averageScore": 85,
"grade": "B"
},
"details": {
"dependencies": [],
"implementation": [],
"codeQuality": [],
"suggestions": []
}
}
Built-in analysis patterns for:
Add custom patterns by extending the configuration:
const customPatterns = {
'packageName': {
filePatterns: ['.ext1', '.ext2'],
codePatterns: ['import pattern', 'require pattern']
}
};
Contributions are welcome! Please feel free to submit a Pull Request. See our contributing guidelines for more details.
MIT License - see LICENSE file for details.
Tom Tarpey
⚠️ Important: Never commit API keys or tokens to version control. Use environment variables or secure configuration management for sensitive credentials.
For detailed API documentation and advanced usage examples, visit our documentation.
FAQs
Analyze GitHub repositories for package implementation and code quality
The npm package github-package-analyzer receives a total of 1 weekly downloads. As such, github-package-analyzer popularity was classified as not popular.
We found that github-package-analyzer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.