# evansabraham/sysinfo architecture

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

- Interactive diagram: https://gitdiagram.com/evansabraham/sysinfo
- Repository: https://github.com/evansabraham/sysinfo

## Overview

sysinfo is a small Linux system-information CLI. The user invokes the CLI, which collects host details and presents them as human-readable output or JSON; the health option instead runs a Bash check and displays its output. Collection covers OS, kernel, CPU, memory, swap, disk, uptime, hostname, and Python details. The graph includes the separate presentation layer and documented health-check branch. Source excerpts show the CLI’s calls and collector interfaces; health-script internals were not sampled.

Main entry points: [`src/sysinfo/cli.py`](https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/cli.py) (Command-line interface), [`src/sysinfo/health.sh`](https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/health.sh) (Health check script), [`src/sysinfo/collectors.py`](https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/collectors.py) (System collectors), [`src/sysinfo/formatters.py`](https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/formatters.py) (Output formatters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI workflow"]
  node_cli["Command-line interface<br/>[cli.py]"]
end

subgraph group_collection["System collection"]
  node_collectors["System collectors<br/>[collectors.py]"]
end

subgraph group_presentation["Output and health"]
  node_formatters["Output formatters<br/>[formatters.py]"]
  node_health["Health check script<br/>[health.sh]"]
end

node_user(("User"))
node_host["Linux host interfaces"]
node_health_output["Health-check output"]

node_user -->|"invokes"| node_cli
node_host -->|"provides system data"| node_collectors
node_cli -->|"collects information"| node_collectors
node_cli -->|"formats output"| node_formatters
node_cli -->|"runs check"| node_health
node_health -->|"writes stdout"| node_health_output
node_cli -->|"displays results"| node_user

click node_cli "https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/cli.py"
click node_collectors "https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/collectors.py"
click node_formatters "https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/formatters.py"
click node_health "https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/health.sh"

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_user toneBlue
class node_collectors toneAmber
class node_formatters,node_health toneMint
class node_host,node_health_output toneIndigo
```

## Components

### CLI workflow

- [Command-line interface](https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/cli.py): `src/sysinfo/cli.py`

### System collection

- [System collectors](https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/collectors.py): `src/sysinfo/collectors.py`

### Output and health

- [Output formatters](https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/formatters.py): `src/sysinfo/formatters.py`
- [Health check script](https://github.com/evansabraham/sysinfo/blob/main/src/sysinfo/health.sh): `src/sysinfo/health.sh`

### Other components

- **User**
- **Linux host interfaces**
- **Health-check output**

## Connections

- User → Command-line interface: invokes (evidence: `README.md`)
- Linux host interfaces → System collectors: provides system data (evidence: `src/sysinfo/collectors.py`)
- Command-line interface → System collectors: collects information (evidence: `src/sysinfo/cli.py`)
- Command-line interface → Output formatters: formats output (evidence: `src/sysinfo/cli.py`)
- Command-line interface → Health check script: runs check (evidence: `src/sysinfo/cli.py`)
- Health check script → Health-check output: writes stdout (evidence: `README.md`)
- Command-line interface → User: displays results (evidence: `README.md`)
