Skip to content

Commit 7364c82

Browse files
leogdionclaude
andauthored
Moving Shared Code to BushelKit (#5)
* docs: add gradual migration plan for moving code to BushelKit - 7-week phased approach with BushelCloudData intermediate target - Deprecation warnings and incremental migration strategy - Complete implementation details for each phase * docs: update migration plan to use BushelKit v3.0.0-alpha.2 - Change target version from v3.1.0 to v3.0.0-alpha.2 - Update all version references throughout migration plan (7 locations) - Maintain alpha release within v3.0.0 series 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * refactoring modules * fix: resolve compilation errors by using MistKit's CloudKitRecord protocol This commit fixes all compilation errors by addressing the duplicate CloudKitRecord protocol definition and missing imports. Changes: - Remove duplicate CloudKitRecord protocol in BushelCloudKit - Project now uses MistKit's CloudKitRecord protocol exclusively - All extensions already conform to the complete protocol (Codable, Sendable, recordName) - Fix SyncEngine DataSourcePipeline initialization - Remove invalid cloudKitService parameter - DataSourcePipeline constructor only takes configuration parameter - Add missing BushelCloudData imports to all CLI commands - Required for types like RestoreImageRecord, DataSourceMetadata, FetchConfiguration, ConsoleOutput The root cause was a duplicate CloudKitRecord protocol definition that conflicted with MistKit's version. MistKit's protocol requires Codable, Sendable conformance and a recordName property, while the local duplicate did not. This caused the compiler to see types as not conforming to the protocol that MistKit's generic methods required. Build now succeeds with only deprecation warnings (types moving to BushelKit in future release). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: add missing BushelCloudData imports to test files All test files were missing the BushelCloudData import, causing compilation errors when trying to access types like RestoreImageRecord, XcodeVersionRecord, SwiftVersionRecord, FetchConfiguration, DataSourceMetadata, and ConsoleOutput. Changes: - Add @testable import BushelCloudData to all test files - Tests now compile and pass successfully Test results: 122 tests in 20 suites all passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * git subrepo clone --branch=bushelcloud git@github.com:brightdigit/BushelKit.git Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "f811a28" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "f811a28" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * feat: migrate selected BushelCloudData code from BushelCloud Add models, core fetchers, and utilities from BushelCloud's deprecated BushelCloudData target (20 files) to BushelFoundation and BushelUtilities. BushelFoundation (19 files): - Models (4): RestoreImageRecord, XcodeVersionRecord, SwiftVersionRecord, DataSourceMetadata - Configuration (1): FetchConfiguration - DataSources (14): - DataSourcePipeline with deduplication logic - DataSourceFetcher protocol, HTTPHeaderHelpers - AppleDBFetcher + AppleDB support (9 files) - MESUFetcher, XcodeReleasesFetcher BushelUtilities (2 files): - FormattingHelpers, ConsoleOutput Note: BushelHub is deprecated. Web scraping fetchers (IPSWFetcher, MrMacintoshFetcher, SwiftVersionFetcher, TheAppleWikiFetcher) remain in BushelCloud. * refactor: remove DataSourcePipeline from BushelFoundation [skip ci] DataSourcePipeline orchestrates all fetchers including web scraping ones that depend on SwiftSoup/IPSWDownloads. Keep it in BushelCloud's BushelCloudData target instead of migrating to BushelKit. * refactor: migrate to local BushelKit subrepo [skip ci] - Use local path dependency (Packages/BushelKit) - Add BushelFoundation and BushelUtilities to BushelCloudKit - Add BushelFoundation to BushelCloudData for model access - Remove BushelCloudData from BushelCloudCLI (deprecated) - Keep IPSWDownloads/SwiftSoup for remaining fetchers * refactor: cleanup BushelCloudData after migration [skip ci] Removed 20 files migrated to BushelKit: - Models (4): RestoreImageRecord, XcodeVersionRecord, SwiftVersionRecord, DataSourceMetadata - Configuration (1): FetchConfiguration - DataSources (13): DataSourceFetcher, HTTPHeaderHelpers, MESUFetcher, XcodeReleasesFetcher, AppleDB/* - Utilities (2): FormattingHelpers, ConsoleOutput Kept 8 web scraping fetchers: - IPSWFetcher, MrMacintoshFetcher, SwiftVersionFetcher, TheAppleWikiFetcher - TheAppleWiki support files Updated all remaining files to import BushelFoundation for model types. * refactor: update BushelCloudKit for BushelFoundation migration [skip ci] - Replace BushelCloudData imports with BushelFoundation - Add BushelUtilities import for FormattingHelpers/ConsoleOutput - Delete custom CloudKitRecord protocol (use MistKit's instead) - Add recordName property to CloudKitRecord extensions - Change BushelCloudData import to public in SyncEngine - Qualify ConsoleOutput calls to avoid ambiguity Note: Build errors remain due to incomplete migration, will be fixed in follow-up. * refactor: update BushelCloudCLI for migration [skip ci] - Qualify ConsoleOutput calls with full module path - Remove direct BushelCloudData dependency (now via BushelCloudKit) Note: Build errors remain, will be fixed in follow-up. * fixing some compilation errors [skip ci] * fixing dependencies * fixing builds and tests * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "eef7536" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "eef7536" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "1383417817" * Update BushelCloud.yml * Update BushelCloud.yml * moving fetchers back to BushelCLoudKit * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "d0695b2" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "d0695b2" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "1383417817" * Fixing Ubunutu tests * Fix BushelKit subrepo parent commit reference * git subrepo pull (merge) Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "15cb101" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "3487928" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * git subrepo push --force Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "3255ba9" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "3255ba9" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * Change downloadURL from String to URL type in all record models Update RestoreImageRecord, XcodeVersionRecord, and SwiftVersionRecord to use URL instead of String for downloadURL fields. This improves type safety and prevents invalid URLs at compile time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Add FieldValue+URL extension and update all fetchers for URL type - Create FieldValue+URL extension following MistKit's boolean pattern - Update all CloudKit extensions to use FieldValue(url:) and .urlValue - Update all fetchers to construct URL objects with validation - Update all test fixtures to use URL type - Add comprehensive FieldValue+URL tests (15 tests) All 137 tests passing. Type safety improved - invalid URLs caught at compile time instead of runtime. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "674acc0" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "674acc0" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * Address PR review comments: remove duplicate, add documentation - Remove duplicate FormattingHelpers from BushelCloudKit - Add comprehensive BushelKit architecture documentation to CLAUDE.md - Add git subrepo workflow and type design decisions to CLAUDE.md - Add BushelKit integration section to README.md - Enhance code documentation for fileSize fields Addresses review comments from: - User review on brightdigit/BushelKit#122 - Claude bot review on #5 All tests passing (137 tests in 21 suites) * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "eb5bb24" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "eb5bb24" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "1383417817" * Replace FormattingHelpers with FormatStyle-based Formatters - Add modern FormatStyle properties to Formatters enum (dateFormat, dateTimeFormat, fileSizeFormat) - Replace FormattingHelpers static methods with Swift's modern .formatted() API - Update and rename FormattingHelpersTests to FormattersTests - Remove deprecated FormattingHelpers utility class 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "6968872" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "6968872" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * Fix BushelKit unit test build issues - Remove duplicate FormattersTests.swift from BushelUtlitiesTests - Merge formatter tests into BushelFoundationTests where they belong - Update test expectations for ByteCountFormatStyle output format - Fix URL type usage in RestoreImageRecordTests (use URL instead of String) - Fix URL type usage in XcodeVersionRecordTests (use URL instead of String) - Fix URL type usage in SwiftVersionRecordTests (use URL instead of String) All 129 BushelKit tests now pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * Replace FormattingHelpers with FormatStyle-based Formatters - Update DataSourceMetadata+CloudKit to use Formatters.dateTimeFormat - Update XcodeVersionRecord+CloudKit to use Formatters.dateFormat and fileSizeFormat - Update RestoreImageRecord+CloudKit (no FormattingHelpers usage) - Update SwiftVersionRecord+CloudKit (no FormattingHelpers usage) Fixes compilation errors after FormattingHelpers was removed in commit 991a95a. All 137 BushelCloud tests pass successfully. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * git subrepo push Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "b28ba54" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "b28ba54" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "e8b7739de9" * git subrepo pull Packages/BushelKit subrepo: subdir: "Packages/BushelKit" merged: "9224ceb" upstream: origin: "git@github.com:brightdigit/BushelKit.git" branch: "bushelcloud" commit: "9224ceb" git-subrepo: version: "0.4.9" origin: "https://github.com/Homebrew/brew" commit: "1383417817" * fixing BushelKit updates * Fix BushelKit subrepo parent reference * fixing Linux builds * Removing SubRepo --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c16b972 commit 7364c82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1581
-853
lines changed

