# dwizsharma/jarvis-linux architecture

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

- Interactive diagram: https://gitdiagram.com/dwizsharma/jarvis-linux
- Repository: https://github.com/dwizsharma/jarvis-linux

## Overview

Jarvis is a headless, offline voice assistant for Linux. Its main workflow is to load voice settings, listen for a wake phrase and command, parse the command, operate the desktop through AT-SPI or launch an app, then speak a response. The README also documents multilingual recognition, screenshots, and configurable voice feedback. The sampled code shows the core dispatch and desktop operations; unsampled wake-loop details and some platform wiring are represented only where the README supports them.

Main entry points: [`src/jarvis/wake.py`](https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/wake.py) (Wake and speech loop), [`src/jarvis/accessibility.py`](https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/accessibility.py) (AT-SPI desktop controls), [`src/jarvis/commands.py`](https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/commands.py) (Command parser), [`src/jarvis/settings.py`](https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/settings.py) (Voice settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Voice workflow"]
  node_entry["Jarvis entry<br/>[app.py]"]
  node_wake["Wake and speech loop<br/>[wake.py]"]
  node_parser["Command parser<br/>[commands.py]"]
  node_models[("Vosk models")]
end

subgraph group_config["Configuration"]
  node_settings["Voice settings<br/>[settings.py]"]
  node_configfile["TOML config"]
end

subgraph group_desktop["Desktop integrations"]
  node_desktop["AT-SPI desktop controls<br/>[accessibility.py]"]
end

node_user(("User"))
node_microphone(("Microphone"))
node_appregistry["Desktop app registry"]
node_screenshots["Screenshot tools"]
node_speech["Speech Dispatcher"]
node_notify["Desktop notifications"]

node_user -->|"speaks to"| node_microphone
node_entry -->|"starts"| node_wake
node_wake -->|"loads"| node_settings
node_configfile -->|"configures"| node_settings
node_microphone -->|"streams audio"| node_wake
node_models -->|"recognizes speech"| node_wake
node_wake -->|"dispatches commands"| node_parser
node_wake -->|"supplies action handlers"| node_desktop
node_parser -->|"invokes handlers"| node_desktop
node_desktop -->|"launches apps through"| node_appregistry
node_desktop -->|"runs screenshot tool"| node_screenshots
node_wake -->|"speaks responses"| node_speech
node_wake -->|"reports errors"| node_notify

click node_entry "https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/app.py"
click node_wake "https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/wake.py"
click node_parser "https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/commands.py"
click node_settings "https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/settings.py"
click node_desktop "https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/accessibility.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_entry,node_wake,node_parser,node_models,node_user,node_screenshots toneBlue
class node_settings,node_configfile toneAmber
class node_desktop toneMint
class node_microphone,node_appregistry,node_speech,node_notify toneIndigo
```

## Components

### Voice workflow

- [Jarvis entry](https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/app.py): `src/jarvis/app.py`
- [Wake and speech loop](https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/wake.py): `src/jarvis/wake.py`
- [Command parser](https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/commands.py): `src/jarvis/commands.py`
- **Vosk models**

### Configuration

- [Voice settings](https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/settings.py): `src/jarvis/settings.py`
- **TOML config**

### Desktop integrations

- [AT-SPI desktop controls](https://github.com/dwizsharma/jarvis-linux/blob/main/src/jarvis/accessibility.py): `src/jarvis/accessibility.py`

### Other components

- **User**
- **Microphone**
- **Desktop app registry**
- **Screenshot tools**
- **Speech Dispatcher**
- **Desktop notifications**

## Connections

- User → Microphone: speaks to (evidence: `README.md`)
- Jarvis entry → Wake and speech loop: starts (evidence: `src/jarvis/app.py`)
- Wake and speech loop → Voice settings: loads (evidence: `src/jarvis/wake.py`)
- TOML config → Voice settings: configures (evidence: `README.md`)
- Microphone → Wake and speech loop: streams audio (evidence: `README.md`)
- Vosk models → Wake and speech loop: recognizes speech (evidence: `README.md`)
- Wake and speech loop → Command parser: dispatches commands (evidence: `src/jarvis/wake.py`)
- Wake and speech loop → AT-SPI desktop controls: supplies action handlers (evidence: `src/jarvis/wake.py`)
- Command parser → AT-SPI desktop controls: invokes handlers (evidence: `src/jarvis/commands.py`)
- AT-SPI desktop controls → Desktop app registry: launches apps through (evidence: `src/jarvis/accessibility.py`)
- AT-SPI desktop controls → Screenshot tools: runs screenshot tool (evidence: `src/jarvis/accessibility.py`)
- Wake and speech loop → Speech Dispatcher: speaks responses (evidence: `src/jarvis/wake.py`)
- Wake and speech loop → Desktop notifications: reports errors (evidence: `src/jarvis/wake.py`)
