# ray-lea/argus architecture

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

- Interactive diagram: https://gitdiagram.com/ray-lea/argus
- Repository: https://github.com/ray-lea/argus

## Overview

Argus is a Windows task manager: users inspect processes and system performance, take management actions, and review recorded history. The product spans a GPUI desktop interface, application orchestration, Windows data collection, optional privileged-service support, and persistent history. README capabilities also include file-lock lookup, connections, services and startup items, monitoring surfaces, task-manager replacement, and in-app updates. The excerpts show initialization, history responsibilities, and service dispatch, but do not expose most runtime call sites; uncertain connections are therefore dashed and uncited.

Main entry points: [`src-gpui/src/commands.rs`](https://github.com/ray-lea/argus/blob/main/src-gpui/src/commands.rs) (UI commands), [`crates/argus-app/src/sampler.rs`](https://github.com/ray-lea/argus/blob/main/crates/argus-app/src/sampler.rs) (Live sampling), [`src-gpui/src/frontend/pages`](https://github.com/ray-lea/argus/tree/main/src-gpui/src/frontend/pages) (Feature pages), [`src-gpui/src/frontend.rs`](https://github.com/ray-lea/argus/blob/main/src-gpui/src/frontend.rs) (GPUI interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_ui["GPUI interface<br/>[frontend.rs]"]
  node_pages["Feature pages"]
  node_monitors["Tray and monitors<br/>[tray.rs]"]
end

subgraph group_app["Application orchestration"]
  node_commands["UI commands<br/>[commands.rs]"]
  node_startup["App startup<br/>[lib.rs]"]
  node_sampler["Live sampling<br/>[sampler.rs]"]
  node_updater["In-app updater<br/>[updater.rs]"]
end

subgraph group_core["Windows data and actions"]
  node_process["Process inventory<br/>[process.rs]"]
  node_hardware["Hardware telemetry<br/>[mod.rs]"]
  node_actions["Process actions<br/>[actions.rs]"]
  node_connections["Connections<br/>[connections.rs]"]
  node_services["Services and startup<br/>[services.rs]"]
  node_filelocks["File-lock lookup<br/>[explorer.rs]"]
end

subgraph group_service["Privileged service"]
  node_service_pipe["Service pipe<br/>[pipe.rs]"]
  node_service_server["Service host<br/>[server.rs]"]
  node_service_install["Service installer<br/>[install.rs]"]
  node_taskmgr["Task-manager replacement<br/>[mod.rs]"]
end

subgraph group_state["History and settings"]
  node_history[("History recorder<br/>[history.rs]")]
  node_watch[("Process watch<br/>[program.rs]")]
  node_settings[("Preferences<br/>[settings.rs]")]
end

node_user(("Windows user"))

node_user -.->|"operates"| node_ui
node_ui -.->|"shows views"| node_pages
node_pages -.->|"requests actions"| node_commands
node_startup -.->|"starts sampling"| node_sampler
node_sampler -.->|"collects processes"| node_process
node_sampler -.->|"collects telemetry"| node_hardware
node_commands -.->|"requests changes"| node_actions
node_commands -.->|"manages connections"| node_connections
node_commands -.->|"manages services"| node_services
node_pages -.->|"looks up locks"| node_filelocks
node_sampler -.->|"records samples"| node_history
node_history -.->|"provides history"| node_pages
node_sampler -.->|"tracks programs"| node_watch
node_ui -.->|"reads preferences"| node_settings
node_updater -.->|"offers updates"| node_user
node_service_server -->|"serves pipe"| node_service_pipe
node_service_pipe -.->|"supports setup"| node_service_install
node_commands -.->|"uses privileged service"| node_service_pipe
node_taskmgr -.->|"maintains replacement"| node_service_install
node_monitors -.->|"shows live readings"| node_hardware

click node_ui "https://github.com/ray-lea/argus/blob/main/src-gpui/src/frontend.rs"
click node_pages "https://github.com/ray-lea/argus/tree/main/src-gpui/src/frontend/pages"
click node_monitors "https://github.com/ray-lea/argus/blob/main/src-gpui/src/frontend/tray.rs"
click node_commands "https://github.com/ray-lea/argus/blob/main/src-gpui/src/commands.rs"
click node_startup "https://github.com/ray-lea/argus/blob/main/src-gpui/src/lib.rs"
click node_sampler "https://github.com/ray-lea/argus/blob/main/crates/argus-app/src/sampler.rs"
click node_process "https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/process.rs"
click node_hardware "https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/hardware/mod.rs"
click node_actions "https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/actions.rs"
click node_connections "https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/connections.rs"
click node_services "https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/services.rs"
click node_filelocks "https://github.com/ray-lea/argus/blob/main/crates/argus-app/src/explorer.rs"
click node_history "https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/history.rs"
click node_watch "https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/watch/program.rs"
click node_settings "https://github.com/ray-lea/argus/blob/main/crates/argus-app/src/settings.rs"
click node_updater "https://github.com/ray-lea/argus/blob/main/src-gpui/src/updater.rs"
click node_service_pipe "https://github.com/ray-lea/argus/blob/main/crates/argus-service/src/pipe.rs"
click node_service_server "https://github.com/ray-lea/argus/blob/main/crates/argus-service/src/server.rs"
click node_service_install "https://github.com/ray-lea/argus/blob/main/crates/argus-service/src/install.rs"
click node_taskmgr "https://github.com/ray-lea/argus/blob/main/crates/argus-service/src/taskmgr/mod.rs"

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_ui,node_pages,node_monitors,node_user toneBlue
class node_commands,node_startup,node_sampler,node_updater toneAmber
class node_process,node_hardware,node_actions,node_connections,node_services,node_filelocks toneMint
class node_service_pipe,node_service_server,node_service_install,node_taskmgr toneRose
class node_history,node_watch,node_settings toneIndigo
```

## Components

### Desktop experience

- [GPUI interface](https://github.com/ray-lea/argus/blob/main/src-gpui/src/frontend.rs): `src-gpui/src/frontend.rs`
- [Feature pages](https://github.com/ray-lea/argus/tree/main/src-gpui/src/frontend/pages): `src-gpui/src/frontend/pages`
- [Tray and monitors](https://github.com/ray-lea/argus/blob/main/src-gpui/src/frontend/tray.rs): `src-gpui/src/frontend/tray.rs`

### Application orchestration

- [UI commands](https://github.com/ray-lea/argus/blob/main/src-gpui/src/commands.rs): `src-gpui/src/commands.rs`
- [App startup](https://github.com/ray-lea/argus/blob/main/src-gpui/src/lib.rs): `src-gpui/src/lib.rs`
- [Live sampling](https://github.com/ray-lea/argus/blob/main/crates/argus-app/src/sampler.rs): `crates/argus-app/src/sampler.rs`
- [In-app updater](https://github.com/ray-lea/argus/blob/main/src-gpui/src/updater.rs): `src-gpui/src/updater.rs`

### Windows data and actions

- [Process inventory](https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/process.rs): `crates/argus-core/src/process.rs`
- [Hardware telemetry](https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/hardware/mod.rs): `crates/argus-core/src/hardware/mod.rs`
- [Process actions](https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/actions.rs): `crates/argus-core/src/actions.rs`
- [Connections](https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/connections.rs): `crates/argus-core/src/connections.rs`
- [Services and startup](https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/services.rs): `crates/argus-core/src/services.rs`
- [File-lock lookup](https://github.com/ray-lea/argus/blob/main/crates/argus-app/src/explorer.rs): `crates/argus-app/src/explorer.rs`

### Privileged service

- [Service pipe](https://github.com/ray-lea/argus/blob/main/crates/argus-service/src/pipe.rs): `crates/argus-service/src/pipe.rs`
- [Service host](https://github.com/ray-lea/argus/blob/main/crates/argus-service/src/server.rs): `crates/argus-service/src/server.rs`
- [Service installer](https://github.com/ray-lea/argus/blob/main/crates/argus-service/src/install.rs): `crates/argus-service/src/install.rs`
- [Task-manager replacement](https://github.com/ray-lea/argus/blob/main/crates/argus-service/src/taskmgr/mod.rs): `crates/argus-service/src/taskmgr/mod.rs`

### History and settings

- [History recorder](https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/history.rs): `crates/argus-core/src/history.rs`
- [Process watch](https://github.com/ray-lea/argus/blob/main/crates/argus-core/src/watch/program.rs): `crates/argus-core/src/watch/program.rs`
- [Preferences](https://github.com/ray-lea/argus/blob/main/crates/argus-app/src/settings.rs): `crates/argus-app/src/settings.rs`

### Other components

- **Windows user**

## Connections

- Windows user → GPUI interface: operates
- GPUI interface → Feature pages: shows views
- Feature pages → UI commands: requests actions
- App startup → Live sampling: starts sampling
- Live sampling → Process inventory: collects processes
- Live sampling → Hardware telemetry: collects telemetry
- UI commands → Process actions: requests changes
- UI commands → Connections: manages connections
- UI commands → Services and startup: manages services
- Feature pages → File-lock lookup: looks up locks
- Live sampling → History recorder: records samples
- History recorder → Feature pages: provides history
- Live sampling → Process watch: tracks programs
- GPUI interface → Preferences: reads preferences
- In-app updater → Windows user: offers updates
- Service host → Service pipe: serves pipe (evidence: `crates/argus-service/src/server.rs`)
- Service pipe → Service installer: supports setup (evidence: `crates/argus-service/src/install.rs`)
- UI commands → Service pipe: uses privileged service
- Task-manager replacement → Service installer: maintains replacement (evidence: `crates/argus-service/src/taskmgr/mod.rs`)
- Tray and monitors → Hardware telemetry: shows live readings
