# b0red-man/pumice architecture

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

- Interactive diagram: https://gitdiagram.com/b0red-man/pumice
- Repository: https://github.com/b0red-man/pumice

## Overview

Pumice is a single-file CLI that keeps a plain-Markdown vault healthy. The main workflow is: a user edits notes, runs sync (manually or via its timer), Pumice repairs WikiLinks, commits changes, then pulls and pushes through Git. The README also documents note inspection and editing commands, vault configuration and lifecycle operations. All implementation nodes point to main.py; the relationships shown are documented in the README, since the excerpted source does not include the command handlers or their full call flow.

Main entry points: [`main.py`](https://github.com/b0red-man/pumice/blob/main/main.py) (Pumice CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Vault workflow"]
  node_cli["Pumice CLI<br/>[main.py]"]
  node_vault["Markdown vault"]
  node_link_repair["WikiLink repair<br/>[main.py]"]
  node_git_sync["Git commit and sync<br/>[main.py]"]
  node_git_remote["Git remote"]
  node_timer["Systemd user timer<br/>[main.py]"]
end

subgraph group_notes["Note operations"]
  node_status["Status<br/>[main.py]"]
  node_check["Dead links and orphans<br/>[main.py]"]
  node_backlinks["Backlinks<br/>[main.py]"]
  node_add_note["Append daily note<br/>[main.py]"]
end

subgraph group_lifecycle["Vault management"]
  node_config["Vault configuration<br/>[main.py]"]
  node_init["Initialize vault<br/>[main.py]"]
  node_doctor["Health checks<br/>[main.py]"]
  node_undo["Revert Pumice commit<br/>[main.py]"]
  node_uninstall["Remove timer<br/>[main.py]"]
end

node_user(("User or editor"))

node_user -->|"runs commands"| node_cli
node_user -->|"edits notes"| node_vault
node_cli -->|"sync repairs"| node_link_repair
node_link_repair -->|"rewrites links"| node_vault
node_cli -->|"sync commits"| node_git_sync
node_git_sync -->|"commits changes"| node_vault
node_git_sync -->|"pulls and pushes"| node_git_remote
node_timer -->|"runs sync"| node_cli
node_cli -->|"dispatches"| node_status
node_status -->|"reports state"| node_vault
node_cli -->|"dispatches"| node_check
node_check -->|"checks links"| node_vault
node_cli -->|"dispatches"| node_backlinks
node_backlinks -->|"finds references"| node_vault
node_cli -->|"dispatches"| node_add_note
node_add_note -->|"appends note"| node_vault
node_cli -->|"dispatches"| node_config
node_config -->|"reads and writes settings"| node_vault
node_cli -->|"dispatches"| node_init
node_init -->|"sets up vault"| node_vault
node_cli -->|"dispatches"| node_doctor
node_cli -->|"dispatches"| node_undo
node_undo -->|"reverts commit"| node_vault
node_cli -->|"dispatches"| node_uninstall
node_uninstall -->|"removes timer"| node_timer

click node_cli "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_link_repair "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_git_sync "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_timer "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_status "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_check "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_backlinks "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_add_note "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_config "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_init "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_doctor "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_undo "https://github.com/b0red-man/pumice/blob/main/main.py"
click node_uninstall "https://github.com/b0red-man/pumice/blob/main/main.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_cli,node_vault,node_link_repair,node_git_sync,node_git_remote,node_timer,node_user toneBlue
class node_status,node_check,node_backlinks,node_add_note toneAmber
class node_config,node_init,node_doctor,node_undo,node_uninstall toneMint
```

## Components

### Vault workflow

- [Pumice CLI](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- **Markdown vault**
- [WikiLink repair](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- [Git commit and sync](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- **Git remote**
- [Systemd user timer](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`

### Note operations

- [Status](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- [Dead links and orphans](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- [Backlinks](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- [Append daily note](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`

### Vault management

- [Vault configuration](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- [Initialize vault](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- [Health checks](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- [Revert Pumice commit](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`
- [Remove timer](https://github.com/b0red-man/pumice/blob/main/main.py): `main.py`

### Other components

- **User or editor**

## Connections

- User or editor → Pumice CLI: runs commands (evidence: `README.md`)
- User or editor → Markdown vault: edits notes (evidence: `README.md`)
- Pumice CLI → WikiLink repair: sync repairs (evidence: `README.md`)
- WikiLink repair → Markdown vault: rewrites links (evidence: `README.md`)
- Pumice CLI → Git commit and sync: sync commits (evidence: `README.md`)
- Git commit and sync → Markdown vault: commits changes (evidence: `README.md`)
- Git commit and sync → Git remote: pulls and pushes (evidence: `README.md`)
- Systemd user timer → Pumice CLI: runs sync (evidence: `README.md`)
- Pumice CLI → Status: dispatches (evidence: `README.md`)
- Status → Markdown vault: reports state (evidence: `README.md`)
- Pumice CLI → Dead links and orphans: dispatches (evidence: `README.md`)
- Dead links and orphans → Markdown vault: checks links (evidence: `README.md`)
- Pumice CLI → Backlinks: dispatches (evidence: `README.md`)
- Backlinks → Markdown vault: finds references (evidence: `README.md`)
- Pumice CLI → Append daily note: dispatches (evidence: `README.md`)
- Append daily note → Markdown vault: appends note (evidence: `README.md`)
- Pumice CLI → Vault configuration: dispatches (evidence: `README.md`)
- Vault configuration → Markdown vault: reads and writes settings (evidence: `README.md`)
- Pumice CLI → Initialize vault: dispatches (evidence: `README.md`)
- Initialize vault → Markdown vault: sets up vault (evidence: `README.md`)
- Pumice CLI → Health checks: dispatches (evidence: `README.md`)
- Pumice CLI → Revert Pumice commit: dispatches (evidence: `README.md`)
- Revert Pumice commit → Markdown vault: reverts commit (evidence: `README.md`)
- Pumice CLI → Remove timer: dispatches (evidence: `README.md`)
- Remove timer → Systemd user timer: removes timer (evidence: `README.md`)
