# toglefritz/splendid_cli architecture

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

- Interactive diagram: https://gitdiagram.com/toglefritz/splendid_cli
- Repository: https://github.com/toglefritz/splendid_cli

## Overview

Splendid CLI is a Flutter development toolkit exposed through a command-line interface, MCP tools, a GUI example, and IDE extensions. Its main workflow is a developer invoking a command, which dispatches project or source-maintenance work and produces generated files, project changes, or analysis results. The README documents the major capabilities; sampled implementation excerpts are limited, so links between command families and their services are shown only where their roles are supported by the tree and documentation.

Main entry points: [`lib/src/commands`](https://github.com/toglefritz/splendid_cli/tree/main/lib/src/commands) (Command handlers), [`bin/splendid_cli.dart`](https://github.com/toglefritz/splendid_cli/blob/main/bin/splendid_cli.dart) (CLI entry), [`lib/src/commands/format_all_command.dart`](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/format_all_command.dart) (Code formatting), [`lib/src/services/brick_loader.dart`](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/brick_loader.dart) (Brick loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_cli["CLI entry<br/>[splendid_cli.dart]"]
  node_cli_api["CLI API<br/>[splendid_cli.dart]"]
  node_commands["Command handlers"]
end

subgraph group_projects["Project creation"]
  node_create["Create projects"]
  node_project_service["Project service"]
  node_setup["Project setup<br/>[setup_command.dart]"]
  node_screen["Screen generation"]
  node_screen_service["Screen service"]
  node_bricks["Brick loading<br/>[brick_loader.dart]"]
  node_brick_cache["Brick cache<br/>[cache_command.dart]"]
  node_testgen["Test generation<br/>[test_command.dart]"]
  node_test_service["Test service<br/>[test_service.dart]"]
end

subgraph group_maintenance["Source maintenance"]
  node_format["Code formatting"]
  node_comment_format["Comment formatters"]
  node_doc_format["Dartdoc formatter"]
  node_sort["Sort localization"]
  node_enum_sort["Sort enums"]
  node_unused["Unused-code scans"]
  node_unused_l10n["Unused localization"]
  node_deep_clean["Deep clean"]
end

subgraph group_integrations["Developer integrations"]
  node_mcp["MCP server<br/>[mcp_server.dart]"]
  node_mcp_registry["MCP tool registry"]
  node_gui["GUI dashboard"]
  node_vscode["VS Code extension<br/>[extension.ts]"]
  node_intellij["IntelliJ actions"]
  node_intellij_exec["CLI executor"]
end

node_developer(("Developer"))
node_mason["Mason bricks"]
node_flutter["Flutter tooling"]
node_filesystem[("Project files")]
node_mcp_client(("MCP client"))
node_ide_user(("IDE user"))

node_developer -->|"invokes"| node_cli
node_cli -->|"starts"| node_cli_api
node_cli_api -->|"dispatches"| node_commands
node_commands -->|"dispatches"| node_create
node_commands -->|"dispatches"| node_setup
node_commands -->|"dispatches"| node_screen
node_commands -->|"dispatches"| node_testgen
node_commands -->|"dispatches"| node_format
node_create -->|"creates project"| node_project_service
node_project_service -->|"runs tooling"| node_flutter
node_screen -->|"generates screen"| node_screen_service
node_screen_service -->|"loads templates"| node_bricks
node_bricks -->|"loads bricks"| node_mason
node_bricks -->|"reads cache"| node_filesystem
node_brick_cache -->|"manages cache"| node_bricks
node_testgen -->|"generates tests"| node_test_service
node_format -->|"formats comments"| node_comment_format
node_format -->|"formats Dartdoc"| node_doc_format
node_format -->|"updates files"| node_filesystem
node_commands -->|"dispatches"| node_sort
node_commands -->|"dispatches"| node_enum_sort
node_commands -->|"dispatches"| node_unused
node_commands -->|"dispatches"| node_unused_l10n
node_commands -->|"dispatches"| node_deep_clean
node_mcp_client -->|"requests tools"| node_mcp
node_mcp -->|"resolves tools"| node_mcp_registry
node_gui -->|"runs commands"| node_cli
node_ide_user -->|"invokes actions"| node_vscode
node_vscode -->|"executes commands"| node_cli
node_ide_user -->|"invokes actions"| node_intellij
node_intellij -->|"executes through"| node_intellij_exec
node_intellij_exec -->|"runs commands"| node_cli

click node_cli "https://github.com/toglefritz/splendid_cli/blob/main/bin/splendid_cli.dart"
click node_cli_api "https://github.com/toglefritz/splendid_cli/blob/main/lib/splendid_cli.dart"
click node_commands "https://github.com/toglefritz/splendid_cli/tree/main/lib/src/commands"
click node_create "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/create_command.dart"
click node_project_service "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/project_service.dart"
click node_setup "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/setup_command.dart"
click node_screen "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/screen_command.dart"
click node_screen_service "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/screen_service.dart"
click node_bricks "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/brick_loader.dart"
click node_brick_cache "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/cache_command.dart"
click node_testgen "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/test_command.dart"
click node_test_service "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/test_service.dart"
click node_format "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/format_all_command.dart"
click node_comment_format "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/comment_formatter_service.dart"
click node_doc_format "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/dartdoc_formatter_service.dart"
click node_sort "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/l10n_sorter_service.dart"
click node_enum_sort "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/enum_sorter_service.dart"
click node_unused "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/unused_classes_service.dart"
click node_unused_l10n "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/unused_l10n_service.dart"
click node_deep_clean "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/deep_clean_command.dart"
click node_mcp "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/mcp/mcp_server.dart"
click node_mcp_registry "https://github.com/toglefritz/splendid_cli/blob/main/lib/src/mcp/mcp_tool_registry.dart"
click node_gui "https://github.com/toglefritz/splendid_cli/tree/main/example/gui_dashboard/lib"
click node_vscode "https://github.com/toglefritz/splendid_cli/blob/main/plugins/vscode-plugin/src/extension.ts"
click node_intellij "https://github.com/toglefritz/splendid_cli/tree/main/plugins/intellij-plugin/src/main/kotlin/com/splendidcli/intellij/actions"
click node_intellij_exec "https://github.com/toglefritz/splendid_cli/blob/main/plugins/intellij-plugin/src/main/kotlin/com/splendidcli/intellij/services/CliExecutorService.kt"

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_cli,node_cli_api,node_commands,node_mcp_client,node_ide_user toneBlue
class node_create,node_project_service,node_setup,node_screen,node_screen_service,node_bricks,node_brick_cache,node_testgen,node_test_service,node_filesystem toneAmber
class node_format,node_comment_format,node_doc_format,node_sort,node_enum_sort,node_unused,node_unused_l10n,node_deep_clean toneMint
class node_mcp,node_mcp_registry,node_gui,node_vscode,node_intellij,node_intellij_exec toneRose
class node_developer,node_mason,node_flutter toneIndigo
```

## Components

### Entry points

- [CLI entry](https://github.com/toglefritz/splendid_cli/blob/main/bin/splendid_cli.dart): `bin/splendid_cli.dart`
- [CLI API](https://github.com/toglefritz/splendid_cli/blob/main/lib/splendid_cli.dart): `lib/splendid_cli.dart`
- [Command handlers](https://github.com/toglefritz/splendid_cli/tree/main/lib/src/commands): `lib/src/commands`

### Project creation

- [Create projects](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/create_command.dart): `lib/src/commands/create_command.dart`
- [Project service](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/project_service.dart): `lib/src/services/project_service.dart`
- [Project setup](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/setup_command.dart): `lib/src/commands/setup_command.dart`
- [Screen generation](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/screen_command.dart): `lib/src/commands/screen_command.dart`
- [Screen service](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/screen_service.dart): `lib/src/services/screen_service.dart`
- [Brick loading](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/brick_loader.dart): `lib/src/services/brick_loader.dart`
- [Brick cache](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/cache_command.dart): `lib/src/commands/cache_command.dart`
- [Test generation](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/test_command.dart): `lib/src/commands/test_command.dart`
- [Test service](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/test_service.dart): `lib/src/services/test_service.dart`

### Source maintenance

- [Code formatting](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/format_all_command.dart): `lib/src/commands/format_all_command.dart`
- [Comment formatters](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/comment_formatter_service.dart): `lib/src/services/comment_formatter_service.dart`
- [Dartdoc formatter](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/dartdoc_formatter_service.dart): `lib/src/services/dartdoc_formatter_service.dart`
- [Sort localization](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/l10n_sorter_service.dart): `lib/src/services/l10n_sorter_service.dart`
- [Sort enums](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/enum_sorter_service.dart): `lib/src/services/enum_sorter_service.dart`
- [Unused-code scans](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/unused_classes_service.dart): `lib/src/services/unused_classes_service.dart`
- [Unused localization](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/services/unused_l10n_service.dart): `lib/src/services/unused_l10n_service.dart`
- [Deep clean](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/commands/deep_clean_command.dart): `lib/src/commands/deep_clean_command.dart`

### Developer integrations

- [MCP server](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/mcp/mcp_server.dart): `lib/src/mcp/mcp_server.dart`
- [MCP tool registry](https://github.com/toglefritz/splendid_cli/blob/main/lib/src/mcp/mcp_tool_registry.dart): `lib/src/mcp/mcp_tool_registry.dart`
- [GUI dashboard](https://github.com/toglefritz/splendid_cli/tree/main/example/gui_dashboard/lib): `example/gui_dashboard/lib`
- [VS Code extension](https://github.com/toglefritz/splendid_cli/blob/main/plugins/vscode-plugin/src/extension.ts): `plugins/vscode-plugin/src/extension.ts`
- [IntelliJ actions](https://github.com/toglefritz/splendid_cli/tree/main/plugins/intellij-plugin/src/main/kotlin/com/splendidcli/intellij/actions): `plugins/intellij-plugin/src/main/kotlin/com/splendidcli/intellij/actions`
- [CLI executor](https://github.com/toglefritz/splendid_cli/blob/main/plugins/intellij-plugin/src/main/kotlin/com/splendidcli/intellij/services/CliExecutorService.kt): `plugins/intellij-plugin/src/main/kotlin/com/splendidcli/intellij/services/CliExecutorService.kt`

### Other components

- **Developer**
- **Mason bricks**
- **Flutter tooling**
- **Project files**
- **MCP client**
- **IDE user**

## Connections

- Developer → CLI entry: invokes
- CLI entry → CLI API: starts
- CLI API → Command handlers: dispatches
- Command handlers → Create projects: dispatches
- Command handlers → Project setup: dispatches
- Command handlers → Screen generation: dispatches
- Command handlers → Test generation: dispatches
- Command handlers → Code formatting: dispatches
- Create projects → Project service: creates project
- Project service → Flutter tooling: runs tooling
- Screen generation → Screen service: generates screen
- Screen service → Brick loading: loads templates
- Brick loading → Mason bricks: loads bricks
- Brick loading → Project files: reads cache
- Brick cache → Brick loading: manages cache
- Test generation → Test service: generates tests
- Code formatting → Comment formatters: formats comments
- Code formatting → Dartdoc formatter: formats Dartdoc
- Code formatting → Project files: updates files
- Command handlers → Sort localization: dispatches
- Command handlers → Sort enums: dispatches
- Command handlers → Unused-code scans: dispatches
- Command handlers → Unused localization: dispatches
- Command handlers → Deep clean: dispatches
- MCP client → MCP server: requests tools
- MCP server → MCP tool registry: resolves tools
- GUI dashboard → CLI entry: runs commands
- IDE user → VS Code extension: invokes actions
- VS Code extension → CLI entry: executes commands
- IDE user → IntelliJ actions: invokes actions
- IntelliJ actions → CLI executor: executes through
- CLI executor → CLI entry: runs commands
