# whoisyurii/christ-cli architecture

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

- Interactive diagram: https://gitdiagram.com/whoisyurii/christ-cli
- Repository: https://github.com/whoisyurii/christ-cli

## Overview

christ-cli is a Rust Bible-reading CLI and interactive terminal browser. Users launch the browser or issue commands to read references, search, or retrieve a random verse; references are parsed and Scripture is resolved from bundled KJV data, cache, or the Bolls.life API, then displayed as plain text or a terminal view. The browser also supports localized book names, translations, live search, copying, themes, and saved reading preferences. The graph reflects sampled source and documented capabilities; some command and UI wiring is not shown in the excerpts.

Main entry points: [`src/app.rs`](https://github.com/whoisyurii/christ-cli/blob/main/src/app.rs) (Browser app), [`src/main.rs`](https://github.com/whoisyurii/christ-cli/blob/main/src/main.rs) (Command dispatch), [`src/api/mod.rs`](https://github.com/whoisyurii/christ-cli/blob/main/src/api/mod.rs) (Scripture resolver), [`src/ui/browser.rs`](https://github.com/whoisyurii/christ-cli/blob/main/src/ui/browser.rs) (Browser panels)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Command entry"]
  node_main["Command dispatch<br/>[main.rs]"]
  node_cli["CLI arguments<br/>[cli.rs]"]
  node_app["Browser app<br/>[app.rs]"]
end

subgraph group_scripture["Scripture retrieval"]
  node_reference["Reference parser<br/>[reference.rs]"]
  node_resolver["Scripture resolver<br/>[mod.rs]"]
  node_bolls["Bolls provider<br/>[bolls.rs]"]
  node_types["Verse types<br/>[types.rs]"]
  node_kjv["Bundled KJV<br/>[kjv.rs]"]
  node_books["Book catalog<br/>[books.rs]"]
  node_i18n["Localized names<br/>[books_i18n.rs]"]
end

subgraph group_experience["Reading experience"]
  node_browser["Browser panels<br/>[browser.rs]"]
  node_theme["Themes<br/>[theme.rs]"]
  node_banner["Startup banner<br/>[banner.rs]"]
  node_versecard["Verse display<br/>[verse_card.rs]"]
  node_clipboard["Clipboard copy<br/>[clipboard.rs]"]
end

subgraph group_state["Storage and services"]
  node_cache[("Translation cache<br/>[cache.rs]")]
  node_state[("Session state<br/>[state.rs]")]
end

node_reader(("Reader"))
node_api_service{{"Bolls.life"}}
node_system_clipboard{{"System clipboard"}}
node_terminal{{"Terminal"}}

node_reader -->|"runs command"| node_main
node_main -->|"parses arguments"| node_cli
node_main -->|"launches browser"| node_app
node_main -->|"parses reference"| node_reference
node_main -->|"requests Scripture"| node_resolver
node_main -->|"renders verse"| node_versecard
node_main -->|"prints output"| node_terminal
node_app -->|"loads chapters"| node_resolver
node_app -->|"updates and draws"| node_browser
node_app -->|"selects theme"| node_theme
node_app -->|"plays banner"| node_banner
node_app -->|"loads and saves"| node_state
node_app -->|"starts download"| node_cache
node_app -->|"copies selection"| node_clipboard
node_app -->|"renders interface"| node_terminal
node_resolver -->|"reads KJV"| node_kjv
node_resolver -->|"reads and writes"| node_cache
node_resolver -->|"normalizes book"| node_books
node_resolver -->|"fetches fallback"| node_bolls
node_resolver -->|"returns verses"| node_types
node_bolls -->|"requests translations"| node_api_service
node_browser -->|"lists books"| node_books
node_browser -->|"uses localized names"| node_i18n
node_browser -->|"checks cached data"| node_cache
node_clipboard -->|"writes selection"| node_system_clipboard

click node_main "https://github.com/whoisyurii/christ-cli/blob/main/src/main.rs"
click node_cli "https://github.com/whoisyurii/christ-cli/blob/main/src/cli.rs"
click node_app "https://github.com/whoisyurii/christ-cli/blob/main/src/app.rs"
click node_reference "https://github.com/whoisyurii/christ-cli/blob/main/src/data/reference.rs"
click node_resolver "https://github.com/whoisyurii/christ-cli/blob/main/src/api/mod.rs"
click node_bolls "https://github.com/whoisyurii/christ-cli/blob/main/src/api/bolls.rs"
click node_types "https://github.com/whoisyurii/christ-cli/blob/main/src/api/types.rs"
click node_kjv "https://github.com/whoisyurii/christ-cli/blob/main/src/data/kjv.rs"
click node_books "https://github.com/whoisyurii/christ-cli/blob/main/src/data/books.rs"
click node_i18n "https://github.com/whoisyurii/christ-cli/blob/main/src/data/books_i18n.rs"
click node_browser "https://github.com/whoisyurii/christ-cli/blob/main/src/ui/browser.rs"
click node_theme "https://github.com/whoisyurii/christ-cli/blob/main/src/ui/theme.rs"
click node_banner "https://github.com/whoisyurii/christ-cli/blob/main/src/ui/banner.rs"
click node_versecard "https://github.com/whoisyurii/christ-cli/blob/main/src/ui/verse_card.rs"
click node_clipboard "https://github.com/whoisyurii/christ-cli/blob/main/src/clipboard.rs"
click node_cache "https://github.com/whoisyurii/christ-cli/blob/main/src/store/cache.rs"
click node_state "https://github.com/whoisyurii/christ-cli/blob/main/src/store/state.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_main,node_cli,node_app toneBlue
class node_reference,node_resolver,node_bolls,node_types,node_kjv,node_books,node_i18n toneAmber
class node_browser,node_theme,node_banner,node_versecard,node_clipboard toneMint
class node_cache,node_state toneRose
class node_reader,node_api_service,node_system_clipboard,node_terminal toneIndigo
```

## Components

### Command entry

- [Command dispatch](https://github.com/whoisyurii/christ-cli/blob/main/src/main.rs): `src/main.rs`
- [CLI arguments](https://github.com/whoisyurii/christ-cli/blob/main/src/cli.rs): `src/cli.rs`
- [Browser app](https://github.com/whoisyurii/christ-cli/blob/main/src/app.rs): `src/app.rs`

### Scripture retrieval

- [Reference parser](https://github.com/whoisyurii/christ-cli/blob/main/src/data/reference.rs): `src/data/reference.rs`
- [Scripture resolver](https://github.com/whoisyurii/christ-cli/blob/main/src/api/mod.rs): `src/api/mod.rs`
- [Bolls provider](https://github.com/whoisyurii/christ-cli/blob/main/src/api/bolls.rs): `src/api/bolls.rs`
- [Verse types](https://github.com/whoisyurii/christ-cli/blob/main/src/api/types.rs): `src/api/types.rs`
- [Bundled KJV](https://github.com/whoisyurii/christ-cli/blob/main/src/data/kjv.rs): `src/data/kjv.rs`
- [Book catalog](https://github.com/whoisyurii/christ-cli/blob/main/src/data/books.rs): `src/data/books.rs`
- [Localized names](https://github.com/whoisyurii/christ-cli/blob/main/src/data/books_i18n.rs): `src/data/books_i18n.rs`

### Reading experience

- [Browser panels](https://github.com/whoisyurii/christ-cli/blob/main/src/ui/browser.rs): `src/ui/browser.rs`
- [Themes](https://github.com/whoisyurii/christ-cli/blob/main/src/ui/theme.rs): `src/ui/theme.rs`
- [Startup banner](https://github.com/whoisyurii/christ-cli/blob/main/src/ui/banner.rs): `src/ui/banner.rs`
- [Verse display](https://github.com/whoisyurii/christ-cli/blob/main/src/ui/verse_card.rs): `src/ui/verse_card.rs`
- [Clipboard copy](https://github.com/whoisyurii/christ-cli/blob/main/src/clipboard.rs): `src/clipboard.rs`

### Storage and services

- [Translation cache](https://github.com/whoisyurii/christ-cli/blob/main/src/store/cache.rs): `src/store/cache.rs`
- [Session state](https://github.com/whoisyurii/christ-cli/blob/main/src/store/state.rs): `src/store/state.rs`

### Other components

- **Reader**
- **Bolls.life**
- **System clipboard**
- **Terminal**

## Connections

- Reader → Command dispatch: runs command
- Command dispatch → CLI arguments: parses arguments
- Command dispatch → Browser app: launches browser
- Command dispatch → Reference parser: parses reference
- Command dispatch → Scripture resolver: requests Scripture
- Command dispatch → Verse display: renders verse
- Command dispatch → Terminal: prints output
- Browser app → Scripture resolver: loads chapters
- Browser app → Browser panels: updates and draws
- Browser app → Themes: selects theme
- Browser app → Startup banner: plays banner
- Browser app → Session state: loads and saves
- Browser app → Translation cache: starts download
- Browser app → Clipboard copy: copies selection
- Browser app → Terminal: renders interface
- Scripture resolver → Bundled KJV: reads KJV
- Scripture resolver → Translation cache: reads and writes
- Scripture resolver → Book catalog: normalizes book
- Scripture resolver → Bolls provider: fetches fallback
- Scripture resolver → Verse types: returns verses
- Bolls provider → Bolls.life: requests translations
- Browser panels → Book catalog: lists books
- Browser panels → Localized names: uses localized names
- Browser panels → Translation cache: checks cached data
- Clipboard copy → System clipboard: writes selection
