# chadnpc/argparser architecture

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

## Overview

argparser is a small PowerShell utility that converts command-line argument strings into typed parameter values. The documented workflow is: a PowerShell caller provides argument tokens and a schema to `ConvertTo-Params`, which returns a dictionary of parameter objects. The tree identifies the module and public function paths; source excerpts were unavailable, so internal parsing steps and module-export wiring are not shown.

Main entry points: [`Public/ConvertTo-Params.ps1`](https://github.com/chadnpc/argparser/blob/main/Public/ConvertTo-Params.ps1) (ConvertTo-Params), [`argparser.psm1`](https://github.com/chadnpc/argparser/blob/main/argparser.psm1) (argparser module)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("PowerShell caller"))
node_arguments["Argument tokens"]
node_schema["Parameter schema"]
node_convert["ConvertTo-Params"]
node_result["Typed parameter dictionary"]
node_module["argparser module<br/>[argparser.psm1]"]

node_caller -->|"imports"| node_module
node_caller -->|"calls"| node_convert
node_caller -->|"provides"| node_arguments
node_caller -->|"provides"| node_schema
node_arguments -->|"parses"| node_convert
node_schema -->|"configures"| node_convert
node_convert -->|"returns"| node_result

click node_convert "https://github.com/chadnpc/argparser/blob/main/Public/ConvertTo-Params.ps1"
click node_module "https://github.com/chadnpc/argparser/blob/main/argparser.psm1"

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_caller,node_arguments,node_schema,node_result toneIndigo
class node_convert,node_module toneTeal
```

## Components

### Other components

- **PowerShell caller**
- **Argument tokens**
- **Parameter schema**
- [ConvertTo-Params](https://github.com/chadnpc/argparser/blob/main/Public/ConvertTo-Params.ps1): `Public/ConvertTo-Params.ps1`
- **Typed parameter dictionary**
- [argparser module](https://github.com/chadnpc/argparser/blob/main/argparser.psm1): `argparser.psm1`

## Connections

- PowerShell caller → argparser module: imports
- PowerShell caller → ConvertTo-Params: calls
- PowerShell caller → Argument tokens: provides
- PowerShell caller → Parameter schema: provides
- Argument tokens → ConvertTo-Params: parses
- Parameter schema → ConvertTo-Params: configures
- ConvertTo-Params → Typed parameter dictionary: returns
