Skip to main content

Contributing Guide

How to contribute to the App Store Connect CLI project
Thanks for your interest in contributing to the App Store Connect CLI! This guide will help you get started with development, testing, and submitting contributions.

Development Setup

Requirements

  • Go 1.26 or higher
  • Git
  • (Optional) macOS for keychain integration testing

Clone and Build

Clone the repository and build the CLI:
This creates the asc binary in the current directory.

Run Tests

Run the test suite:
Important: Always use keychain bypass when running tests to avoid macOS keychain prompts:

Optional Tooling

Install development tools:

Integration Tests (Opt-in)

Integration tests hit the real App Store Connect API and are skipped by default. To run integration tests, set credentials in your environment:

Headless Alternative

For CI/CD or headless environments, use base64-encoded keys:

Local API Testing (Optional)

If you have App Store Connect API credentials, you can run real API calls locally:

Credential Storage

Credentials are stored:
  1. macOS: System keychain (when available)
  2. Fallback: Config file at ~/.asc/config.json (restricted permissions)
  3. Repo-local: ./.asc/config.json (also supported)
Important: Do not commit secrets or .p8 files to the repository.

Local Validation

Run this checklist before opening a PR:

Command Documentation

If you changed command/help text, regenerate documentation:
Commit docs/COMMANDS.md if it changed.

Pull Request Guidelines

Before Opening a PR

  1. Keep PRs small and focused: One logical change per PR
  2. Add or update tests: Cover new behavior and edge cases
  3. Update README: If behavior or scope changes
  4. Avoid committing credentials: No API keys or .p8 files
  5. Run validation: Complete the local validation checklist above

PR Checklist

  • Code formatted (make format)
  • Linting passes (make lint)
  • Tests pass (ASC_BYPASS_KEYCHAIN=1 make test)
  • Command docs updated (make generate-command-docs)
  • Build succeeds (make build)
  • README updated (if needed)
  • No secrets committed

Pre-commit Hook

Install local pre-commit hook to enforce checks automatically:
This runs formatting, linting, and doc checks before each commit.

PR Description

Include in your PR description:
  • What: What does this PR do?
  • Why: Why is this change needed?
  • How: How does it work?
  • Testing: Commands run and key scenarios validated
  • Breaking changes: Note any backward-incompatible changes

Development Workflow

Git Workflow

  1. Fork the repository
  2. Create a branch from main:
  3. Make changes and commit:
  4. Push to your fork:
  5. Open a PR against main

Commit Message Style

Follow conventional commit format:
  • feat: - New feature
  • fix: - Bug fix
  • refactor: - Code refactoring
  • test: - Test additions/changes
  • docs: - Documentation changes
  • chore: - Maintenance tasks
Example:

Testing Discipline

Test-Driven Development (TDD)

For bugs, refactors, and new features:
  1. Start with a failing test that captures expected behavior
  2. Implement the fix or feature
  3. Verify the test passes
  4. Refactor if needed

Test Coverage

For new features:
  • CLI-level tests: Flags, output, errors, exit codes
  • Unit tests: Core logic and edge cases
  • Integration tests (optional): Real API calls

Test Patterns

Test realistic CLI invocation patterns:
For more details, see docs/TESTING.md.

CLI Implementation Checklist

When adding new commands:
  • Register in internal/cli/registry/registry.go
  • Set UsageFunc: shared.DefaultUsageFunc
  • Use shared.ContextWithTimeout for HTTP requests
  • Validate required flags and test error messages
  • Add internal/cli/cmdtest coverage
  • Use httptest for network payload tests
  • Update help text and examples

Architecture Guidelines

Architecture-First Development

Before implementing new commands/flags, produce a design note:
  1. Command placement in existing taxonomy
  2. OpenAPI endpoint/schema validation
  3. UX shape: Flags, output formats, exit codes
  4. Backward compatibility and deprecation impact
  5. Test plan: RED → GREEN approach
If command shape is ambiguous, align before coding.

Command Lifecycle

User-facing commands/flags follow lifecycle states:
  • experimental - Early development, may change
  • stable - Production-ready, backward compatible
  • deprecated - Scheduled for removal, migration path provided
  • removed - No longer available
Do not delete stable commands directly. Deprecate first with:
  • Warning text in help/output
  • Tests covering old and new behavior
  • Changelog entry with upgrade path

Security

Reporting Security Issues

Do NOT open public GitHub issues for security vulnerabilities. Report privately using GitHub Security Advisories: https://github.com/rorkai/App-Store-Connect-CLI/security/advisories/new If you can’t use GitHub Security Advisories, contact the maintainer: https://github.com/rudrankriyam

What to Include

  • Clear description of vulnerability and potential impact
  • Steps to reproduce (proof-of-concept if possible)
  • Affected versions and platforms (macOS/Linux, Go version, etc.)

Supported Versions

Security updates are provided for:
  • Latest stable release
  • main branch

Wall of Apps

Wall content is generated by make update-wall-of-apps. The generator reads docs/wall-of-apps.json and updates the Wall snippet in README.md.

Add Your App

  1. Fork the repository
  2. Run:
    This updates docs/wall-of-apps.json and syncs README.md in one step.
  3. Alternative: Edit docs/wall-of-apps.json directly, then run:
  4. Commit all generated changes:
    • docs/wall-of-apps.json
    • README.md
  5. Open a PR

Format

Platform values are free-form labels: iOS, macOS, watchOS, tvOS, visionOS, Android, Web. Note: If you only change the Wall table in README.md without updating docs/wall-of-apps.json, CI will fail the Wall generation check.

Additional Resources

Documentation

  • docs/GO_STANDARDS.md - Go coding standards
  • docs/TESTING.md - Testing patterns and conventions
  • docs/CONTRIBUTING.md - Detailed CLI development notes
  • docs/API_NOTES.md - API quirks and behaviors
  • CONTRIBUTING.md - This guide (root)

API Reference

Getting Help

If you need help:
  1. Check existing issues: https://github.com/rorkai/App-Store-Connect-CLI/issues
  2. Read documentation: Command reference, API notes, testing guide
  3. Ask in discussions: Open a GitHub discussion
  4. Open an issue: If you’ve found a bug or have a feature request

License

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

Code of Conduct

Please review and follow the Code of Conduct.

Thank You!

Contributions of all sizes are appreciated. Whether it’s fixing typos, reporting bugs, or implementing features, every contribution helps make the CLI better for everyone.