# cmderdev/cmder architecture

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

- Interactive diagram: https://gitdiagram.com/cmderdev/cmder
- Repository: https://github.com/cmderdev/cmder

## Overview

Cmder packages a portable Windows console experience around the ConEmu terminal, with configurable shell tasks, profile customization, and optional user-provided tools. The main workflow is launching Cmder, selecting startup options and configuration, then opening a shell in ConEmu; users can also register Explorer context-menu shortcuts. The launcher excerpt shows argument parsing, configuration handling, and ConEmu startup, while README statements support the broader shell and customization capabilities. Other runtime directories are unsampled, so their internal wiring is not inferred.

Main entry points: [`launcher/src/CmderLauncher.cpp`](https://github.com/cmderdev/cmder/blob/master/launcher/src/CmderLauncher.cpp) (Cmder launcher), [`config/profile.d`](https://github.com/cmderdev/cmder/tree/master/config/profile.d) (Profile scripts), [`config`](https://github.com/cmderdev/cmder/tree/master/config) (Terminal settings), [`bin`](https://github.com/cmderdev/cmder/tree/master/bin) (Custom executables)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launch and Integration"]
  node_launcher["Cmder launcher<br/>[CmderLauncher.cpp]"]
  node_shell_menu["Explorer context menu<br/>[CmderLauncher.cpp]"]
end

subgraph group_shells["Terminal and Shells"]
  node_conemu["ConEmu terminal"]
  node_cmd["CMD shell"]
  node_powershell["PowerShell shell"]
  node_bash["Bash and Mintty"]
  node_shell_tasks["Shell task presets"]
  node_git_clink["Git and Clink"]
end

subgraph group_customization["Configuration and Customization"]
  node_settings["Terminal settings"]
  node_profiles["Profile scripts<br/>[profile.d]"]
  node_aliases["User aliases"]
  node_prompt["Prompt enhancements<br/>[profile.d]"]
  node_user_config["Individual user config"]
end

subgraph group_tools["Portable Tools"]
  node_user_bin["Custom executables"]
  node_optional_apps["Optional app folders"]
end

node_user(("Windows user"))

node_user -->|"starts"| node_launcher
node_launcher -->|"selects settings"| node_settings
node_launcher -->|"creates config"| node_user_config
node_launcher -->|"starts terminal"| node_conemu
node_conemu -->|"runs task"| node_shell_tasks
node_shell_tasks -->|"starts shell"| node_cmd
node_shell_tasks -->|"starts shell"| node_powershell
node_shell_tasks -->|"starts shell"| node_bash
node_cmd -->|"uses enhancements"| node_git_clink
node_powershell -->|"uses Git"| node_git_clink
node_profiles -.->|"customizes prompt"| node_prompt
node_user -->|"customizes"| node_profiles
node_user -->|"customizes"| node_aliases
node_launcher -->|"registers shortcut"| node_shell_menu
node_user -->|"opens from Explorer"| node_shell_menu
node_user -->|"adds executables"| node_user_bin
node_user -->|"adds apps"| node_optional_apps

click node_launcher "https://github.com/cmderdev/cmder/blob/master/launcher/src/CmderLauncher.cpp"
click node_shell_menu "https://github.com/cmderdev/cmder/blob/master/launcher/src/CmderLauncher.cpp"
click node_settings "https://github.com/cmderdev/cmder/tree/master/config"
click node_profiles "https://github.com/cmderdev/cmder/tree/master/config/profile.d"
click node_aliases "https://github.com/cmderdev/cmder/tree/master/config"
click node_prompt "https://github.com/cmderdev/cmder/tree/master/config/profile.d"
click node_user_config "https://github.com/cmderdev/cmder/tree/master/config"
click node_user_bin "https://github.com/cmderdev/cmder/tree/master/bin"
click node_optional_apps "https://github.com/cmderdev/cmder/tree/master/opt"

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_launcher,node_shell_menu,node_user toneBlue
class node_conemu,node_cmd,node_powershell,node_bash,node_shell_tasks,node_git_clink toneAmber
class node_settings,node_profiles,node_aliases,node_prompt,node_user_config toneMint
class node_user_bin,node_optional_apps toneRose
```

## Components

### Launch and Integration

- [Cmder launcher](https://github.com/cmderdev/cmder/blob/master/launcher/src/CmderLauncher.cpp): `launcher/src/CmderLauncher.cpp`
- [Explorer context menu](https://github.com/cmderdev/cmder/blob/master/launcher/src/CmderLauncher.cpp): `launcher/src/CmderLauncher.cpp`

### Terminal and Shells

- **ConEmu terminal**
- **CMD shell**
- **PowerShell shell**
- **Bash and Mintty**
- **Shell task presets**
- **Git and Clink**

### Configuration and Customization

- [Terminal settings](https://github.com/cmderdev/cmder/tree/master/config): `config`
- [Profile scripts](https://github.com/cmderdev/cmder/tree/master/config/profile.d): `config/profile.d`
- [User aliases](https://github.com/cmderdev/cmder/tree/master/config): `config`
- [Prompt enhancements](https://github.com/cmderdev/cmder/tree/master/config/profile.d): `config/profile.d`
- [Individual user config](https://github.com/cmderdev/cmder/tree/master/config): `config`

### Portable Tools

- [Custom executables](https://github.com/cmderdev/cmder/tree/master/bin): `bin`
- [Optional app folders](https://github.com/cmderdev/cmder/tree/master/opt): `opt`

### Other components

- **Windows user**

## Connections

- Windows user → Cmder launcher: starts (evidence: `README.md`)
- Cmder launcher → Terminal settings: selects settings (evidence: `launcher/src/CmderLauncher.cpp`)
- Cmder launcher → Individual user config: creates config (evidence: `launcher/src/CmderLauncher.cpp`)
- Cmder launcher → ConEmu terminal: starts terminal (evidence: `launcher/src/CmderLauncher.cpp`)
- ConEmu terminal → Shell task presets: runs task (evidence: `README.md`)
- Shell task presets → CMD shell: starts shell (evidence: `README.md`)
- Shell task presets → PowerShell shell: starts shell (evidence: `README.md`)
- Shell task presets → Bash and Mintty: starts shell (evidence: `README.md`)
- CMD shell → Git and Clink: uses enhancements (evidence: `README.md`)
- PowerShell shell → Git and Clink: uses Git (evidence: `README.md`)
- Profile scripts → Prompt enhancements: customizes prompt
- Windows user → Profile scripts: customizes (evidence: `README.md`)
- Windows user → User aliases: customizes (evidence: `README.md`)
- Cmder launcher → Explorer context menu: registers shortcut (evidence: `README.md`)
- Windows user → Explorer context menu: opens from Explorer (evidence: `README.md`)
- Windows user → Custom executables: adds executables (evidence: `README.md`)
- Windows user → Optional app folders: adds apps (evidence: `README.md`)
