# noufel882/simple-shell-using-c-sharp architecture

> Architecture diagram of the GitHub repository noufel882/simple-shell-using-c-sharp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/noufel882/simple-shell-using-c-sharp
- Repository: https://github.com/noufel882/simple-shell-using-c-sharp

## Overview

This is a small interactive C# shell. The user enters a line, the shell tokenizes it and dispatches built-in commands or launches a process. Built-ins support directory changes, directory creation, console clearing, and exit. The single source file also owns command errors and process waiting; the repository provides no evidence of additional subsystems.

Main entry points: [`Program.cs`](https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs) (Shell Loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_shell["Shell Loop<br/>[Program.cs]"]
node_parser["Command Parser<br/>[Program.cs]"]
node_dispatcher["Command Dispatcher<br/>[Program.cs]"]
node_directories["Directory Commands<br/>[Program.cs]"]
node_process["Process Runner<br/>[Program.cs]"]
node_console["Console Controls<br/>[Program.cs]"]
node_errors["Error Reporting<br/>[Program.cs]"]
node_filesystem[("Filesystem")]
node_child["Child Process"]

node_user -->|"enters commands"| node_shell
node_shell -->|"shows prompt"| node_user
node_shell -->|"parses input"| node_parser
node_shell -->|"dispatches tokens"| node_dispatcher
node_dispatcher -->|"handles directory commands"| node_directories
node_dispatcher -->|"runs applications"| node_process
node_dispatcher -->|"clears console"| node_console
node_directories -->|"changes or creates directories"| node_filesystem
node_process -->|"starts and waits"| node_child
node_process -->|"reports failures"| node_errors
node_directories -->|"reports invalid paths"| node_errors

click node_shell "https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs"
click node_parser "https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs"
click node_dispatcher "https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs"
click node_directories "https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs"
click node_process "https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs"
click node_console "https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs"
click node_errors "https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs"

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_shell,node_parser,node_dispatcher,node_directories,node_process,node_console,node_errors toneTeal
class node_filesystem toneAmber
class node_child toneIndigo
```

## Components

### Other components

- **User**
- [Shell Loop](https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs): `Program.cs`
- [Command Parser](https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs): `Program.cs`
- [Command Dispatcher](https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs): `Program.cs`
- [Directory Commands](https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs): `Program.cs`
- [Process Runner](https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs): `Program.cs`
- [Console Controls](https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs): `Program.cs`
- [Error Reporting](https://github.com/noufel882/simple-shell-using-c-sharp/blob/main/Program.cs): `Program.cs`
- **Filesystem**
- **Child Process**

## Connections

- User → Shell Loop: enters commands (evidence: `Program.cs`)
- Shell Loop → User: shows prompt (evidence: `Program.cs`)
- Shell Loop → Command Parser: parses input (evidence: `Program.cs`)
- Shell Loop → Command Dispatcher: dispatches tokens (evidence: `Program.cs`)
- Command Dispatcher → Directory Commands: handles directory commands (evidence: `Program.cs`)
- Command Dispatcher → Process Runner: runs applications (evidence: `Program.cs`)
- Command Dispatcher → Console Controls: clears console (evidence: `Program.cs`)
- Directory Commands → Filesystem: changes or creates directories (evidence: `Program.cs`)
- Process Runner → Child Process: starts and waits (evidence: `Program.cs`)
- Process Runner → Error Reporting: reports failures (evidence: `Program.cs`)
- Directory Commands → Error Reporting: reports invalid paths (evidence: `Program.cs`)
