Contributing to Usage4Claude

December 11, 2025 · View on GitHub

Thank you for your interest in contributing! We welcome all contributions.

How to Contribute

Reporting Bugs

Use the Bug Report template and include:

  • Clear description
  • Steps to reproduce
  • Expected vs actual behavior
  • Environment (macOS version, app version, chip type)
  • Screenshots if applicable

Suggesting Features

Use the Feature Request template and describe:

  • What you want to achieve
  • Why it's useful
  • How you envision it working

Submitting Code

  1. Fork the repository

  2. Clone and create a branch

    git clone https://github.com/f-is-h/Usage4Claude.git
    cd Usage4Claude
    git checkout -b feature/your-feature-name
    
  3. Make your changes

    • Follow the code style below
    • Add meaningful comments
    • Ensure code compiles without warnings
    • Test your changes
  4. Commit with conventional format

    git commit -m "feat: add awesome feature"
    

    Prefixes:

    • feat: New feature
    • fix: Bug fix
    • docs: Documentation
    • style: Code formatting
    • refactor: Code refactoring
    • test: Tests
    • chore: Build/tools
  5. Push and create PR

    git push origin feature/your-feature-name
    

    Then open a Pull Request on GitHub.

Code Style

Swift

  • 4 spaces for indentation (no tabs)
  • PascalCase for types
  • camelCase for functions and variables
  • Use // MARK: - to organize code
  • Add meaningful comments

Example:

// MARK: - Properties

/// User settings singleton
private let settings = UserSettings.shared

// MARK: - Public Methods

/// Refresh usage data
/// - Parameter force: Whether to force refresh
func refreshUsageData(force: Bool = false) {
    // Implementation
}

File Organization

Usage4Claude/
├── App/              # Application entry
├── Views/            # UI views
├── Models/           # Data models
├── Services/         # Business services
├── Helpers/          # Helper utilities
└── Resources/        # Assets and localizations

Testing Checklist

Before submitting PR:

  • Builds successfully
  • No compilation warnings
  • Tested on different macOS versions (if possible)
  • Tested on Intel and Apple Silicon (if possible)
  • Features work as expected
  • No new bugs introduced

Documentation

If your contribution involves:

  • New features → Update README.md
  • API changes → Update code comments
  • Settings changes → Update user documentation
  • New UI text → Update all localization files

Localization

To add a new language:

  1. Duplicate Resources/en.lproj/Localizable.strings
  2. Translate all strings
  3. Add the .lproj folder to the project
  4. Add the language enum to LocalizationHelper.swift

Getting Help

License

By contributing, you agree that your contributions will be licensed under the MIT License.


Thank you for contributing! 🙏