Estimate developer onboarding time from repository structure analysis. Analyzes language diversity, architecture complexity, documentation gaps, and knowledge concentration to predict time-to-productivity.
npm install -g @glue-tools-ai/onboarding-complexityOr run directly with npx:
npx @glue-tools-ai/onboarding-complexity analyze /path/to/repoonboarding-complexity analyze /path/to/repoOutput example:
Analyzing repository structure...
Onboarding Complexity Report
Language Diversity: 7/10
Architecture Complexity: 6/10
Documentation Gap: 4/10
Dependency Complexity: 5/10
Knowledge Concentration: 8/10
Codebase Size: 5/10
Overall Score: 6.2/10
Estimated Onboarding Time (Mid-level Developer):
6.2 weeks to productivity
For Junior Developers:
10.85 weeks (1.75x multiplier)
For Senior Developers:
3.1 weeks (0.5x multiplier)
onboarding-complexity compare /path/to/repo1 /path/to/repo2--format [format]- Output format:table,json, ormarkdown(default: table)--experience [level]- Developer experience level:junior,mid, orsenior(default: mid)
# Analyze with JSON output
onboarding-complexity analyze . --format json
# Compare with markdown output
onboarding-complexity compare repo1 repo2 --format markdown
# Analyze for a junior developer
onboarding-complexity analyze . --experience juniorThe complexity estimator analyzes six key dimensions:
- Language Diversity: Counts distinct programming languages and calculates primary vs. secondary language ratio
- Architecture Complexity: Measures directory depth, number of services/modules, and configuration complexity
- Documentation Gap: Evaluates README quality, code comment ratio, and API documentation presence
- Dependency Complexity: Counts total dependencies and framework variety
- Knowledge Concentration: Calculates bus factor from git history and identifies knowledge silos
- Codebase Size: Estimates total files and lines of code
Each dimension scores 0-10, then a weighted aggregate produces a final complexity score. The score is converted to estimated weeks using multipliers based on developer experience:
- Junior Developer: 1.75x multiplier
- Mid-level Developer: 1.0x multiplier (baseline)
- Senior Developer: 0.5x multiplier
import { analyzeRepository } from '@glue-tools-ai/onboarding-complexity';
const result = await analyzeRepository('/path/to/repo', {
experience: 'mid'
});
console.log(result);
// {
// scores: {
// languageDiversity: 7,
// architectureComplexity: 6,
// documentationGap: 4,
// dependencyComplexity: 5,
// knowledgeConcentration: 8,
// codebabseSize: 5
// },
// overall: 6.2,
// weeks: 6.2,
// ...
// }Created by Glue — Developer experience platform for engineering teams.
MIT - Copyright 2026 Glue