🔍 git-tribe
Code Ownership & Knowledge Map CLI — Analyze git history to reveal who owns what code, calculate bus factor, identify knowledge silos, and auto-generate CODEOWNERS files.
Why?
git blameshows the last editor, not the true owner- No CLI tool calculates bus factor — critical for team risk assessment
- CODEOWNERS files are hand-maintained and go stale quickly
- Engineering managers need knowledge distribution visibility at a glance
- Useful for onboarding: "who should I ask about module X?"
Features
| Feature | Description |
|---|---|
| Ownership Map | Who owns each file/directory by commit volume & line authorship |
| Bus Factor | Risk score: how many people must leave before knowledge is lost |
| Knowledge Silos | Files/modules where only 1-2 people have contributed |
| CODEOWNERS Gen | Auto-generate GitHub/GitLab CODEOWNERS from git history |
| Turnover Risk | Highlight files where top contributor is inactive |
| Team View | Aggregate ownership by team (configurable mapping) |
Installation
pip install git-tribe
Quick Start
# Run in any git repository
cd your-repo
# Full ownership report
git-tribe scan
# Deep analysis (blame every file)
git-tribe scan --depth full
# Analyze specific directory
git-tribe scan src/auth/
# Bus factor analysis
git-tribe bus-factor
# Detect knowledge silos
git-tribe silos --threshold 2
# Generate CODEOWNERS
git-tribe codeowners --output CODEOWNERS --format github
# JSON output for CI integration
git-tribe scan --format json --output report.json
# Time-bounded analysis
git-tribe scan --since "6 months ago"
Output Example
╭─────────────────────────────────────────────────╮
│ 🔍 git-tribe · Code Ownership Report │
│ my-project · Bus Factor: 3 │
╰─────────────────────────────────────────────────╯
📁 Directory Ownership
┌─────────────────┬──────────────┬────────┬────────────┐
│ Path │ Primary Owner│ Share │ Bus Factor │
├─────────────────┼──────────────┼────────┼────────────┤
│ src/auth/ │ alice │ 72% │ 1 ⚠️ │
│ src/api/ │ bob │ 45% │ 3 ✅ │
│ src/core/ │ charlie │ 38% │ 4 ✅ │
│ src/utils/ │ alice │ 55% │ 2 ⚠️ │
└─────────────────┴──────────────┴────────┴────────────┘
⚠️ Knowledge Silos (single-author files):
• src/auth/oauth.py → alice (100%)
• src/auth/jwt_handler.py → alice (97%)
💡 Recommendations:
1. src/auth/ has bus factor 1 — schedule pair review sessions
2. 3 files are single-author — assign cross-review in next sprint
Configuration
Create a .git-tribe.toml in your repository root:
[teams]
backend = ["alice", "bob", "charlie"]
frontend = ["diana", "eve"]
devops = ["frank"]
[ignore]
paths = ["vendor/", "node_modules/", "*.generated.*"]
authors = ["dependabot[bot]", "renovate[bot]"]
[thresholds]
bus_factor_warning = 2 # Warn if bus factor ≤ this
silo_max_authors = 2 # Flag files with ≤ this many authors
stale_months = 6 # Author considered inactive after this
Output Formats
| Format | Flag | Use Case |
|---|---|---|
| Terminal | --format terminal (default) |
Interactive review |
| JSON | --format json |
CI/CD pipelines, programmatic use |
| Markdown | --format markdown |
Documentation, PRs |
| CSV | --format csv |
Spreadsheet analysis |
| CODEOWNERS | git-tribe codeowners |
GitHub/GitLab integration |
How It Works
Ownership Score
Combines multiple signals with weighted formula:
- 60% — Blame-based (current lines attributed to author)
- 40% — Commit frequency (number of commits touching file)
Bus Factor
Minimum number of contributors whose departure would result in >50% of the code having no active author. Sort authors by contribution %, accumulate until >50% — that count is the bus factor.
License
Metadata
Release files for git-tribe 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| git_tribe-1.2.0.tar.gz | 636.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| git_tribe-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 658.1 kB
Release files / git_tribe-1.2.0.tar.gz
| Download URL | git_tribe-1.2.0.tar.gz |
|---|---|
| Size | 636.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7526e1fce3582e0a72356b27cc39c1580df697b980a0ad3b41071520abb3de8e
|
|
BLAKE2b-256 checksum How to use checksums |
15c472ed4cb9d302edd6f51d44b9ff28b5cf91583682aa5e7fa4dfc48eb4999d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 17, 2026.
Transparency logRelease files / git_tribe-1.2.0-py3-none-any.whl
| Download URL | git_tribe-1.2.0-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a36fa4c9129d4b0dcf1dd056ead53ae9a2224da2a6be280bf0ea661f36657da
|
|
BLAKE2b-256 checksum How to use checksums |
72e418cb759bdc852ac07478c6244a6b00d32c58ec49bfb1b7867106f9852af7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 17, 2026.
Transparency log