# 1avishek/codebase-visualizer architecture

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

- Interactive diagram: https://gitdiagram.com/1avishek/codebase-visualizer
- Repository: https://github.com/1avishek/codebase-visualizer

## Overview

Codebase Visualizer is a local CLI and Codex skill that analyzes a chosen repository and produces an evidence-backed architecture map. Its central workflow runs from a user invoking the tool, through repository analysis, to generated artifacts viewed locally. The README also documents focus and snapshot-comparison modes, broad static-analysis coverage, and skill installation. The analyzer is one substantial source file; its internal phases are not expanded into call relationships because the excerpts do not establish those links.

Main entry points: [`scripts/analyze_codebase.py`](https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py) (Repository analyzer), [`visualize.py`](https://github.com/1avishek/codebase-visualizer/blob/main/visualize.py) (CLI entry), [`install.py`](https://github.com/1avishek/codebase-visualizer/blob/main/install.py) (Skill installer), [`assets/viewer-template.html`](https://github.com/1avishek/codebase-visualizer/blob/main/assets/viewer-template.html) (Interactive HTML viewer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_cli["CLI entry<br/>[visualize.py]"]
end

subgraph group_analysis["Repository analysis"]
  node_analyzer["Repository analyzer"]
  node_scan["Repository scanning"]
  node_static["Static analysis"]
  node_relations["Evidence and relationships"]
  node_flows["Flow analysis"]
  node_compare["Snapshot comparison"]
end

subgraph group_results["Map and results"]
  node_artifacts["Generated map files"]
  node_viewer["Interactive HTML viewer"]
  node_summaries["Markdown and diagrams"]
end

subgraph group_skill["Codex skill"]
  node_skill["Codex skill package<br/>[SKILL.md]"]
  node_installer["Skill installer<br/>[install.py]"]
end

node_user(("Repository owner"))

node_user -->|"runs"| node_cli
node_cli -->|"invokes"| node_analyzer
node_analyzer -->|"analyzes repository"| node_scan
node_scan -->|"examines source"| node_static
node_static -->|"identifies relationships"| node_relations
node_relations -->|"supports flow views"| node_flows
node_analyzer -->|"compares snapshots"| node_compare
node_analyzer -->|"writes map"| node_artifacts
node_artifacts -->|"opens locally"| node_viewer
node_analyzer -->|"generates summaries"| node_summaries
node_user -->|"installs skill"| node_installer
node_installer -->|"copies package"| node_skill

click node_cli "https://github.com/1avishek/codebase-visualizer/blob/main/visualize.py"
click node_analyzer "https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py"
click node_scan "https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py"
click node_static "https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py"
click node_relations "https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py"
click node_flows "https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py"
click node_compare "https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py"
click node_artifacts "https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py"
click node_viewer "https://github.com/1avishek/codebase-visualizer/blob/main/assets/viewer-template.html"
click node_summaries "https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py"
click node_skill "https://github.com/1avishek/codebase-visualizer/blob/main/SKILL.md"
click node_installer "https://github.com/1avishek/codebase-visualizer/blob/main/install.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 toneBlue
class node_analyzer,node_scan,node_static,node_relations,node_flows,node_compare toneAmber
class node_artifacts,node_viewer,node_summaries toneMint
class node_skill,node_installer toneRose
class node_user toneIndigo
```

## Components

### Entry points

- [CLI entry](https://github.com/1avishek/codebase-visualizer/blob/main/visualize.py): `visualize.py`

### Repository analysis

- [Repository analyzer](https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py): `scripts/analyze_codebase.py`
- [Repository scanning](https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py): `scripts/analyze_codebase.py`
- [Static analysis](https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py): `scripts/analyze_codebase.py`
- [Evidence and relationships](https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py): `scripts/analyze_codebase.py`
- [Flow analysis](https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py): `scripts/analyze_codebase.py`
- [Snapshot comparison](https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py): `scripts/analyze_codebase.py`

### Map and results

- [Generated map files](https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py): `scripts/analyze_codebase.py`
- [Interactive HTML viewer](https://github.com/1avishek/codebase-visualizer/blob/main/assets/viewer-template.html): `assets/viewer-template.html`
- [Markdown and diagrams](https://github.com/1avishek/codebase-visualizer/blob/main/scripts/analyze_codebase.py): `scripts/analyze_codebase.py`

### Codex skill

- [Codex skill package](https://github.com/1avishek/codebase-visualizer/blob/main/SKILL.md): `SKILL.md`
- [Skill installer](https://github.com/1avishek/codebase-visualizer/blob/main/install.py): `install.py`

### Other components

- **Repository owner**

## Connections

- Repository owner → CLI entry: runs (evidence: `README.md`)
- CLI entry → Repository analyzer: invokes (evidence: `visualize.py`)
- Repository analyzer → Repository scanning: analyzes repository (evidence: `README.md`)
- Repository scanning → Static analysis: examines source (evidence: `README.md`)
- Static analysis → Evidence and relationships: identifies relationships (evidence: `README.md`)
- Evidence and relationships → Flow analysis: supports flow views (evidence: `README.md`)
- Repository analyzer → Snapshot comparison: compares snapshots (evidence: `README.md`)
- Repository analyzer → Generated map files: writes map (evidence: `README.md`)
- Generated map files → Interactive HTML viewer: opens locally (evidence: `README.md`)
- Repository analyzer → Markdown and diagrams: generates summaries (evidence: `README.md`)
- Repository owner → Skill installer: installs skill (evidence: `README.md`)
- Skill installer → Codex skill package: copies package (evidence: `install.py`)