.claude/migration-to-bushelkit.md

Lines changed: 918 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/BushelCloud.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -37,32 +37,32 @@ jobs:
3737
verbose: true
3838
token: ${{ secrets.CODECOV_TOKEN }}
3939
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}
40-
build-windows:
41-
name: Build on Windows
42-
runs-on: ${{ matrix.runs-on }}
43-
if: "!contains(github.event.head_commit.message, 'ci skip')"
44-
strategy:
45-
fail-fast: false
46-
matrix:
47-
runs-on: [windows-2022, windows-2025]
48-
swift:
49-
- version: swift-6.2-release
50-
build: 6.2-RELEASE
51-
steps:
52-
- uses: actions/checkout@v4
53-
- uses: brightdigit/swift-build@v1.3.3
54-
with:
55-
windows-swift-version: ${{ matrix.swift.version }}
56-
windows-swift-build: ${{ matrix.swift.build }}
57-
- name: Upload coverage to Codecov
58-
uses: codecov/codecov-action@v5
59-
with:
60-
fail_ci_if_error: true
61-
flags: swift-${{ matrix.swift.version }},windows
62-
verbose: true
63-
token: ${{ secrets.CODECOV_TOKEN }}
64-
os: windows
65-
swift_project: BushelCloud-Package
40+
# build-windows:
41+
# name: Build on Windows
42+
# runs-on: ${{ matrix.runs-on }}
43+
# if: "!contains(github.event.head_commit.message, 'ci skip')"
44+
# strategy:
45+
# fail-fast: false
46+
# matrix:
47+
# runs-on: [windows-2022, windows-2025]
48+
# swift:
49+
# - version: swift-6.2-release
50+
# build: 6.2-RELEASE
51+
# steps:
52+
# - uses: actions/checkout@v4
53+
# - uses: brightdigit/swift-build@v1.3.3
54+
# with:
55+
# windows-swift-version: ${{ matrix.swift.version }}
56+
# windows-swift-build: ${{ matrix.swift.build }}
57+
# - name: Upload coverage to Codecov
58+
# uses: codecov/codecov-action@v5
59+
# with:
60+
# fail_ci_if_error: true
61+
# flags: swift-${{ matrix.swift.version }},windows
62+
# verbose: true
63+
# token: ${{ secrets.CODECOV_TOKEN }}
64+
# os: windows
65+
# swift_project: BushelCloud-Package
6666
build-macos:
6767
name: Build on macOS
6868
env:
@@ -143,7 +143,7 @@ jobs:
143143
name: Linting
144144
if: "!contains(github.event.head_commit.message, 'ci skip')"
145145
runs-on: ubuntu-latest
146-
needs: [build-ubuntu, build-macos, build-windows]
146+
needs: [build-ubuntu, build-macos] # , build-windows]
147147
env:
148148
MINT_PATH: .mint/lib
149149
MINT_LINK_PATH: .mint/bin

.swiftlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ excluded:
116116
- .build
117117
- Mint
118118
- Examples
119-
- Sources/MistKit/Generated
119+
- Packages
120120
indentation_width:
121121
indentation_width: 2
122122
file_name:

CLAUDE.md

Lines changed: 145 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,32 @@ export CLOUDKIT_CONTAINER_ID="iCloud.com.yourcompany.Bushel" # Optional, has de
5454

5555
## Architecture
5656

57+
### Modular Architecture with BushelKit
58+
59+
Starting with v0.0.1, BushelCloud uses **BushelKit** as a modular foundation:
60+
61+
**BushelKit** (`Packages/BushelKit/`):
62+
- `BushelFoundation` - Core domain models (RestoreImageRecord, XcodeVersionRecord, SwiftVersionRecord)
63+
- `BushelUtilities` - Shared utilities (FormattingHelpers, JSONDecoder extensions)
64+
- `BushelLogging` - Logging abstractions
65+
66+
**BushelCloudKit** (`Sources/BushelCloudKit/`):
67+
- Extends BushelKit models with CloudKit integration
68+
- `Extensions/*+CloudKit.swift` - CloudKitRecord protocol conformance
69+
- `DataSources/` - API fetchers (IPSW, AppleDB, MESU, etc.)
70+
- `CloudKit/` - SyncEngine and service layer
71+
72+
**Dependency Flow**:
73+
```
74+
BushelCloudCLI → BushelCloudKit → BushelFoundation → BushelUtilities → MistKit
75+
```
76+
77+
**Why This Architecture**:
78+
- Domain models reusable across projects (BushelKit can evolve independently)
79+
- CloudKit logic isolated to extensions (clean separation)
80+
- Shared utilities promote consistency
81+
- Testing each layer independently
82+
5783
### Core Data Flow
5884

