# alexey1312/laner architecture

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

## Overview

Laner is a Swift-native CI/CD CLI for Apple-platform projects. The principal workflow is to load a Swift Lanerfile, select and execute a lane’s typed actions, and produce build artifacts or a TestFlight distribution; users can also invoke build, test, code-signing, and device-registration commands directly. The graph preserves these documented capabilities and the supporting execution, Xcode, signing, and upload layers. Several links rely on README documentation or SOURCE INDEX references because command and action implementations were not sampled.

Main entry points: [`Sources/LanerCore/Commands`](https://github.com/alexey1312/laner/tree/main/Sources/LanerCore/Commands) (CLI commands), [`Sources/LanerMatch/Services/MatchService.swift`](https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/MatchService.swift) (Signing service), [`Sources/LanerMatch/Services/TestFlightService.swift`](https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/TestFlightService.swift) (TestFlight upload), [`Sources/LanerDSL/Actions/Functions.swift`](https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Actions/Functions.swift) (Typed actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflows"]
  node_entry["CLI entry<br/>[main.swift]"]
  node_commands["CLI commands"]
  node_manifest["Manifest loader"]
  node_lanecommand["Lane command<br/>[LaneCommand.swift]"]
  node_buildcommand["Build command<br/>[BuildCommand.swift]"]
  node_testcommand["Test command<br/>[TestCommand.swift]"]
  node_matchcommand["Match command<br/>[MatchCommand.swift]"]
  node_uploadcommand["Upload command"]
end

subgraph group_dsl["Lane DSL"]
  node_lanerfile["Lanerfile DSL<br/>[Lanerfile.swift]"]
  node_lane["Lane runner<br/>[Lane.swift]"]
  node_dispatcher["Action dispatcher"]
  node_actions["Typed actions<br/>[Functions.swift]"]
  node_action["Action protocol<br/>[Action.swift]"]
  node_context["Execution context"]
  node_environment["CI environment<br/>[Environment.swift]"]
  node_artifacts["Build artifacts<br/>[Artifact.swift]"]
end

subgraph group_kit["Execution tools"]
  node_xcode["Xcode operations"]
  node_shell["Shell executor"]
  node_platform["Platform detection<br/>[Platform.swift]"]
  node_logging["Structured logging"]
end

subgraph group_match["Signing and distribution"]
  node_matchservice["Signing service<br/>[MatchService.swift]"]
  node_gitstorage[("Git signing storage<br/>[GitStorage.swift]")]
  node_crypto["Certificate crypto"]
  node_keychain["Keychain install"]
  node_asc["App Store Connect API"]
  node_testflight["TestFlight upload"]
  node_uploader["Chunked uploader"]
end

node_user(("Developer"))
node_apple{{"Apple services"}}
node_gitremote[("Git remote")]
node_xcodeapp{{"Xcode build tools"}}
node_testers(("Beta testers"))

node_user -->|"runs"| node_entry
node_entry -->|"dispatches"| node_commands
node_commands -->|"loads lanes"| node_manifest
node_commands -.->|"builds directly"| node_buildcommand
node_commands -.->|"tests directly"| node_testcommand
node_commands -->|"manages signing"| node_matchcommand
node_commands -.->|"uploads builds"| node_uploadcommand
node_lanecommand -.->|"loads manifest"| node_manifest
node_manifest -->|"compiles manifest"| node_lanerfile
node_lanecommand -.->|"runs selected lane"| node_lane
node_lane -->|"dispatches actions"| node_dispatcher
node_dispatcher -->|"creates actions"| node_actions
node_actions -.->|"implements"| node_action
node_lane -->|"provides context"| node_context
node_context -->|"holds environment"| node_environment
node_context -->|"collects artifacts"| node_artifacts
node_actions -.->|"builds and tests"| node_xcode
node_context -->|"provides executor"| node_shell
node_xcode -->|"runs commands"| node_shell
node_xcode -.->|"invokes"| node_xcodeapp
node_environment -.->|"detects CI"| node_platform
node_matchcommand -->|"runs sync"| node_matchservice
node_matchservice -->|"reads and writes"| node_gitstorage
node_matchservice -->|"encrypts certificates"| node_crypto
node_matchservice -.->|"installs credentials"| node_keychain
node_matchservice -->|"manages certificates"| node_asc
node_gitstorage -->|"clones and pushes"| node_gitremote
node_asc -->|"sends API requests"| node_apple
node_uploadcommand -.->|"starts upload"| node_testflight
node_actions -.->|"uploads via pilot"| node_testflight
node_testflight -->|"creates build upload"| node_asc
node_testflight -->|"uploads chunks"| node_uploader
node_uploader -.->|"transfers IPA"| node_apple
node_testflight -.->|"distributes build"| node_testers

click node_entry "https://github.com/alexey1312/laner/blob/main/Sources/laner/main.swift"
click node_commands "https://github.com/alexey1312/laner/tree/main/Sources/LanerCore/Commands"
click node_manifest "https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Manifest/ManifestLoader.swift"
click node_lanecommand "https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/LaneCommand.swift"
click node_buildcommand "https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/BuildCommand.swift"
click node_testcommand "https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/TestCommand.swift"
click node_matchcommand "https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/MatchCommand.swift"
click node_uploadcommand "https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/UploadCommand.swift"
click node_lanerfile "https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Manifest/Lanerfile.swift"
click node_lane "https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Lane.swift"
click node_dispatcher "https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/ActionDispatcher.swift"
click node_actions "https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Actions/Functions.swift"
click node_action "https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Action.swift"
click node_context "https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/ExecutionContext.swift"
click node_environment "https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Environment.swift"
click node_artifacts "https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Artifact.swift"
click node_xcode "https://github.com/alexey1312/laner/blob/main/Sources/LanerKit/Xcodebuild/XcodebuildExecutor.swift"
click node_shell "https://github.com/alexey1312/laner/blob/main/Sources/LanerKit/ShellExecutor.swift"
click node_platform "https://github.com/alexey1312/laner/blob/main/Sources/LanerKit/Platform.swift"
click node_logging "https://github.com/alexey1312/laner/blob/main/Sources/LanerKit/Logging/LoggingConfiguration.swift"
click node_matchservice "https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/MatchService.swift"
click node_gitstorage "https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Storage/GitStorage.swift"
click node_crypto "https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/CryptoService.swift"
click node_keychain "https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/KeychainService.swift"
click node_asc "https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/API/AppStoreConnectAPI.swift"
click node_testflight "https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/TestFlightService.swift"
click node_uploader "https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/ChunkedUploader.swift"

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_entry,node_commands,node_manifest,node_lanecommand,node_buildcommand,node_testcommand,node_matchcommand,node_uploadcommand toneBlue
class node_lanerfile,node_lane,node_dispatcher,node_actions,node_action,node_context,node_environment,node_artifacts,node_gitremote toneAmber
class node_xcode,node_shell,node_platform,node_logging toneMint
class node_matchservice,node_gitstorage,node_crypto,node_keychain,node_asc,node_testflight,node_uploader toneRose
class node_user,node_apple,node_xcodeapp,node_testers toneIndigo
```

## Components

### CLI workflows

- [CLI entry](https://github.com/alexey1312/laner/blob/main/Sources/laner/main.swift): `Sources/laner/main.swift`
- [CLI commands](https://github.com/alexey1312/laner/tree/main/Sources/LanerCore/Commands): `Sources/LanerCore/Commands`
- [Manifest loader](https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Manifest/ManifestLoader.swift): `Sources/LanerCore/Manifest/ManifestLoader.swift`
- [Lane command](https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/LaneCommand.swift): `Sources/LanerCore/Commands/LaneCommand.swift`
- [Build command](https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/BuildCommand.swift): `Sources/LanerCore/Commands/BuildCommand.swift`
- [Test command](https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/TestCommand.swift): `Sources/LanerCore/Commands/TestCommand.swift`
- [Match command](https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/MatchCommand.swift): `Sources/LanerCore/Commands/MatchCommand.swift`
- [Upload command](https://github.com/alexey1312/laner/blob/main/Sources/LanerCore/Commands/UploadCommand.swift): `Sources/LanerCore/Commands/UploadCommand.swift`

### Lane DSL

- [Lanerfile DSL](https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Manifest/Lanerfile.swift): `Sources/LanerDSL/Manifest/Lanerfile.swift`
- [Lane runner](https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Lane.swift): `Sources/LanerDSL/Lane.swift`
- [Action dispatcher](https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/ActionDispatcher.swift): `Sources/LanerDSL/ActionDispatcher.swift`
- [Typed actions](https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Actions/Functions.swift): `Sources/LanerDSL/Actions/Functions.swift`
- [Action protocol](https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Action.swift): `Sources/LanerDSL/Action.swift`
- [Execution context](https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/ExecutionContext.swift): `Sources/LanerDSL/ExecutionContext.swift`
- [CI environment](https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Environment.swift): `Sources/LanerDSL/Environment.swift`
- [Build artifacts](https://github.com/alexey1312/laner/blob/main/Sources/LanerDSL/Artifact.swift): `Sources/LanerDSL/Artifact.swift`

### Execution tools

- [Xcode operations](https://github.com/alexey1312/laner/blob/main/Sources/LanerKit/Xcodebuild/XcodebuildExecutor.swift): `Sources/LanerKit/Xcodebuild/XcodebuildExecutor.swift`
- [Shell executor](https://github.com/alexey1312/laner/blob/main/Sources/LanerKit/ShellExecutor.swift): `Sources/LanerKit/ShellExecutor.swift`
- [Platform detection](https://github.com/alexey1312/laner/blob/main/Sources/LanerKit/Platform.swift): `Sources/LanerKit/Platform.swift`
- [Structured logging](https://github.com/alexey1312/laner/blob/main/Sources/LanerKit/Logging/LoggingConfiguration.swift): `Sources/LanerKit/Logging/LoggingConfiguration.swift`

### Signing and distribution

- [Signing service](https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/MatchService.swift): `Sources/LanerMatch/Services/MatchService.swift`
- [Git signing storage](https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Storage/GitStorage.swift): `Sources/LanerMatch/Storage/GitStorage.swift`
- [Certificate crypto](https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/CryptoService.swift): `Sources/LanerMatch/Services/CryptoService.swift`
- [Keychain install](https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/KeychainService.swift): `Sources/LanerMatch/Services/KeychainService.swift`
- [App Store Connect API](https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/API/AppStoreConnectAPI.swift): `Sources/LanerMatch/API/AppStoreConnectAPI.swift`
- [TestFlight upload](https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/TestFlightService.swift): `Sources/LanerMatch/Services/TestFlightService.swift`
- [Chunked uploader](https://github.com/alexey1312/laner/blob/main/Sources/LanerMatch/Services/ChunkedUploader.swift): `Sources/LanerMatch/Services/ChunkedUploader.swift`

### Other components

- **Developer**
- **Apple services**
- **Git remote**
- **Xcode build tools**
- **Beta testers**

## Connections

- Developer → CLI entry: runs (evidence: `Sources/laner/main.swift`)
- CLI entry → CLI commands: dispatches (evidence: `Sources/laner/main.swift`)
- CLI commands → Manifest loader: loads lanes (evidence: `Sources/LanerCore/Manifest/ManifestLoader.swift`)
- CLI commands → Build command: builds directly
- CLI commands → Test command: tests directly
- CLI commands → Match command: manages signing (evidence: `Sources/LanerCore/Commands/MatchCommand.swift`)
- CLI commands → Upload command: uploads builds
- Lane command → Manifest loader: loads manifest
- Manifest loader → Lanerfile DSL: compiles manifest (evidence: `Sources/LanerCore/Manifest/ManifestLoader.swift`)
- Lane command → Lane runner: runs selected lane
- Lane runner → Action dispatcher: dispatches actions (evidence: `Sources/LanerDSL/Lane.swift`)
- Action dispatcher → Typed actions: creates actions (evidence: `Sources/LanerDSL/ActionDispatcher.swift`)
- Typed actions → Action protocol: implements
- Lane runner → Execution context: provides context (evidence: `Sources/LanerDSL/Lane.swift`)
- Execution context → CI environment: holds environment (evidence: `Sources/LanerDSL/ExecutionContext.swift`)
- Execution context → Build artifacts: collects artifacts (evidence: `Sources/LanerDSL/ExecutionContext.swift`)
- Typed actions → Xcode operations: builds and tests
- Execution context → Shell executor: provides executor (evidence: `Sources/LanerDSL/ExecutionContext.swift`)
- Xcode operations → Shell executor: runs commands (evidence: `Sources/LanerKit/Xcodebuild/XcodebuildExecutor.swift`)
- Xcode operations → Xcode build tools: invokes (evidence: `README.md`)
- CI environment → Platform detection: detects CI
- Match command → Signing service: runs sync (evidence: `Sources/LanerCore/Commands/MatchCommand.swift`)
- Signing service → Git signing storage: reads and writes (evidence: `Sources/LanerMatch/Services/MatchService.swift`)
- Signing service → Certificate crypto: encrypts certificates (evidence: `Sources/LanerMatch/Services/MatchService.swift`)
- Signing service → Keychain install: installs credentials (evidence: `Sources/LanerMatch/Services/MatchService.swift`)
- Signing service → App Store Connect API: manages certificates (evidence: `Sources/LanerMatch/Services/MatchService.swift`)
- Git signing storage → Git remote: clones and pushes (evidence: `Sources/LanerMatch/Storage/GitStorage.swift`)
- App Store Connect API → Apple services: sends API requests (evidence: `Sources/LanerMatch/API/AppStoreConnectAPI.swift`)
- Upload command → TestFlight upload: starts upload
- Typed actions → TestFlight upload: uploads via pilot
- TestFlight upload → App Store Connect API: creates build upload (evidence: `Sources/LanerMatch/Services/TestFlightService.swift`)
- TestFlight upload → Chunked uploader: uploads chunks (evidence: `Sources/LanerMatch/Services/TestFlightService.swift`)
- Chunked uploader → Apple services: transfers IPA
- TestFlight upload → Beta testers: distributes build (evidence: `README.md`)
