# peter123gmai/devfabric architecture

> Architecture diagram of the GitHub repository peter123gmai/devfabric, 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/peter123gmai/devfabric
- Repository: https://github.com/peter123gmai/devfabric

## Overview

DevFabric is a small command-line tool: users select a built-in command, and `-run` executes one or more source files using extension-specific shell commands. The central runtime is implemented in `cli/cli.cpp`, with ANSI color constants in `libs/color.hpp`. The README also documents debug settings in `config/cli.cfg`, but the available source does not show how those settings are consumed. The README’s language list differs from the sampled executor’s extensions; the graph reflects the implementation shown.

Main entry points: [`cli/cli.cpp`](https://github.com/peter123gmai/devfabric/blob/main/cli/cli.cpp) (CLI application), [`libs/color.hpp`](https://github.com/peter123gmai/devfabric/blob/main/libs/color.hpp) (ANSI colors)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("CLI user"))
node_application["CLI application<br/>[cli.cpp]"]
node_builtins["Built-in commands<br/>[cli.cpp]"]
node_run["Run command<br/>[cli.cpp]"]
node_executor["File executor<br/>[cli.cpp]"]
node_runtimes["System runtimes"]
node_colors["ANSI colors<br/>[color.hpp]"]

node_user -->|"supplies arguments"| node_application
node_application -->|"dispatches command"| node_builtins
node_builtins -->|"invokes run"| node_run
node_run -->|"executes files"| node_executor
node_executor -->|"runs shell command"| node_runtimes
node_application -->|"uses error colors"| node_colors
node_run -->|"uses error colors"| node_colors
node_executor -->|"uses error colors"| node_colors

click node_application "https://github.com/peter123gmai/devfabric/blob/main/cli/cli.cpp"
click node_builtins "https://github.com/peter123gmai/devfabric/blob/main/cli/cli.cpp"
click node_run "https://github.com/peter123gmai/devfabric/blob/main/cli/cli.cpp"
click node_executor "https://github.com/peter123gmai/devfabric/blob/main/cli/cli.cpp"
click node_colors "https://github.com/peter123gmai/devfabric/blob/main/libs/color.hpp"

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_user toneBlue
class node_application,node_builtins,node_run,node_executor,node_colors toneTeal
class node_runtimes toneIndigo
```

## Components

### Other components

- **CLI user**
- [CLI application](https://github.com/peter123gmai/devfabric/blob/main/cli/cli.cpp): `cli/cli.cpp`
- [Built-in commands](https://github.com/peter123gmai/devfabric/blob/main/cli/cli.cpp): `cli/cli.cpp`
- [Run command](https://github.com/peter123gmai/devfabric/blob/main/cli/cli.cpp): `cli/cli.cpp`
- [File executor](https://github.com/peter123gmai/devfabric/blob/main/cli/cli.cpp): `cli/cli.cpp`
- **System runtimes**
- [ANSI colors](https://github.com/peter123gmai/devfabric/blob/main/libs/color.hpp): `libs/color.hpp`

## Connections

- CLI user → CLI application: supplies arguments (evidence: `cli/cli.cpp`)
- CLI application → Built-in commands: dispatches command (evidence: `cli/cli.cpp`)
- Built-in commands → Run command: invokes run (evidence: `cli/cli.cpp`)
- Run command → File executor: executes files (evidence: `cli/cli.cpp`)
- File executor → System runtimes: runs shell command (evidence: `cli/cli.cpp`)
- CLI application → ANSI colors: uses error colors (evidence: `cli/cli.cpp`)
- Run command → ANSI colors: uses error colors (evidence: `cli/cli.cpp`)
- File executor → ANSI colors: uses error colors (evidence: `cli/cli.cpp`)
