Thanks for your interest in contributing to SaneBar! This document explains how to get started.
# Clone the repo
git clone https://github.com/sane-apps/SaneBar.git
cd SaneBar
# Install dependencies
bundle install
# Generate Xcode project and verify build
./scripts/SaneMaster.rb verifyIf everything passes, you're ready to contribute!
- macOS 15.0+ (Sequoia or later)
- Xcode 16+
- Ruby 3.0+ (for build scripts)
- XcodeGen - installed via
bundle install
| Command | Purpose |
|---|---|
./scripts/SaneMaster.rb verify |
Build + run all tests |
./scripts/SaneMaster.rb test_mode |
Kill → Build → Launch → Stream logs |
./scripts/SaneMaster.rb logs --follow |
Stream live app logs |
Important: Always use
SaneMaster.rbinstead of rawxcodebuild. It handles XcodeGen, signing, and other project-specific configuration.
SaneBar/
├── Core/ # Business logic
│ ├── Services/ # AccessibilityService, HoverService, etc.
│ ├── Controllers/ # StatusBarController, SettingsController
│ └── Models/ # Data models
├── UI/ # SwiftUI views
│ ├── Settings/ # Settings tabs
│ └── SearchWindow/ # Find Icon UI
├── Tests/ # Unit tests (Swift Testing framework)
├── scripts/ # Build automation
└── project.yml # XcodeGen configuration
- Swift 5.9+ features encouraged
- @Observable instead of @StateObject
- Swift Testing framework (
import Testing,@Test,#expect) — NOT XCTest - Actors for services with shared mutable state
- Keep SwiftUI view bodies under 50 lines
When creating new files:
- Run
xcodegen generateafter adding files (or use./scripts/SaneMaster.rb verify) - Follow existing naming patterns:
- Services:
*Service.swiftinCore/Services/ - Models:
*Model.swiftinCore/Models/ - Views:
*View.swiftinUI/
- Services:
For detailed coding rules, see .claude/rules/README.md.
- Check GitHub Issues for existing discussions
- For significant changes, open an issue first to discuss the approach
- Fork the repository
- Create a branch from
main(e.g.,feature/my-featureorfix/issue-123) - Make your changes following the coding standards
- Run tests:
./scripts/SaneMaster.rb verify - Submit a PR with:
- Clear description of what changed and why
- Reference to any related issues
- Screenshots for UI changes
Follow conventional commit format:
type: short description
Longer explanation if needed.
Fixes #123
Types: feat, fix, docs, refactor, test, chore
SaneBar uses Swift Testing (not XCTest):
import Testing
@testable import SaneBar
@Test("Hiding service toggles state correctly")
func hidesAndShows() async {
let service = HidingService()
#expect(service.isHidden == false)
await service.hide()
#expect(service.isHidden == true)
}Run tests:
./scripts/SaneMaster.rb verifySaneBar uses macOS Accessibility APIs extensively. Key things to know:
- The app requires Accessibility permission to function
- Use
AXIsProcessTrusted()to check permission status - Always verify API existence:
./scripts/SaneMaster.rb verify_api <symbol> <framework>
For deep dives, see docs/DEBUGGING_MENU_BAR_INTERACTIONS.md.
| Document | Purpose |
|---|---|
| README.md | User-facing overview |
| DEVELOPMENT.md | Full development SOP |
| GitHub Issues | Bug reports and tracking |
This project follows the Contributor Covenant. Please be respectful and constructive.
- Open a GitHub Issue
- Check existing Discussions (if enabled)
Thank you for contributing!
Are you tired of waiting on the dev to get around to fixing your problem?
Do you have a great idea that could help everyone in the community, but think you can't do anything about it because you're not a coder?
Good news: you actually can.
Copy and paste this into Claude or Codex, then describe your bug or idea:
I want to contribute to this repo, but I'm not a coder.
Repository:
https://github.com/sane-apps/SaneBar
Bug or idea:
[Describe your bug or idea here in plain English]
Please do this for me:
1) Understand and reproduce the issue (or understand the feature request).
2) Make the smallest safe fix.
3) Open a pull request to https://github.com/sane-apps/SaneBar
4) Give me the pull request link.
5) Open a GitHub issue in https://github.com/sane-apps/SaneBar/issues/new?template=bug_report.md that includes:
- the pull request link
- a short summary of what changed and why
6) Also give me the exact issue link.
Important:
- Keep it focused on this one issue/idea.
- Do not make unrelated changes.
If needed, you can also just email the pull request link to hi@saneapps.com.
I review and test every pull request before merge.
If your PR is merged, I will publicly give you credit, and you'll have the satisfaction of knowing you helped ship a fix for everyone.