5985
The application follows a pipeline architecture:
@@ -81,11 +107,18 @@ External Data Sources → DataSourcePipeline → CloudKitService → CloudKit
81107
- `DataSourcePipeline.swift` - Coordinates fetching from all sources with metadata tracking
82108
- Individual fetchers: `IPSWFetcher`, `AppleDBFetcher`, `MESUFetcher`, `XcodeReleasesFetcher`, etc.
83109

84-
**Models** (`Sources/BushelCloud/Models/`):
85-
- `RestoreImageRecord` - macOS restore images (IPSW files for virtualization)
86-
- `XcodeVersionRecord` - Xcode releases with references to RestoreImage and SwiftVersion
110+
**Models** (`Packages/BushelKit/Sources/BushelFoundation/`):
111+
- `RestoreImageRecord` - macOS restore images (uses `URL` and `Int` types)
112+
- `XcodeVersionRecord` - Xcode releases with CKReference relationships
87113
- `SwiftVersionRecord` - Swift compiler versions
88-
- `DataSourceMetadata` - Tracks fetch timestamps and throttling
114+
- `DataSourceMetadata` - Fetch metadata with timestamp tracking
115+
116+
**CloudKit Extensions** (`Sources/BushelCloudKit/Extensions/`):
117+
- `RestoreImageRecord+CloudKit.swift` - Implements CloudKitRecord protocol
118+
- `XcodeVersionRecord+CloudKit.swift` - Handles CKReference serialization
119+
- `SwiftVersionRecord+CloudKit.swift` - Basic CloudKit mapping
120+
- `DataSourceMetadata+CloudKit.swift` - Metadata sync record
121+
- `FieldValue+URL.swift` - URL ↔ STRING conversion
89122

90123
**Commands** (`Sources/BushelCloud/Commands/`):
91124
- CLI commands using swift-argument-parser
@@ -122,6 +155,59 @@ The project uses structured logging with `BushelLogger` (wrapping `os.Logger`):
122155
- **Verbose logs** (`--verbose`): MistKit API calls, batch details
123156
- **Subsystems**: `.sync`, `.cloudKit`, `.dataSource`
124157

