# anyrun-org/anyrun architecture

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

- Interactive diagram: https://gitdiagram.com/anyrun-org/anyrun
- Repository: https://github.com/anyrun-org/anyrun

## Overview

Anyrun is a Wayland-native, GTK-based launcher whose results are supplied by a separate anyrun-provider process. The main workflow is: a user starts or shows the launcher, enters a query, the UI sends it over provider IPC, and plugin-produced matches are displayed and selected for handling. Configuration controls launcher behavior and enabled plugins. The README also documents a broad set of distinct search and action plugins. Plugin-to-provider dispatch is shown as unverified because the sampled sources do not expose that wiring.

Main entry points: [`anyrun/src/app.rs`](https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/app.rs) (GTK launcher UI), [`anyrun/src/main.rs`](https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/main.rs) (CLI and daemon), [`plugins/randr/src/randr/mod.rs`](https://github.com/anyrun-org/anyrun/blob/master/plugins/randr/src/randr/mod.rs) (Randr backends), [`anyrun/src/provider.rs`](https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/provider.rs) (Provider IPC worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launcher["Launcher runtime"]
  node_cli["CLI and daemon<br/>[main.rs]"]
  node_configuration["Launcher config<br/>[config.rs]"]
  node_ui["GTK launcher UI<br/>[app.rs]"]
  node_plugin_views["Plugin match views<br/>[plugin_box.rs]"]
  node_provider_worker["Provider IPC worker<br/>[provider.rs]"]
end

subgraph group_plugin_api["Plugin interface"]
  node_plugin_contract["Plugin API<br/>[lib.rs]"]
end

subgraph group_search_plugins["Search plugins"]
  node_applications["Applications search<br/>[lib.rs]"]
  node_desktop_entries["Desktop entry parsing<br/>[scrubber.rs]"]
  node_symbols["Unicode symbols<br/>[lib.rs]"]
  node_dictionary["Word definitions<br/>[lib.rs]"]
  node_kidex["File search<br/>[lib.rs]"]
  node_websearch["Web search<br/>[lib.rs]"]
  node_translate["Translation<br/>[lib.rs]"]
  node_rink["Calculator and units<br/>[lib.rs]"]
  node_nix_run["Nix app launch<br/>[lib.rs]"]
  node_stdin["Stdin selector<br/>[lib.rs]"]
end

subgraph group_action_plugins["Action plugins"]
  node_shell["Shell commands<br/>[lib.rs]"]
  node_actions["Power and commands<br/>[lib.rs]"]
  node_niri_focus["Niri window focus<br/>[lib.rs]"]
  node_randr_plugin["Monitor configuration<br/>[lib.rs]"]
  node_randr_backend["Randr backends<br/>[mod.rs]"]
  node_hyprland["Hyprland backend<br/>[hyprland.rs]"]
  node_dummy_backend["Dummy backend<br/>[dummy.rs]"]
end

node_user(("User"))
node_provider_process["anyrun-provider"]

node_user -->|"starts or shows"| node_cli
node_cli -->|"loads settings"| node_configuration
node_cli -->|"launches"| node_ui
node_ui -->|"starts worker"| node_provider_worker
node_provider_worker -->|"spawns and exchanges IPC"| node_provider_process
node_ui -->|"sends queries"| node_provider_worker
node_ui -->|"updates match views"| node_plugin_views
node_applications -->|"uses parsed entries"| node_desktop_entries
node_randr_plugin -->|"uses backend API"| node_randr_backend
node_randr_backend -->|"selects by compositor"| node_hyprland
node_randr_backend -->|"selects fallback"| node_dummy_backend
node_provider_process -.->|"uses plugin API"| node_plugin_contract
node_provider_process -.->|"dispatches plugin work"| node_applications
node_provider_process -.->|"dispatches plugin work"| node_symbols
node_provider_process -.->|"dispatches plugin work"| node_dictionary
node_provider_process -.->|"dispatches plugin work"| node_kidex
node_provider_process -.->|"dispatches plugin work"| node_websearch
node_provider_process -.->|"dispatches plugin work"| node_translate
node_provider_process -.->|"dispatches plugin work"| node_rink
node_provider_process -.->|"dispatches plugin work"| node_nix_run
node_provider_process -.->|"dispatches plugin work"| node_stdin
node_provider_process -.->|"dispatches plugin work"| node_shell
node_provider_process -.->|"dispatches plugin work"| node_actions
node_provider_process -.->|"dispatches plugin work"| node_niri_focus
node_provider_process -.->|"dispatches plugin work"| node_randr_plugin

click node_cli "https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/main.rs"
click node_configuration "https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/config.rs"
click node_ui "https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/app.rs"
click node_plugin_views "https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/plugin_box.rs"
click node_provider_worker "https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/provider.rs"
click node_plugin_contract "https://github.com/anyrun-org/anyrun/blob/master/anyrun-plugin/src/lib.rs"
click node_applications "https://github.com/anyrun-org/anyrun/blob/master/plugins/applications/src/lib.rs"
click node_desktop_entries "https://github.com/anyrun-org/anyrun/blob/master/plugins/applications/src/scrubber.rs"
click node_symbols "https://github.com/anyrun-org/anyrun/blob/master/plugins/symbols/src/lib.rs"
click node_dictionary "https://github.com/anyrun-org/anyrun/blob/master/plugins/dictionary/src/lib.rs"
click node_kidex "https://github.com/anyrun-org/anyrun/blob/master/plugins/kidex/src/lib.rs"
click node_websearch "https://github.com/anyrun-org/anyrun/blob/master/plugins/websearch/src/lib.rs"
click node_translate "https://github.com/anyrun-org/anyrun/blob/master/plugins/translate/src/lib.rs"
click node_rink "https://github.com/anyrun-org/anyrun/blob/master/plugins/rink/src/lib.rs"
click node_nix_run "https://github.com/anyrun-org/anyrun/blob/master/plugins/nix-run/src/lib.rs"
click node_stdin "https://github.com/anyrun-org/anyrun/blob/master/plugins/stdin/src/lib.rs"
click node_shell "https://github.com/anyrun-org/anyrun/blob/master/plugins/shell/src/lib.rs"
click node_actions "https://github.com/anyrun-org/anyrun/blob/master/plugins/actions/src/lib.rs"
click node_niri_focus "https://github.com/anyrun-org/anyrun/blob/master/plugins/niri-focus/src/lib.rs"
click node_randr_plugin "https://github.com/anyrun-org/anyrun/blob/master/plugins/randr/src/lib.rs"
click node_randr_backend "https://github.com/anyrun-org/anyrun/blob/master/plugins/randr/src/randr/mod.rs"
click node_hyprland "https://github.com/anyrun-org/anyrun/blob/master/plugins/randr/src/randr/hyprland.rs"
click node_dummy_backend "https://github.com/anyrun-org/anyrun/blob/master/plugins/randr/src/randr/dummy.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_cli,node_configuration,node_ui,node_plugin_views,node_provider_worker,node_user toneBlue
class node_plugin_contract toneAmber
class node_applications,node_desktop_entries,node_symbols,node_dictionary,node_kidex,node_websearch,node_translate,node_rink,node_nix_run,node_stdin toneMint
class node_shell,node_actions,node_niri_focus,node_randr_plugin,node_randr_backend,node_hyprland,node_dummy_backend toneRose
class node_provider_process toneIndigo
```

## Components

### Launcher runtime

- [CLI and daemon](https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/main.rs): `anyrun/src/main.rs`
- [Launcher config](https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/config.rs): `anyrun/src/config.rs`
- [GTK launcher UI](https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/app.rs): `anyrun/src/app.rs`
- [Plugin match views](https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/plugin_box.rs): `anyrun/src/plugin_box.rs`
- [Provider IPC worker](https://github.com/anyrun-org/anyrun/blob/master/anyrun/src/provider.rs): `anyrun/src/provider.rs`

### Plugin interface

- [Plugin API](https://github.com/anyrun-org/anyrun/blob/master/anyrun-plugin/src/lib.rs): `anyrun-plugin/src/lib.rs`

### Search plugins

- [Applications search](https://github.com/anyrun-org/anyrun/blob/master/plugins/applications/src/lib.rs): `plugins/applications/src/lib.rs`
- [Desktop entry parsing](https://github.com/anyrun-org/anyrun/blob/master/plugins/applications/src/scrubber.rs): `plugins/applications/src/scrubber.rs`
- [Unicode symbols](https://github.com/anyrun-org/anyrun/blob/master/plugins/symbols/src/lib.rs): `plugins/symbols/src/lib.rs`
- [Word definitions](https://github.com/anyrun-org/anyrun/blob/master/plugins/dictionary/src/lib.rs): `plugins/dictionary/src/lib.rs`
- [File search](https://github.com/anyrun-org/anyrun/blob/master/plugins/kidex/src/lib.rs): `plugins/kidex/src/lib.rs`
- [Web search](https://github.com/anyrun-org/anyrun/blob/master/plugins/websearch/src/lib.rs): `plugins/websearch/src/lib.rs`
- [Translation](https://github.com/anyrun-org/anyrun/blob/master/plugins/translate/src/lib.rs): `plugins/translate/src/lib.rs`
- [Calculator and units](https://github.com/anyrun-org/anyrun/blob/master/plugins/rink/src/lib.rs): `plugins/rink/src/lib.rs`
- [Nix app launch](https://github.com/anyrun-org/anyrun/blob/master/plugins/nix-run/src/lib.rs): `plugins/nix-run/src/lib.rs`
- [Stdin selector](https://github.com/anyrun-org/anyrun/blob/master/plugins/stdin/src/lib.rs): `plugins/stdin/src/lib.rs`

### Action plugins

- [Shell commands](https://github.com/anyrun-org/anyrun/blob/master/plugins/shell/src/lib.rs): `plugins/shell/src/lib.rs`
- [Power and commands](https://github.com/anyrun-org/anyrun/blob/master/plugins/actions/src/lib.rs): `plugins/actions/src/lib.rs`
- [Niri window focus](https://github.com/anyrun-org/anyrun/blob/master/plugins/niri-focus/src/lib.rs): `plugins/niri-focus/src/lib.rs`
- [Monitor configuration](https://github.com/anyrun-org/anyrun/blob/master/plugins/randr/src/lib.rs): `plugins/randr/src/lib.rs`
- [Randr backends](https://github.com/anyrun-org/anyrun/blob/master/plugins/randr/src/randr/mod.rs): `plugins/randr/src/randr/mod.rs`
- [Hyprland backend](https://github.com/anyrun-org/anyrun/blob/master/plugins/randr/src/randr/hyprland.rs): `plugins/randr/src/randr/hyprland.rs`
- [Dummy backend](https://github.com/anyrun-org/anyrun/blob/master/plugins/randr/src/randr/dummy.rs): `plugins/randr/src/randr/dummy.rs`

### Other components

- **User**
- **anyrun-provider**

## Connections

- User → CLI and daemon: starts or shows (evidence: `anyrun/src/main.rs`)
- CLI and daemon → Launcher config: loads settings (evidence: `anyrun/src/main.rs`)
- CLI and daemon → GTK launcher UI: launches (evidence: `anyrun/src/main.rs`)
- GTK launcher UI → Provider IPC worker: starts worker (evidence: `anyrun/src/app.rs`)
- Provider IPC worker → anyrun-provider: spawns and exchanges IPC (evidence: `anyrun/src/provider.rs`)
- GTK launcher UI → Provider IPC worker: sends queries (evidence: `anyrun/src/app.rs`)
- GTK launcher UI → Plugin match views: updates match views (evidence: `anyrun/src/app.rs`)
- Applications search → Desktop entry parsing: uses parsed entries (evidence: `plugins/applications/src/lib.rs`)
- Monitor configuration → Randr backends: uses backend API (evidence: `plugins/randr/src/lib.rs`)
- Randr backends → Hyprland backend: selects by compositor (evidence: `plugins/randr/src/randr/mod.rs`)
- Randr backends → Dummy backend: selects fallback (evidence: `plugins/randr/src/randr/mod.rs`)
- anyrun-provider → Plugin API: uses plugin API
- anyrun-provider → Applications search: dispatches plugin work
- anyrun-provider → Unicode symbols: dispatches plugin work
- anyrun-provider → Word definitions: dispatches plugin work
- anyrun-provider → File search: dispatches plugin work
- anyrun-provider → Web search: dispatches plugin work
- anyrun-provider → Translation: dispatches plugin work
- anyrun-provider → Calculator and units: dispatches plugin work
- anyrun-provider → Nix app launch: dispatches plugin work
- anyrun-provider → Stdin selector: dispatches plugin work
- anyrun-provider → Shell commands: dispatches plugin work
- anyrun-provider → Power and commands: dispatches plugin work
- anyrun-provider → Niri window focus: dispatches plugin work
- anyrun-provider → Monitor configuration: dispatches plugin work
