First off, thank you for considering contributing to this project! Your help makes this toolkit better for everyone running macOS servers.
- Code of conduct
- How can I contribute?
- Development setup
- Coding standards
- Commit message guidelines
- Pull request process
- Issue guidelines
- Documentation standards
- Security vulnerabilities
- Recognition
This project follows a simple code of conduct:
- Be respectful — Treat everyone with respect and kindness
- Be constructive — Offer helpful feedback and suggestions
- Be patient — Remember that maintainers are volunteers
- Be inclusive — Welcome newcomers and help them contribute
Before submitting a bug report:
- Check existing issues — Search open issues to see if it's already reported
- Verify the bug — Ensure it's reproducible and not a configuration issue
- Collect information — Gather details about your environment
When submitting a bug report, include:
**Environment:**
- macOS version: (e.g., 15.7.3 Sequoia)
- Hardware: (e.g., Mac mini 8,1, Intel i7)
- SIP status: (enabled/disabled)
- Script version: (run `./optimise.sh --version`)
**Description:**
Clear description of the bug.
**Steps to reproduce:**
1. Step one
2. Step two
3. ...
**Expected behaviour:**
What you expected to happen.
**Actual behaviour:**
What actually happened.
**Logs:**
Attach relevant logs from `logs/optimisation_*.log`Enhancement suggestions are welcome! Before submitting:
- Check existing requests — Search issues for similar suggestions
- Consider scope — Does it fit the project's purpose (server optimisation)?
- Provide context — Explain the use case and benefits
Include in your suggestion:
- Problem statement — What limitation or need does this address?
- Proposed solution — How would you implement it?
- Alternatives considered — What other approaches did you consider?
- Additional context — Screenshots, links to documentation, etc.
We especially welcome testing on:
- Apple Silicon Macs (M1, M2, M3, M4 series)
- Different macOS versions (15.0 - 15.x)
- Different Mac models (iMac, Mac Pro, MacBook Pro in clamshell mode)
When reporting test results:
**Hardware tested:**
- Model: (e.g., Mac Studio M2 Max)
- Chip: (e.g., Apple M2 Max)
- RAM: (e.g., 32GB)
**macOS version:** 15.x.x
**Test results:**
- [ ] Script runs without errors
- [ ] Services disable correctly
- [ ] Network tuning applies
- [ ] Power settings apply
- [ ] Backup/restore works
- [ ] No system instability observed
**Notes:**
Any observations, warnings, or issues encountered.Documentation improvements are highly valued:
- Fix typos and grammatical errors
- Clarify confusing explanations
- Add missing information
- Update outdated content
- Add examples and use cases
- Improve code comments
Code contributions should:
- Follow the coding standards
- Include appropriate tests (manual testing steps at minimum)
- Update documentation if behaviour changes
- Not break existing functionality
- macOS 15.x (Sequoia) — or VM for testing
- Bash 3.2+ (macOS default)
- Git
- A test environment (VM recommended for destructive testing)
# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/macos-sequoia-optimisation.git
cd macos-sequoia-optimisation
# Create a feature branch
git checkout -b feature/your-feature-name
# Make your changes
# ...
# Test your changes (always use --dry-run first!)
./optimise.sh --dry-run --verbose
# Run shellcheck for linting (if installed)
shellcheck optimise.sh backup_settings.sh restore.shWarning: Never test on production systems without backups!
- Use dry-run mode — Always test with
--dry-runfirst - Use a VM — Test destructive changes in a virtual machine
- Check logs — Review
logs/for any warnings or errors - Test restore — Verify backup/restore works before and after changes
Follow these conventions for consistency:
# Use strict mode
set -euo pipefail
# Use lowercase for local variables
local my_variable="value"
# Use UPPERCASE for constants and exports
readonly CONFIG_DIR="/etc/myapp"
export PATH
# Use snake_case for function names
my_function_name() {
# Function body
}
# Quote all variable expansions
echo "${variable}"
command --option="${value}"
# Use [[ ]] for conditionals (not [ ])
if [[ -f "${file}" ]]; then
# ...
fi
# Use $(command) for command substitution (not backticks)
result=$(some_command)Scripts should follow this structure:
#!/usr/bin/env bash
# Description of what the script does
# Usage: ./script.sh [options]
set -euo pipefail
# ============================================================================
# Constants and defaults
# ============================================================================
readonly VERSION="1.0.0"
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# ============================================================================
# Utility functions
# ============================================================================
log_info() { ... }
log_error() { ... }
# ============================================================================
# Core functions
# ============================================================================
main() {
# Main logic
}
# ============================================================================
# Entry point
# ============================================================================
main "$@"services.conf (pipe-delimited):
# Comment explaining the service
DOMAIN|SERVICE_NAME|CATEGORY|DESCRIPTION
sysctl.conf (key=value):
# Comment explaining the parameter
key=value
defaults.conf (pipe-delimited):
# Comment explaining the preference
DOMAIN|KEY|TYPE|VALUE|DESCRIPTION
Follow the Conventional Commits specification:
<type>(<scope>): <description>
[optional body]
[optional footer]
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation only |
style |
Formatting, no code change |
refactor |
Code change that neither fixes nor adds |
perf |
Performance improvement |
test |
Adding or updating tests |
chore |
Maintenance tasks |
# Feature
feat(services): add support for disabling Handoff
# Bug fix
fix(restore): handle missing manifest.json gracefully
# Documentation
docs(README): add Apple Silicon compatibility notes
# Refactoring
refactor(backup): extract plist export to separate function- Ensure tests pass — Run
./optimise.sh --dry-runwithout errors - Run shellcheck — Fix any linting warnings
- Update documentation — If behaviour changes
- Rebase on main — Keep your branch up to date
- Code follows project style guidelines
- Self-reviewed my own code
- Added comments for complex logic
- Updated documentation if needed
- Tested on macOS (specify version)
- No new warnings from shellcheck
- Commit messages follow guidelines
## Description
Brief description of changes.
## Type of change
- [ ] Bug fix (non-breaking change fixing an issue)
- [ ] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality to change)
- [ ] Documentation update
## Testing performed
- macOS version tested:
- Hardware tested on:
- Test steps:
1. ...
2. ...
## Checklist
- [ ] My code follows the project style guidelines
- [ ] I have tested my changes
- [ ] I have updated documentation accordingly
- [ ] My changes don't introduce new warnings- Automated checks — Must pass (if configured)
- Maintainer review — At least one approval required
- Address feedback — Respond to review comments
- Merge — Maintainer merges after approval
# Good
fix: restore.sh fails when backup contains spaces in paths
feat: add support for disabling Universal Control
docs: clarify SIP requirements for Apple Silicon
# Bad
It doesn't work
Bug
Help needed
| Label | Description |
|---|---|
bug |
Something isn't working |
enhancement |
New feature request |
documentation |
Documentation improvements |
good first issue |
Good for newcomers |
help wanted |
Extra attention needed |
apple-silicon |
Apple Silicon related |
intel |
Intel Mac related |
wontfix |
Will not be addressed |
When adding claims about macOS behaviour:
- Cite authoritative sources — Apple docs, man pages, RFCs
- Link to source — Include URL
- Mark unverified claims — Use warning callout
Example:
According to [Apple Support HT202528](https://support.apple.com/en-us/101992),
serverperfmode is only available on Intel-based Macs.
> **Note:** The following is based on community testing and is not officially
> documented by Apple.- Verify claims before documenting
- Test commands before including them
- Include macOS version when behaviour is version-specific
- Acknowledge when documentation is based on reverse engineering
Do not open public issues for security vulnerabilities.
Instead:
- Email the maintainer directly (see Author section in README)
- Include detailed description of the vulnerability
- Provide steps to reproduce if possible
- Allow reasonable time for a fix before disclosure
Contributors are recognised in the following ways:
- Git history — Your commits are permanently recorded
- Release notes — Significant contributions mentioned in changelog
- Contributors list — Added to repository contributors
Special recognition for:
- First-time contributors
- Major feature implementations
- Significant documentation improvements
- Extensive testing on new hardware
If you have questions about contributing:
- Check existing issues and discussions
- Open a new discussion for general questions
- Open an issue for specific bugs or feature requests
Thank you for contributing!