158+
## Git Subrepo Development
159+
160+
BushelKit is embedded as a git subrepo for rapid development during the migration phase.
161+
162+
### Configuration
163+
- **Remote:** `git@github.com:brightdigit/BushelKit.git`
164+
- **Branch:** `bushelcloud`
165+
- **Location:** `Packages/BushelKit/`
166+
167+
### Making Changes to BushelKit
168+
169+
```bash
170+
# 1. Edit files in Packages/BushelKit/
171+
vim Packages/BushelKit/Sources/BushelFoundation/RestoreImageRecord.swift
172+
173+
# 2. Commit changes in BushelCloud repository
174+
git add Packages/BushelKit/
175+
git commit -m "Update BushelKit: add field documentation"
176+
177+
# 3. Push changes to BushelKit repository
178+
git subrepo push Packages/BushelKit
179+
```
180+
181+
### Pulling Updates from BushelKit
182+
183+
```bash
184+
git subrepo pull Packages/BushelKit
185+
```
186+
187+
### When to Switch to Remote Dependency
188+
189+
| Development Stage | Approach | Package.swift |
190+
|-------------------|----------|---------------|
191+
| Now (active migration) | Git subrepo (local path) | `.package(path: "Packages/BushelKit")` |
192+
| After BushelKit v2.0 stable | Remote dependency | `.package(url: "https://github.com/brightdigit/BushelKit.git", from: "2.0.0")` |
193+
194+
**Benefits of Subrepo Now:**
195+
- Edit BushelKit and BushelCloud together
196+
- Test integration immediately
197+
- No version coordination overhead
198+
199+
**Migration to Remote:**
200+
1. Tag stable BushelKit version
201+
2. Update `Package.swift` to use URL dependency
202+
3. Remove `Packages/BushelKit/` directory
203+
4. Use standard SPM workflow
204+
205+
### Best Practices
206+
- Commit BushelKit changes separately from BushelCloud changes
207+
- Push to subrepo after each logical change
208+
- Pull before starting new work
209+
- Test both repositories after changes
210+
125211
## Development Essentials
126212

127213
### Swift 6 Configuration
@@ -135,6 +221,61 @@ The project uses strict Swift 6 concurrency checking (see `Package.swift:10-78`)
135221

136222
**When adding code**: Ensure all new types conform to `Sendable` and use `async/await` patterns consistently.
137223

224+
### Type Design Decisions
225+
226+
#### Int vs Int64 for File Sizes
227+
228+
**Decision:** All models use `Int` for byte counts (fileSize fields)
229+
230+
**Rationale:**
231+
- All supported platforms are 64-bit (macOS 14+, iOS 17+, watchOS 10+)
232+
- On 64-bit systems: `Int` == `Int64` (same size and range)
233+
- Swift convention: use `Int` for counts, sizes, and indices
234+
- CloudKit automatically converts via `.int64(fileSize)`
235+
236+
**Safety Analysis:**
237+
- Largest image file: ~15 GB
238+
- `Int.max` on 64-bit: 9,223,372,036,854,775,807 bytes (~9 exabytes)
239+
- **No overflow risk** for any realistic file size
240+
241+
**CloudKit Integration:**
242+
```swift
243+
// Write to CloudKit
244+
fields["fileSize"] = .int64(record.fileSize) // Auto-converts Int → Int64
245+
246+
// Read from CloudKit
247+
let size: Int? = recordInfo.fields["fileSize"]?.intValue // Returns Int
248+
```
249+
250+
#### URL Type for Download Links
251+
252+
**Decision:** Models use `URL` (not `String`) for download links
253+
254+
**Benefits:**
255+
- Type safety at compile time
256+
- URL component access (scheme, host, path, query)
257+
- Automatic validation on creation
258+
- Custom `FieldValue(url:)` extension handles CloudKit STRING conversion
259+
260+
**CloudKit Integration:**
261+
```swift
262+
// Extension: Sources/BushelCloudKit/Extensions/FieldValue+URL.swift
263+
public extension FieldValue {
264+
init(url: URL) {
265+
self = .string(url.absoluteString)
266+
}
267+
268+
var urlValue: URL? {
269+
if case .string(let value) = self {
270+
return URL(string: value)
271+
}
272+
return nil
273+
}
274+
}
275+
```
276+
277+
**Tests:** See `Tests/BushelCloudTests/Extensions/FieldValueURLTests.swift` (13 test methods)
278+
138279
### CloudKitRecord Protocol
139280

