kcrawford/dockutil
43.6
Weak · 1 October 2026
917
lines of production code
Swift
primary language
2
measurements over time
What this system is
DockUtil is a command-line utility for managing macOS dock configurations, rewritten in Swift to replace its previous Python implementation. It provides capabilities to add, remove, and reorder dock items, including support for spacer tiles and bundle identifier-based removal. The tool ensures reliable operation by handling user context correctly and synchronizing changes via the \defaults\ command, with distribution managed through Swift Package Manager.
Removals
Removal of legacy Python dockutil script
The legacy Python-based dockutil script has been deleted from the repository. This script previously provided command-line functionality for managing macOS dock items, including adding, removing, moving, and listing dock entries. Its removal indicates that this specific implementation is no longer maintained or included in the project.
scripts · high confidence
Behavioural changes
Refactored dockutil to Swift Package Manager with improved sudo and user-context handling
The dockutil source code has been restructured into a standard Swift Package, removing legacy Xcode project support and adding an Info.plist for versioning. This change introduces stricter validation for user context: the tool now warns if it is not running as the console user or root, and fixes a bug where running with sudo would incorrectly use the root user's home directory instead of the target user's. Additionally, the logic for reading and saving the dock plist has been updated to handle case-sensitivity in username paths and to use the \defaults\ command via sudo when necessary to ensure proper ownership and cache synchronization, improving reliability on macOS 14.4 and later.
Sources/DockUtil · high confidence
Restored Info.plist for Swift Package Manager versioning
The project now includes an Info.plist file in the Sources/Resources directory to manage bundle metadata, specifically setting the short version and build version to 3.1.3. This change ensures that the Swift Package Manager can correctly identify and report the package version, addressing previous issues where version information was not properly exposed in the SwiftPM context.
Sources/Resources · high confidence
dockutil rewritten in Swift with modern macOS support and new tile management
The dockutil utility has been completely rewritten from Python to Swift, shifting the minimum supported version to macOS Big Sur (12.x) while maintaining feature parity with previous releases. This major update introduces the ability to add and remove spacer tiles, allows removal of items by bundle identifier, and supports multiple actions in a single run. The tool now uses \defaults\ commands instead of restarting \cfprefsd\ to apply changes, and includes a new Makefile for building, signing, and notarizing the binary for distribution.
(repo-wide) · high confidence
Test coverage
Added initial test suite for DockUtil
Added a new test file (Tests/DockUtilTests/Tests.swift) that imports the DockUtil module and includes placeholder test cases for dock functionality, example assertions, and performance measurement, establishing the baseline structure for verifying the library's behavior.
Tests · high confidence
Dependencies
Add Swift Package Manager support
The project now supports installation via Swift Package Manager (SPM). A new Package.swift manifest defines the 'dockutil' executable target, which depends on 'swift-argument-parser' (version 1.0.0 or later) and links an Info.plist file for versioning. A corresponding Package.resolved file pins the dependency to swift-argument-parser version 1.1.1.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 47 → 44 (-3.2)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 78 → 78 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 48 → 48 (+0.0)
- Readiness 27 → 23 (-4.1)
- Security 100 → 100 (+0.0)
Resolved (2)
- Dependency hygiene PARTLY measured — SwiftPM pinning read, dependency currency NOT established
- Documentation: no usage examples (README.md)
New (3)
- Coverage not measured — Swift suite
- Documentation: no installation or build instructions (README.md)
- Outdated: swift-argument-parser
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
kcrawford/dockutil was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 7238012dc414eed1604f0ce8791937c493e1f914 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.