# dashtiasbb/codingagentcommander architecture

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

- Interactive diagram: https://gitdiagram.com/dashtiasbb/codingagentcommander
- Repository: https://github.com/dashtiasbb/codingagentcommander

## Overview

Commander is a macOS control deck for launching and managing concurrent Claude Code sessions across native Anthropic, LiteLLM-routed Zen, and Bedrock models. The main workflow runs from the Svelte interface through shared state and Wails bindings into the Go app, which coordinates configuration, session launch, tmux, and provider routing; a WebSocket carries terminal I/O. The graph also preserves documented model discovery, usage, remote-control, telemetry, and session-management capabilities. Some backend links are based on the source index or README because the relevant implementation excerpts are incomplete.

Main entry points: [`app.go`](https://github.com/dashtiasbb/codingagentcommander/blob/main/app.go) (App controller), [`frontend/src/App.svelte`](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/App.svelte) (App shell), [`frontend/src/lib/stores.svelte.js`](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/stores.svelte.js) (Shared app state), [`internal/launch/launch.go`](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/launch/launch.go) (Session launch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Control interface"]
  node_app_ui["App shell<br/>[App.svelte]"]
  node_session_ui["Session deck<br/>[SessionCard.svelte]"]
  node_launch_ui["Launch panel<br/>[LaunchPanel.svelte]"]
  node_palette["Command palette"]
  node_drawers["Provider and model drawers"]
  node_settings_ui["Settings and usage"]
end

subgraph group_management["App coordination"]
  node_state["Shared app state<br/>[stores.svelte.js]"]
  node_bindings["Wails bindings<br/>[App.js]"]
  node_backend["App controller<br/>[app.go]"]
end

subgraph group_sessions["Session runtime"]
  node_launch["Session launch<br/>[launch.go]"]
  node_tmux["tmux host<br/>[host.go]"]
  node_terminal_ui["Terminal view<br/>[Terminal.svelte]"]
  node_ws["WebSocket terminal<br/>[server.go]"]
  node_pty["PTY bridge<br/>[bridge.go]"]
  node_hook["Finish hook<br/>[hookmgr.go]"]
end

subgraph group_providers["Models and providers"]
  node_config["Model configuration<br/>[config.go]"]
  node_router["LiteLLM routing<br/>[controller.go]"]
  node_bedrock["Bedrock discovery<br/>[bedrock.go]"]
  node_zen["Zen discovery<br/>[zen.go]"]
end

subgraph group_support["Telemetry and settings"]
  node_pricing["Cost estimation<br/>[pricing.go]"]
  node_transcripts["Transcript telemetry<br/>[transcripts.go]"]
  node_usage["Plan usage<br/>[usage.go]"]
  node_secrets[("Keychain secrets")]
end

node_operator(("Operator"))
node_claude["Claude Code"]
node_litellm["LiteLLM proxy"]
node_aws["AWS Bedrock"]

node_operator -->|"uses"| node_app_ui
node_app_ui -->|"loads state"| node_state
node_app_ui -->|"renders"| node_session_ui
node_app_ui -->|"renders"| node_launch_ui
node_app_ui -->|"renders"| node_palette
node_app_ui -->|"renders"| node_drawers
node_app_ui -->|"renders"| node_settings_ui
node_state -->|"invokes"| node_bindings
node_bindings -.->|"dispatches"| node_backend
node_backend -->|"loads catalog"| node_config
node_backend -->|"launches sessions"| node_launch
node_backend -->|"configures routing"| node_router
node_backend -->|"discovers models"| node_bedrock
node_backend -->|"discovers models"| node_zen
node_backend -->|"creates host"| node_tmux
node_launch -->|"reads models"| node_config
node_launch -.->|"starts CLI"| node_claude
node_router -.->|"routes requests"| node_litellm
node_bedrock -.->|"discovers models"| node_aws
node_backend -->|"reads keys"| node_secrets
node_backend -->|"installs hook"| node_hook
node_backend -->|"serves terminal"| node_ws
node_terminal_ui -->|"streams I/O"| node_ws
node_ws -->|"opens bridge"| node_pty
node_pty -.->|"accesses session"| node_tmux
node_backend -->|"estimates cost"| node_pricing
node_backend -->|"reads telemetry"| node_transcripts
node_backend -.->|"provides usage"| node_usage
node_session_ui -.->|"requests actions"| node_state
node_drawers -->|"requests provider data"| node_state
node_settings_ui -->|"requests settings data"| node_state

click node_app_ui "https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/App.svelte"
click node_session_ui "https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/SessionCard.svelte"
click node_launch_ui "https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/LaunchPanel.svelte"
click node_palette "https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/CommandPalette.svelte"
click node_drawers "https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/ProvidersDrawer.svelte"
click node_settings_ui "https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/SettingsDrawer.svelte"
click node_state "https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/stores.svelte.js"
click node_bindings "https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/wailsjs/go/main/App.js"
click node_backend "https://github.com/dashtiasbb/codingagentcommander/blob/main/app.go"
click node_config "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/config/config.go"
click node_router "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/router/controller.go"
click node_bedrock "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/bedrock/bedrock.go"
click node_zen "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/zen/zen.go"
click node_launch "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/launch/launch.go"
click node_tmux "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/tmux/host.go"
click node_terminal_ui "https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/Terminal.svelte"
click node_ws "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/wsterm/server.go"
click node_pty "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/ptybridge/bridge.go"
click node_hook "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/hookmgr/hookmgr.go"
click node_pricing "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/pricing/pricing.go"
click node_transcripts "https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/transcripts/transcripts.go"
click node_usage "https://github.com/dashtiasbb/codingagentcommander/blob/main/usage.go"
click node_secrets "https://github.com/dashtiasbb/codingagentcommander/tree/main/internal/secrets"

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_app_ui,node_session_ui,node_launch_ui,node_palette,node_drawers,node_settings_ui toneBlue
class node_state,node_bindings,node_backend toneAmber
class node_launch,node_tmux,node_terminal_ui,node_ws,node_pty,node_hook toneMint
class node_config,node_router,node_bedrock,node_zen toneRose
class node_pricing,node_transcripts,node_usage,node_secrets,node_operator,node_claude,node_litellm,node_aws toneIndigo
```

## Components

### Control interface

- [App shell](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/App.svelte): `frontend/src/App.svelte`
- [Session deck](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/SessionCard.svelte): `frontend/src/lib/components/SessionCard.svelte`
- [Launch panel](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/LaunchPanel.svelte): `frontend/src/lib/components/LaunchPanel.svelte`
- [Command palette](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/CommandPalette.svelte): `frontend/src/lib/components/CommandPalette.svelte`
- [Provider and model drawers](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/ProvidersDrawer.svelte): `frontend/src/lib/components/ProvidersDrawer.svelte`
- [Settings and usage](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/components/SettingsDrawer.svelte): `frontend/src/lib/components/SettingsDrawer.svelte`

### App coordination

- [Shared app state](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/stores.svelte.js): `frontend/src/lib/stores.svelte.js`
- [Wails bindings](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/wailsjs/go/main/App.js): `frontend/wailsjs/go/main/App.js`
- [App controller](https://github.com/dashtiasbb/codingagentcommander/blob/main/app.go): `app.go`

### Session runtime

- [Session launch](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/launch/launch.go): `internal/launch/launch.go`
- [tmux host](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/tmux/host.go): `internal/tmux/host.go`
- [Terminal view](https://github.com/dashtiasbb/codingagentcommander/blob/main/frontend/src/lib/Terminal.svelte): `frontend/src/lib/Terminal.svelte`
- [WebSocket terminal](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/wsterm/server.go): `internal/wsterm/server.go`
- [PTY bridge](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/ptybridge/bridge.go): `internal/ptybridge/bridge.go`
- [Finish hook](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/hookmgr/hookmgr.go): `internal/hookmgr/hookmgr.go`

### Models and providers

- [Model configuration](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/config/config.go): `internal/config/config.go`
- [LiteLLM routing](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/router/controller.go): `internal/router/controller.go`
- [Bedrock discovery](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/bedrock/bedrock.go): `internal/bedrock/bedrock.go`
- [Zen discovery](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/zen/zen.go): `internal/zen/zen.go`

### Telemetry and settings

- [Cost estimation](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/pricing/pricing.go): `internal/pricing/pricing.go`
- [Transcript telemetry](https://github.com/dashtiasbb/codingagentcommander/blob/main/internal/transcripts/transcripts.go): `internal/transcripts/transcripts.go`
- [Plan usage](https://github.com/dashtiasbb/codingagentcommander/blob/main/usage.go): `usage.go`
- [Keychain secrets](https://github.com/dashtiasbb/codingagentcommander/tree/main/internal/secrets): `internal/secrets`

### Other components

- **Operator**
- **Claude Code**
- **LiteLLM proxy**
- **AWS Bedrock**

## Connections

- Operator → App shell: uses
- App shell → Shared app state: loads state (evidence: `frontend/src/App.svelte`)
- App shell → Session deck: renders (evidence: `frontend/src/App.svelte`)
- App shell → Launch panel: renders (evidence: `frontend/src/App.svelte`)
- App shell → Command palette: renders (evidence: `frontend/src/App.svelte`)
- App shell → Provider and model drawers: renders (evidence: `frontend/src/App.svelte`)
- App shell → Settings and usage: renders (evidence: `frontend/src/App.svelte`)
- Shared app state → Wails bindings: invokes (evidence: `frontend/src/lib/stores.svelte.js`)
- Wails bindings → App controller: dispatches
- App controller → Model configuration: loads catalog (evidence: `app.go`)
- App controller → Session launch: launches sessions (evidence: `app.go`)
- App controller → LiteLLM routing: configures routing (evidence: `app.go`)
- App controller → Bedrock discovery: discovers models (evidence: `app.go`)
- App controller → Zen discovery: discovers models (evidence: `app.go`)
- App controller → tmux host: creates host (evidence: `app.go`)
- Session launch → Model configuration: reads models (evidence: `internal/launch/launch.go`)
- Session launch → Claude Code: starts CLI
- LiteLLM routing → LiteLLM proxy: routes requests
- Bedrock discovery → AWS Bedrock: discovers models
- App controller → Keychain secrets: reads keys (evidence: `app.go`)
- App controller → Finish hook: installs hook
- App controller → WebSocket terminal: serves terminal (evidence: `app.go`)
- Terminal view → WebSocket terminal: streams I/O (evidence: `frontend/src/lib/Terminal.svelte`)
- WebSocket terminal → PTY bridge: opens bridge (evidence: `internal/wsterm/server.go`)
- PTY bridge → tmux host: accesses session
- App controller → Cost estimation: estimates cost (evidence: `app.go`)
- App controller → Transcript telemetry: reads telemetry (evidence: `app.go`)
- App controller → Plan usage: provides usage
- Session deck → Shared app state: requests actions
- Provider and model drawers → Shared app state: requests provider data (evidence: `frontend/src/lib/components/ProvidersDrawer.svelte`)
- Settings and usage → Shared app state: requests settings data (evidence: `frontend/src/lib/components/SettingsDrawer.svelte`)