140281
All domain models conform to `CloudKitRecord`:

Package.resolved

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ let package = Package(
9191
.executable(name: "bushel-cloud", targets: ["BushelCloudCLI"])
9292
],
9393
dependencies: [
94-
.package(url: "https://github.com/brightdigit/MistKit.git", from: "1.0.0-alpha.3"),
94+
.package(url: "https://github.com/brightdigit/MistKit.git", from: "1.0.0-alpha.3"),
95+
.package(url: "https://github.com/brightdigit/BushelKit.git", branch: "v3.0.0-alpha.2"),
9596
.package(url: "https://github.com/brightdigit/IPSWDownloads.git", from: "1.0.0"),
96-
.package(url: "https://github.com/brightdigit/BushelKit.git", from: "3.0.0-alpha.1"),
9797
.package(url: "https://github.com/scinfu/SwiftSoup.git", from: "2.6.0"),
9898
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.5.0")
9999
],
@@ -102,9 +102,11 @@ let package = Package(
102102
name: "BushelCloudKit",
103103
dependencies: [
104104
.product(name: "MistKit", package: "MistKit"),
105+
.product(name: "BushelLogging", package: "BushelKit"),
106+
.product(name: "BushelFoundation", package: "BushelKit"),
107+
.product(name: "BushelUtilities", package: "BushelKit"),
105108
.product(name: "IPSWDownloads", package: "IPSWDownloads"),
106-
.product(name: "SwiftSoup", package: "SwiftSoup"),
107-
.product(name: "BushelLogging", package: "BushelKit")
109+
.product(name: "SwiftSoup", package: "SwiftSoup")
108110
],
109111
swiftSettings: swiftSettings
110112
),

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,25 @@ BushelCloud/
9797
└── ExportCommand.swift
9898
```
9999

100+
### BushelKit Integration
101+
102+
BushelCloud uses [BushelKit](https://github.com/brightdigit/BushelKit) as its modular foundation, providing:
103+
104+
**Core Modules:**
105+
- **BushelFoundation** - Domain models (RestoreImageRecord, XcodeVersionRecord, SwiftVersionRecord)
106+
- **BushelUtilities** - Formatting helpers, JSON decoding, console output
107+
- **BushelLogging** - Unified logging abstractions
108+
109+
**Current Integration:**
110+
- Git subrepo at `Packages/BushelKit/` for rapid development
111+
- Local path dependency during migration phase
112+
113+
**Future:**
114+
- After BushelKit v2.0 stable release → versioned remote dependency
115+
- BushelKit will support VM management features
116+
117+
**Documentation:** [BushelKit Docs](https://docs.getbushel.app/docc)
118+
100119
## Features Demonstrated
101120

102121
### MistKit Capabilities

Sources/BushelCloudCLI/Commands/ClearCommand.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030
import ArgumentParser
3131
import BushelCloudKit
32+
import BushelFoundation
33+
import BushelUtilities
3234
import Foundation
3335

3436
struct ClearCommand: AsyncParsableCommand {
@@ -69,7 +71,7 @@ struct ClearCommand: AsyncParsableCommand {
6971

7072
mutating func run() async throws {
7173
// Enable verbose console output if requested
72-
ConsoleOutput.isVerbose = verbose
74+
BushelUtilities.ConsoleOutput.isVerbose = verbose
7375

7476
// Get Server-to-Server credentials from environment if not provided
7577
let resolvedKeyID =

Sources/BushelCloudCLI/Commands/ExportCommand.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import ArgumentParser
3131
import BushelCloudKit
32+
import BushelFoundation
3233
import Foundation
3334
import MistKit
3435

0 commit comments

Comments
 (0)