How amrskh/angkorfetch works
AngkorFetch is a cross-platform terminal system-information tool. The principal workflow is to run the CLI, collect system and hardware details, then display a terminal-adaptive summary; --hinfo requests additional hardware diagnostics, while help and version are separate CLI modes. The runtime is implemented in one Rust source file, so its logical stages share that path. The excerpts show selected probes and output logic, but omit much of the dispatch and collection code; edges based on documented behavior cite the README.
Main entry points: main.rs System summary
Components 11
CLI
- Command handling
src/main.rs
Information collection
- System summary
src/main.rs - Hardware diagnostics
src/main.rs - System metrics
src/main.rs - OS hardware probes
src/main.rs - Runtime context
src/main.rs
Terminal output
- Adaptive layout
src/main.rs - Colored output
src/main.rs
Other components
- User
- Operating system interfaces
- Terminal
Connections 14
- User → Command handling: runs
README.md - Command handling → System summary: shows summary
README.md - Command handling → Hardware diagnostics: requests details
README.md - System summary → System metrics: collects metrics
src/main.rs - System summary → OS hardware probes: queries hardware
src/main.rs - System summary → Runtime context: collects context
src/main.rs - Hardware diagnostics → OS hardware probes: queries details
src/main.rs - OS hardware probes → Operating system interfaces: reads OS data
src/main.rs - System metrics → Operating system interfaces: reads metrics
- System summary → Adaptive layout: adapts output
README.md - Hardware diagnostics → Adaptive layout: formats details
src/main.rs - Adaptive layout → Terminal: checks capabilities
- Adaptive layout → Colored output: selects layout
README.md - Colored output → Terminal: prints output