# mxrch/gitfive architecture

> Architecture diagram of the GitHub repository mxrch/gitfive, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mxrch/gitfive
- Repository: https://github.com/mxrch/gitfive

## Overview

GitFive is a command-line OSINT tool for investigating GitHub identities. The main workflow accepts a username, email, or email list; the username investigation gathers profile and repository evidence, analyzes identities and generates candidate emails, then exports results when requested. Email searches use a temporary repository containing synthetic commits to discover matching accounts. The README also documents login, lightweight email lookup, history and variations, SSH-key collection, and JSON export. Relationships below are limited to calls shown in excerpts or references in the SOURCE INDEX; some documented capabilities have no verified internal wiring here.

Main entry points: [`gitfive/modules/username_mod.py`](https://github.com/mxrch/gitfive/blob/master/gitfive/modules/username_mod.py) (Username hunt), [`gitfive/lib/cli.py`](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/cli.py) (Command router), [`gitfive/lib/commits.py`](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/commits.py) (Commit analysis), [`gitfive/lib/github.py`](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/github.py) (GitHub operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["CLI and commands"]
  node_cli["Command router<br/>[cli.py]"]
  node_login["Login command<br/>[login_mod.py]"]
  node_usercmd["Username hunt<br/>[username_mod.py]"]
  node_emailcmd["Email hunt<br/>[email_mod.py]"]
  node_emailscmd["Email-list hunt<br/>[emails_mod.py]"]
  node_lightcmd["Light lookup<br/>[light_mod.py]"]
end

subgraph group_investigation["Profile investigation"]
  node_profile["Profile and SSH data<br/>[username_mod.py]"]
  node_repos["Repository collection<br/>[repos.py]"]
  node_organizations["Organization scan<br/>[organizations.py]"]
  node_social["Friend analysis<br/>[close_friends.py]"]
  node_domain["Domain discovery<br/>[domain_finder.py]"]
end

subgraph group_analysis["Identity analysis"]
  node_xray["Identity analysis<br/>[xray.py]"]
  node_commits["Commit analysis<br/>[commits.py]"]
  node_emailgen["Email generation<br/>[emails_gen.py]"]
  node_metamon["Synthetic repo probe<br/>[metamon.py]"]
end

subgraph group_runtime["GitHub and runtime"]
  node_api["GitHub API client<br/>[api.py]"]
  node_github["GitHub operations<br/>[github.py]"]
  node_runner["Session and target state<br/>[objects.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
  node_utils["Shared utilities<br/>[utils.py]"]
  node_banner["Terminal banner<br/>[banner.py]"]
  node_instruments["Async progress<br/>[instruments.py]"]
end

node_user(("Operator"))
node_githubservice(("GitHub"))

node_user -->|"runs command"| node_cli
node_cli -->|"dispatches"| node_login
node_cli -->|"dispatches"| node_usercmd
node_cli -->|"dispatches"| node_emailcmd
node_cli -->|"dispatches"| node_emailscmd
node_cli -->|"dispatches"| node_lightcmd
node_usercmd -->|"performs"| node_profile
node_usercmd -->|"queries profile"| node_api
node_usercmd -->|"guesses friends"| node_social
node_usercmd -->|"scrapes organizations"| node_organizations
node_usercmd -->|"detects domains"| node_domain
node_usercmd -->|"analyzes identities"| node_xray
node_usercmd -->|"generates candidates"| node_emailgen
node_usercmd -->|"probes candidates"| node_metamon
node_usercmd -->|"checks matches"| node_commits
node_usercmd -->|"deletes probe repo"| node_github
node_usercmd -->|"uses repository scan"| node_repos
node_emailcmd -->|"probes email"| node_metamon
node_emailcmd -->|"scrapes matches"| node_commits
node_emailcmd -->|"continues account hunt"| node_usercmd
node_emailcmd -->|"deletes probe repo"| node_github
node_emailscmd -->|"probes list"| node_metamon
node_emailscmd -->|"scrapes matches"| node_commits
node_emailscmd -->|"deletes probe repo"| node_github
node_xray -->|"tests candidate emails"| node_metamon
node_xray -->|"scrapes probe commits"| node_commits
node_xray -->|"deletes probe repo"| node_github
node_metamon -->|"creates probe repo"| node_github
node_metamon -->|"pushes synthetic commits"| node_githubservice
node_commits -->|"fetches commit pages"| node_githubservice
node_commits -->|"fetches profile names"| node_github
node_api -.->|"queries API"| node_githubservice
node_runner -->|"authenticates"| node_githubservice
node_github -->|"manages repositories"| node_githubservice
node_emailgen -->|"uses domain lists"| node_config
node_commits -->|"tracks progress"| node_instruments
node_usercmd -->|"uses shared helpers"| node_utils
node_usercmd -->|"uses session state"| node_runner
node_cli -->|"shows banner"| node_banner

click node_cli "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/cli.py"
click node_login "https://github.com/mxrch/gitfive/blob/master/gitfive/modules/login_mod.py"
click node_usercmd "https://github.com/mxrch/gitfive/blob/master/gitfive/modules/username_mod.py"
click node_emailcmd "https://github.com/mxrch/gitfive/blob/master/gitfive/modules/email_mod.py"
click node_emailscmd "https://github.com/mxrch/gitfive/blob/master/gitfive/modules/emails_mod.py"
click node_lightcmd "https://github.com/mxrch/gitfive/blob/master/gitfive/modules/light_mod.py"
click node_profile "https://github.com/mxrch/gitfive/blob/master/gitfive/modules/username_mod.py"
click node_repos "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/repos.py"
click node_organizations "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/organizations.py"
click node_social "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/close_friends.py"
click node_domain "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/domain_finder.py"
click node_xray "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/xray.py"
click node_commits "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/commits.py"
click node_emailgen "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/emails_gen.py"
click node_metamon "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/metamon.py"
click node_api "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/api.py"
click node_github "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/github.py"
click node_runner "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/objects.py"
click node_config "https://github.com/mxrch/gitfive/blob/master/gitfive/config.py"
click node_utils "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/utils.py"
click node_banner "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/banner.py"
click node_instruments "https://github.com/mxrch/gitfive/blob/master/gitfive/lib/instruments.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_login,node_usercmd,node_emailcmd,node_emailscmd,node_lightcmd toneBlue
class node_profile,node_repos,node_organizations,node_social,node_domain toneAmber
class node_xray,node_commits,node_emailgen,node_metamon toneMint
class node_api,node_github,node_runner,node_config,node_utils,node_banner,node_instruments toneRose
class node_user,node_githubservice toneIndigo
```

## Components

### CLI and commands

- [Command router](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/cli.py): `gitfive/lib/cli.py`
- [Login command](https://github.com/mxrch/gitfive/blob/master/gitfive/modules/login_mod.py): `gitfive/modules/login_mod.py`
- [Username hunt](https://github.com/mxrch/gitfive/blob/master/gitfive/modules/username_mod.py): `gitfive/modules/username_mod.py`
- [Email hunt](https://github.com/mxrch/gitfive/blob/master/gitfive/modules/email_mod.py): `gitfive/modules/email_mod.py`
- [Email-list hunt](https://github.com/mxrch/gitfive/blob/master/gitfive/modules/emails_mod.py): `gitfive/modules/emails_mod.py`
- [Light lookup](https://github.com/mxrch/gitfive/blob/master/gitfive/modules/light_mod.py): `gitfive/modules/light_mod.py`

### Profile investigation

- [Profile and SSH data](https://github.com/mxrch/gitfive/blob/master/gitfive/modules/username_mod.py): `gitfive/modules/username_mod.py`
- [Repository collection](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/repos.py): `gitfive/lib/repos.py`
- [Organization scan](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/organizations.py): `gitfive/lib/organizations.py`
- [Friend analysis](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/close_friends.py): `gitfive/lib/close_friends.py`
- [Domain discovery](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/domain_finder.py): `gitfive/lib/domain_finder.py`

### Identity analysis

- [Identity analysis](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/xray.py): `gitfive/lib/xray.py`
- [Commit analysis](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/commits.py): `gitfive/lib/commits.py`
- [Email generation](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/emails_gen.py): `gitfive/lib/emails_gen.py`
- [Synthetic repo probe](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/metamon.py): `gitfive/lib/metamon.py`

### GitHub and runtime

- [GitHub API client](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/api.py): `gitfive/lib/api.py`
- [GitHub operations](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/github.py): `gitfive/lib/github.py`
- [Session and target state](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/objects.py): `gitfive/lib/objects.py`
- [Runtime configuration](https://github.com/mxrch/gitfive/blob/master/gitfive/config.py): `gitfive/config.py`
- [Shared utilities](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/utils.py): `gitfive/lib/utils.py`
- [Terminal banner](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/banner.py): `gitfive/lib/banner.py`
- [Async progress](https://github.com/mxrch/gitfive/blob/master/gitfive/lib/instruments.py): `gitfive/lib/instruments.py`

### Other components

- **Operator**
- **GitHub**

## Connections

- Operator → Command router: runs command (evidence: `README.md`)
- Command router → Login command: dispatches (evidence: `gitfive/lib/cli.py`)
- Command router → Username hunt: dispatches (evidence: `gitfive/lib/cli.py`)
- Command router → Email hunt: dispatches (evidence: `gitfive/lib/cli.py`)
- Command router → Email-list hunt: dispatches (evidence: `gitfive/lib/cli.py`)
- Command router → Light lookup: dispatches (evidence: `gitfive/lib/cli.py`)
- Username hunt → Profile and SSH data: performs (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → GitHub API client: queries profile (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → Friend analysis: guesses friends (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → Organization scan: scrapes organizations (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → Domain discovery: detects domains (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → Identity analysis: analyzes identities (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → Email generation: generates candidates (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → Synthetic repo probe: probes candidates (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → Commit analysis: checks matches (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → GitHub operations: deletes probe repo (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → Repository collection: uses repository scan (evidence: `gitfive/modules/username_mod.py`)
- Email hunt → Synthetic repo probe: probes email (evidence: `gitfive/modules/email_mod.py`)
- Email hunt → Commit analysis: scrapes matches (evidence: `gitfive/modules/email_mod.py`)
- Email hunt → Username hunt: continues account hunt (evidence: `gitfive/modules/email_mod.py`)
- Email hunt → GitHub operations: deletes probe repo (evidence: `gitfive/modules/email_mod.py`)
- Email-list hunt → Synthetic repo probe: probes list (evidence: `gitfive/modules/emails_mod.py`)
- Email-list hunt → Commit analysis: scrapes matches (evidence: `gitfive/modules/emails_mod.py`)
- Email-list hunt → GitHub operations: deletes probe repo (evidence: `gitfive/modules/emails_mod.py`)
- Identity analysis → Synthetic repo probe: tests candidate emails (evidence: `gitfive/lib/xray.py`)
- Identity analysis → Commit analysis: scrapes probe commits (evidence: `gitfive/lib/xray.py`)
- Identity analysis → GitHub operations: deletes probe repo (evidence: `gitfive/lib/xray.py`)
- Synthetic repo probe → GitHub operations: creates probe repo (evidence: `gitfive/lib/metamon.py`)
- Synthetic repo probe → GitHub: pushes synthetic commits (evidence: `gitfive/lib/metamon.py`)
- Commit analysis → GitHub: fetches commit pages (evidence: `gitfive/lib/commits.py`)
- Commit analysis → GitHub operations: fetches profile names (evidence: `gitfive/lib/commits.py`)
- GitHub API client → GitHub: queries API
- Session and target state → GitHub: authenticates (evidence: `gitfive/lib/objects.py`)
- GitHub operations → GitHub: manages repositories (evidence: `gitfive/lib/github.py`)
- Email generation → Runtime configuration: uses domain lists (evidence: `gitfive/lib/emails_gen.py`)
- Commit analysis → Async progress: tracks progress (evidence: `gitfive/lib/commits.py`)
- Username hunt → Shared utilities: uses shared helpers (evidence: `gitfive/modules/username_mod.py`)
- Username hunt → Session and target state: uses session state (evidence: `gitfive/modules/username_mod.py`)
- Command router → Terminal banner: shows banner
