ianyh/Amethyst
58.3
Adequate · 27 September 2026
8k
lines of production code
Swift
primary language
4
measurements over time
What this system is
Amethyst is a macOS window tiling manager that automatically arranges application windows into configurable layouts such as BSP, columns, and rows. It provides a command-line interface for diagnostics and supports custom layout definitions via JavaScript, while offering a preferences interface to manage key bindings, floating windows, and screen-specific behaviors. The system handles window focus, resizing, and state persistence, integrating with macOS accessibility APIs to enforce tiling rules across active applications.
How it got here
2013 — Swift migration and project scaffolding
7 changes.
The project underwent a comprehensive migration from Objective-C to Swift, introducing a new command-line interface and modernizing the build configuration with updated Xcode schemes and dependencies. This period also established the initial project scaffolding, including default configuration files, linting rules, and documentation, while removing legacy Interface Builder assets.
2016 — modular architecture and UI overhaul
7 changes.
This period focused on refactoring Amethyst's core architecture into modular coordinator classes to improve maintainability and introducing a centralized HotKeyManager for keyboard shortcuts. The work also included a comprehensive redesign of the preferences interface and layout logic, enhancing window management granularity and user configurability.
2019 — Layout expansion and architectural refactoring
7 changes.
This period focused on expanding Amethyst's window tiling capabilities by introducing new layouts like BSP and custom JavaScript-based arrangements, alongside refining existing ones. The underlying architecture was significantly refactored to use Swift generics, decoupling the model layer from specific accessibility implementations to improve testability. Comprehensive unit tests were added for the new layouts, configuration handling, and core managers to ensure the stability of these changes.
2020–2023 — Modernization and tooling improvements
5 changes.
The project modernized its development workflow by migrating to Swift Package Manager and integrating fastlane automation for streamlined macOS builds. Significant updates included a redesigned user interface with a new preferences window and menu structure, alongside the introduction of command-line debugging utilities for diagnostics. These changes were supported by expanded test coverage for custom layouts and updated third-party dependencies.
Features
Add default configuration and project scaffolding files
This change introduces the initial project scaffolding and configuration files for Amethyst. It adds \.amethyst.sample.yml\, providing a comprehensive default configuration with keyboard shortcuts and layout definitions that users can copy to \\~/.amethyst.yml\. It also includes \.swiftlint.yml\ and \.eslintrc.yml\ for code linting, \.gitignore\ for build artifacts, \.hound.yml\ for code review integration, \Brewfile\ for build dependencies, \Amethyst.xctestplan\ for test execution, and standard documentation files like \README.md\, \LICENSE.md\, \CODE\_OF\_CONDUCT.md\, and \privacy-policy.md\.
(repo-wide) · high confidence
Added fastlane automation for building and exporting the macOS app
The repository now includes fastlane configuration files (Appfile, Fastfile, Gymfile) to streamline the build and export process for the macOS application. Users can run the 'fastlane mac' command to automatically build the Amethyst scheme, create an archive, and export the app bundle to the ./build directory using the specified export options.
fastlane · high confidence
Introduction of HotKeyManager for centralized keyboard shortcut handling
The Amethyst/Events module now includes a new HotKeyManager class that centralizes the registration and dispatch of keyboard shortcuts. This component maps specific command keys (such as layout cycling, pane resizing, and focus/swap movements) to their corresponding actions within the window manager, replacing previous ad-hoc or less structured key handling mechanisms.
Amethyst/Events · high confidence
New and enhanced window layouts for Amethyst
This update introduces several new window tiling layouts to the Amethyst application, including Binary Space Partitioning (BSP), Column, Row, Four Column, Two Pane, Two Pane Right, and Wide layouts. It also adds support for Custom Layouts, allowing users to define their own window arrangements using JavaScript. Additionally, the existing Tall, Tall Right, Three Column, and Fullscreen layouts have been updated or refined to support new features such as smart window margins and improved state persistence.
Amethyst/Layout/Layouts · high confidence
New command-line debugging tools for application and window diagnostics
Added new command-line utilities in the Amethyst/Debug module to help diagnose window management issues. Users can now run the \Debug\ command to generate diagnostic reports including version, OS, screen frames, and configuration, with an optional \--include-apps\ flag to list manageable applications. Additionally, the \Apps\ command provides detailed information about running applications (title, bundle ID, activation policy, manageability status), and the \Windows\ command lists window details (frame, ID, state flags) with options to include unmanaged apps or redact titles for privacy.
Amethyst/Debug · high confidence
Architecture
Refactor window and application models to use Swift generics
The Amethyst/Model layer has been refactored to replace concrete types (such as AnyWindow and SIApplication) with generic protocols (WindowType, ApplicationType, ScreenType). This change introduces a type-safe architecture where the model layer is no longer tightly coupled to the Silica accessibility library, allowing for better testability and future extensibility. The diff shows the introduction of generic constraints across Application, Window, Screen, and related helper classes like MouseState and ApplicationObservation, ensuring that all model interactions are now defined against these abstract protocols rather than specific implementation classes.
Amethyst/Model · high confidence
Refactored window and focus management into modular coordinator classes
The window management logic in Amethyst has been restructured to improve maintainability and reduce complexity. The diff introduces dedicated manager classes for specific concerns: \FocusTransitionCoordinator\ now handles focus cycling and screen navigation, \WindowTransitionCoordinator\ manages window swapping and movement between screens/spaces, and \FocusFollowsMouseManager\ isolates the mouse-tracking logic. Additionally, \AppManager\ provides a new relaunch capability, \LayoutType\ centralizes layout definitions and custom layout loading, and \HotKeyRegistrar\ implements a migration path from the legacy MASShortcut library to the modern KeyboardShortcuts framework. These changes collectively replace monolithic management with a more modular, protocol-driven architecture.
Amethyst/Managers · high confidence
Behavioural changes
Added Amethyst workspace file to version control
The Amethyst.xcodeproj/project.xcworkspace/contents.xcworkspacedata file has been added to the repository, establishing the Xcode workspace configuration that references the main project. This ensures that the workspace structure is now tracked in git, allowing developers to open the project via the workspace file consistently.
Amethyst.xcodeproj/project.xcworkspace · high confidence
Added debug CLI scheme and updated main scheme for Xcode 15
The project now includes a new 'Amethyst Debug CLI' scheme that launches the application with the 'debug windows' command-line argument enabled by default, facilitating easier debugging of window management features. The main 'Amethyst' scheme has been updated to version 1.7 (Xcode 15) and now references a specific test plan file (Amethyst.xctestplan) for test execution, ensuring compatibility with modern Xcode testing infrastructure.
Amethyst.xcodeproj/xcshareddata · high confidence
Migrate Amethyst to Swift and introduce command-line entry point
The Amethyst application code has been converted from Objective-C to Swift, replacing the legacy \AMAppDelegate\ and \main.m\ with a new \AppDelegate.swift\ and a \main.swift\ entry point that utilizes the ArgumentParser library. This migration introduces a new command-line interface, allowing users to run \amethyst --debug-info\ to print diagnostic information or \amethyst test\ to launch the app in a test context. The application now uses \LoginServiceKit\ for managing login items and \Sparkle\ for automatic updates, with the update feed URLs configured in the \Info.plist\. A new \default.amethyst\ configuration file is bundled with the app, defining default layouts, key bindings, and settings, while the status bar icon visibility can now be hidden via configuration.
Amethyst · high confidence
Migration to Swift and updated project configuration
The project has been migrated from Objective-C to Swift, replacing the previous main entry point and app delegate with Swift equivalents (main.swift, AppDelegate.swift) and adding a bridging header. The Xcode project file version has been updated to objectVersion 54, and several new frameworks and libraries have been linked, including Carbon, SkyLight, Silica, Sparkle, SwiftyJSON, Yams, KeyboardShortcuts, SwiftyBeaver, RxSwift, RxCocoa, Quick, Nimble, and ArgumentParser. Additionally, numerous Swift source files for layouts, managers, and preferences have been added to the build, along with their corresponding test files and JavaScript layout definitions.
Amethyst.xcodeproj · high confidence
New and updated preferences for window management and debugging
The preferences interface now includes a new Debug tab with options to show layout debug info and toggle development builds. The General tab has been updated to support Smart Window Margins, which automatically disable margins in fullscreen or single-window modes, and allows configuring minimum window width and height as well as the maximum window count. The Floating tab now provides a dedicated UI for managing floating applications, including the ability to select apps from a list or manually enter bundle identifiers, add specific window titles to float, and switch the list between blacklist and whitelist modes. Additionally, the Layouts tab now features a relaunch button that appears when layout order is changed and a button to open the custom layouts folder.
Amethyst/Preferences · high confidence
Redesigned preferences window and application menu
The application now features a new main menu structure and a redesigned preferences window. The menu bar includes a dedicated 'Layouts' submenu for managing window arrangements, a 'Reset Layouts' option for hard resets, and clearer labeling for 'Disable Tiling'. The preferences window has been updated with a toolbar containing tabs for General, Layouts, Shortcuts, Mouse, Floating, and Debug settings, utilizing macOS system icons for a modern appearance.
Amethyst/Base.lproj · high confidence
Redesigned preferences window and layout name HUD
The application now uses a custom-built preferences window that replaces the previous library-based implementation, featuring a toolbar with panes for General, Layouts, Shortcuts, Mouse, Floating, and Debug settings. A new layout name HUD window has been introduced to display the current layout name and an optional description (toggled via debug settings), with dynamic sizing to fit the text content. The preferences window also supports closing via a configured keyboard shortcut.
Amethyst/View · high confidence
Refactored window layout and frame assignment logic
The window layout system has been refactored to use Swift generics for better type safety and to support layout state persistence via Codable. Frame assignment logic is now exposed through the Layout class, allowing layouts to explicitly define how windows are positioned and sized. The system now supports custom layouts and allows resizing windows by mouse, with improved handling of window margins and minimum size constraints.
Amethyst/Layout · high confidence
Refined application manageability logic and table view utilities
The application now uses a more granular classification for window management eligibility, distinguishing between manageable, unmanageable, and undetermined states based on launch completion and activation policy. A comprehensive list of macOS system agents and UI helpers (such as Dashboard, Spotlight, and Dock) is explicitly ignored to prevent them from being managed. Additionally, a utility constant for handling table view selection states has been added.
Amethyst/Categories · high confidence
Removal of legacy MainMenu.xib interface file
The legacy MainMenu.xib file, which defined the application's main menu structure (including items like Preferences, Services, Hide, and Quit), has been deleted from the project. This change removes the static interface definition for the main menu in the English localization bundle, indicating a shift away from the previous Interface Builder-based menu configuration.
Amethyst/en.lproj · high confidence
Updated workspace configuration to include test plan
The Amethyst workspace file has been updated to explicitly reference the Amethyst.xctestplan file alongside the main project. This change ensures that the test plan is properly integrated into the workspace structure, allowing users to run and manage tests directly from the Xcode workspace interface.
Amethyst.xcworkspace · high confidence
Test coverage
Add test doubles for screen and window models; Added comprehensive unit tests for window layout logic; Added test fixtures for custom window layouts; Added test helper utilities for layout verification; Added tests for HotKeyManager and ScreenManager layout configuration; Added tests for user configuration command construction; Regenerated test target configuration for Xcode 15 and macOS 14.
Dependencies
Migrate to Swift Package Manager and update dependencies
The project has migrated its dependency management to Swift Package Manager, introducing new Package.resolved files for both the Xcode project and workspace. This change updates several key libraries: Sparkle is upgraded to version 2.9.5 (from 2.5.0 in the project scope), Swift Argument Parser to 1.5.0 (from 1.2.3), SwiftyJSON to 5.0.2 (from 5.0.1), and Yams to 5.1.3 (from 5.0.6). Additionally, the workspace scope includes the Silica library and KeyboardShortcuts version 2.2.4, while the project scope pins KeyboardShortcuts at 2.4.0. Other dependencies such as Cartography, RxSwift, and LoginServiceKit remain at their previous versions.
(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 40 → 58 (+18.2)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 72 → 69 (-2.9)
- Architecture 97 (new)
- Maturity 52 → 56 (+3.5)
- Readiness 18 → 49 (+31.2)
- Security 77 → 82 (+5.4)
Resolved (6)
- Dimension evaluation failed
- LLM evaluation failed
- No automated tests
- No exposed public API
- No tests found
- Test reliability not included
New (71)
- BinarySpacePartitioningLayout.frameAssignments (cognitive 18) (Amethyst/Layout/Layouts/BinarySpacePartitioningLayout.swift)
- BinarySpacePartitioningLayout.updateWithChange (cognitive 19) (Amethyst/Layout/Layouts/BinarySpacePartitioningLayout.swift)
- BinarySpacePartitioningLayout.updateWithChange (cyclomatic 17) (Amethyst/Layout/Layouts/BinarySpacePartitioningLayout.swift)
- CustomLayout.frameAssignments (cognitive 16) (Amethyst/Layout/Layouts/CustomLayout.swift)
- CustomLayout.frameAssignments (cyclomatic 16) (Amethyst/Layout/Layouts/CustomLayout.swift)
- Documentation: contradicts the code (docs/troubleshooting.md)
- Documentation: contradicts the code (docs/window-limit.md)
- Duplicated block (10 lines × 2) (Amethyst/Layout/Layouts/TwoPaneLayout.swift)
- Duplicated block (10 lines × 2) (Amethyst/Layout/ReflowOperation.swift)
- Duplicated block (11 lines × 4) (Amethyst/Layout/Layouts/ColumnLayout.swift)
- Duplicated block (12 lines × 2) (Amethyst/Managers/WindowTransitionCoordinator.swift)
- Duplicated block (13 lines × 7) (Amethyst/Layout/Layouts/FourColumnLayout.swift)
- Duplicated block (14 lines × 2) (Amethyst/Layout/Layouts/TallLayout.swift)
- Duplicated block (14 lines × 2) (Amethyst/Managers/FocusTransitionCoordinator.swift)
- Duplicated block (15 lines × 2) (Amethyst/Layout/Layouts/FourColumnLayout.swift)
- Duplicated block (15 lines × 2) (Amethyst/Layout/Layouts/TwoPaneLayout.swift)
- Duplicated block (15 lines × 2) (Amethyst/Preferences/FloatingPreferencesViewController.swift)
- Duplicated block (15–22 lines × 2) (Amethyst/Managers/WindowManager.swift)
- Duplicated block (20 lines × 2) (Amethyst/Layout/Layouts/FourColumnLayout.swift)
- Duplicated block (5 lines × 10) (Amethyst/Layout/Layouts/ColumnLayout.swift)
- …and 51 more
Changes since last survey
- 4 commits — 2 feature/other, 2 fixes
By area
- Amethyst/Managers — 2 commits
- Amethyst.xcworkspace/xcshareddata — 1 commit
- Amethyst/Preferences — 1 commit
Notable commits
- fix: Fix exponentiation in calculations (#1863)
- fix: Fix unresponsive Floating preferences menu on Tahoe (#1873)
- change: Avoid force unwrapping (#1866)
- change: Upgrade Sparkle (#1874)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ianyh/Amethyst 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 27 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 6508ee2cacf8f9b357e1a3249a8f28ba5c94db2a — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-d00c643c3f66.