# turbo-forcing/pyos-cli architecture

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

- Interactive diagram: https://gitdiagram.com/turbo-forcing/pyos-cli
- Repository: https://github.com/turbo-forcing/pyos-cli

## Overview

PyOS is a command-line operating-system-style shell: users enter commands, the shell launches a script, and scripts provide utilities or dispatch to interactive workers. Its documented product description is the only README-level capability information; the sampled code shows command execution, help, scanning, system/date/about information, log cleanup, worker dispatch, and a calculator worker with multiple modes and macros. Some scripts and workers are unsampled, so their internal behavior and specific dispatch targets are not inferred.

Main entry points: [`Scripts`](https://github.com/turbo-forcing/pyos-cli/tree/master/Scripts) (Script commands), [`PyOS-Main.py`](https://github.com/turbo-forcing/pyos-cli/blob/master/PyOS-Main.py) (PyOS command loop), [`Scripts/worker/main.py`](https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/worker/main.py) (Worker launcher), [`Workers/calculator/main.py`](https://github.com/turbo-forcing/pyos-cli/blob/master/Workers/calculator/main.py) (Calculator modes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Command Shell"]
  node_shell["PyOS command loop<br/>[PyOS-Main.py]"]
  node_script_suite["Script commands"]
end

subgraph group_utilities["Shell Utilities"]
  node_help["Help listing<br/>[main.py]"]
  node_scan["Script and worker scan<br/>[main.py]"]
  node_system["System information<br/>[main.py]"]
  node_date["Date and time<br/>[main.py]"]
  node_about["About display<br/>[main.py]"]
  node_log_reset["Log cleanup<br/>[main.py]"]
  node_other_scripts["Other script commands"]
end

subgraph group_workers["Worker Runtime"]
  node_worker_dispatch["Worker launcher<br/>[main.py]"]
  node_worker_programs["Worker programs"]
  node_calculator["Calculator modes<br/>[main.py]"]
  node_macro_parser["Macro evaluation<br/>[main.py]"]
  node_macro_files["Calculator macros"]
end

subgraph group_state["Runtime State"]
  node_os_logs[("OS history logs")]
  node_worker_logs[("Worker history logs")]
end

node_user(("CLI user"))
node_local_system["Host system"]

node_user -->|"enters commands"| node_shell
node_shell -->|"launches scripts"| node_script_suite
node_script_suite -.->|"runs command"| node_help
node_script_suite -.->|"runs command"| node_scan
node_script_suite -.->|"runs command"| node_system
node_script_suite -.->|"runs command"| node_date
node_script_suite -.->|"runs command"| node_about
node_script_suite -.->|"runs command"| node_log_reset
node_script_suite -.->|"runs command"| node_other_scripts
node_script_suite -.->|"runs command"| node_worker_dispatch
node_worker_dispatch -->|"launches worker"| node_worker_programs
node_worker_programs -.->|"includes program"| node_calculator
node_calculator -->|"evaluates macros"| node_macro_parser
node_macro_parser -->|"reads macro files"| node_macro_files
node_calculator -->|"records activity"| node_worker_logs
node_shell -->|"records activity"| node_os_logs
node_worker_dispatch -->|"records activity"| node_os_logs
node_scan -->|"records activity"| node_os_logs
node_system -->|"reads system details"| node_local_system

click node_shell "https://github.com/turbo-forcing/pyos-cli/blob/master/PyOS-Main.py"
click node_script_suite "https://github.com/turbo-forcing/pyos-cli/tree/master/Scripts"
click node_help "https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/help/main.py"
click node_scan "https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/scan/main.py"
click node_system "https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/system/main.py"
click node_date "https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/date/main.py"
click node_about "https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/about/main.py"
click node_log_reset "https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/rstlogs/main.py"
click node_other_scripts "https://github.com/turbo-forcing/pyos-cli/tree/master/Scripts"
click node_worker_dispatch "https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/worker/main.py"
click node_worker_programs "https://github.com/turbo-forcing/pyos-cli/tree/master/Workers"
click node_calculator "https://github.com/turbo-forcing/pyos-cli/blob/master/Workers/calculator/main.py"
click node_macro_parser "https://github.com/turbo-forcing/pyos-cli/blob/master/Workers/calculator/main.py"
click node_macro_files "https://github.com/turbo-forcing/pyos-cli/tree/master/Workers/calculator/macros"
click node_os_logs "https://github.com/turbo-forcing/pyos-cli/tree/master/OShistory"
click node_worker_logs "https://github.com/turbo-forcing/pyos-cli/tree/master/Workers/calculator/WorkerHistory"

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_shell,node_script_suite,node_user toneBlue
class node_help,node_scan,node_system,node_date,node_about,node_log_reset,node_other_scripts toneAmber
class node_worker_dispatch,node_worker_programs,node_calculator,node_macro_parser,node_macro_files toneMint
class node_os_logs,node_worker_logs toneRose
class node_local_system toneIndigo
```

## Components

### Command Shell

- [PyOS command loop](https://github.com/turbo-forcing/pyos-cli/blob/master/PyOS-Main.py): `PyOS-Main.py`
- [Script commands](https://github.com/turbo-forcing/pyos-cli/tree/master/Scripts): `Scripts`

### Shell Utilities

- [Help listing](https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/help/main.py): `Scripts/help/main.py`
- [Script and worker scan](https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/scan/main.py): `Scripts/scan/main.py`
- [System information](https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/system/main.py): `Scripts/system/main.py`
- [Date and time](https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/date/main.py): `Scripts/date/main.py`
- [About display](https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/about/main.py): `Scripts/about/main.py`
- [Log cleanup](https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/rstlogs/main.py): `Scripts/rstlogs/main.py`
- [Other script commands](https://github.com/turbo-forcing/pyos-cli/tree/master/Scripts): `Scripts`

### Worker Runtime

- [Worker launcher](https://github.com/turbo-forcing/pyos-cli/blob/master/Scripts/worker/main.py): `Scripts/worker/main.py`
- [Worker programs](https://github.com/turbo-forcing/pyos-cli/tree/master/Workers): `Workers`
- [Calculator modes](https://github.com/turbo-forcing/pyos-cli/blob/master/Workers/calculator/main.py): `Workers/calculator/main.py`
- [Macro evaluation](https://github.com/turbo-forcing/pyos-cli/blob/master/Workers/calculator/main.py): `Workers/calculator/main.py`
- [Calculator macros](https://github.com/turbo-forcing/pyos-cli/tree/master/Workers/calculator/macros): `Workers/calculator/macros`

### Runtime State

- [OS history logs](https://github.com/turbo-forcing/pyos-cli/tree/master/OShistory): `OShistory`
- [Worker history logs](https://github.com/turbo-forcing/pyos-cli/tree/master/Workers/calculator/WorkerHistory): `Workers/calculator/WorkerHistory`

### Other components

- **CLI user**
- **Host system**

## Connections

- CLI user → PyOS command loop: enters commands (evidence: `PyOS-Main.py`)
- PyOS command loop → Script commands: launches scripts (evidence: `PyOS-Main.py`)
- Script commands → Help listing: runs command
- Script commands → Script and worker scan: runs command
- Script commands → System information: runs command
- Script commands → Date and time: runs command
- Script commands → About display: runs command
- Script commands → Log cleanup: runs command
- Script commands → Other script commands: runs command
- Script commands → Worker launcher: runs command
- Worker launcher → Worker programs: launches worker (evidence: `Scripts/worker/main.py`)
- Worker programs → Calculator modes: includes program
- Calculator modes → Macro evaluation: evaluates macros (evidence: `Workers/calculator/main.py`)
- Macro evaluation → Calculator macros: reads macro files (evidence: `Workers/calculator/main.py`)
- Calculator modes → Worker history logs: records activity (evidence: `Workers/calculator/main.py`)
- PyOS command loop → OS history logs: records activity (evidence: `PyOS-Main.py`)
- Worker launcher → OS history logs: records activity (evidence: `Scripts/worker/main.py`)
- Script and worker scan → OS history logs: records activity (evidence: `Scripts/scan/main.py`)
- System information → Host system: reads system details (evidence: `Scripts/system/main.py`)
