XcodesOrg / XcodesOrg/xcodes

Feature Request: Allow providing macOS password via environment variable for CI support

Open
#432 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
4.8k
Forks
182
Avg merge
2d 12h
Merged PRs (30d)
1

Description

🙏 Request Summary

First of all, thank you for maintaining xcodes — it's an incredibly helpful tool for managing Xcode versions both locally and in CI environments.

I’m currently using xcodes in a self-hosted CI runner and ran into a limitation with the --select command, which requires superuser privileges. The current implementation prompts for a password interactively:

https://github.com/XcodesOrg/xcodes/blob/938adbc7d002744d508bd4e7a848a53dd94dc01e/Sources/XcodesKit/XcodeSelect.swift#L135-L141

✨ Feature Proposal

Would it be possible to enhance this behavior by optionally allowing the password to be provided via an environment variable — for example:

export XCODES_SUDO_PASSWORD=your_password

When this variable is set, xcodes could use its value instead of prompting interactively.

✅ Benefits

This would be extremely useful in non-interactive environments such as:

  • GitHub Actions
  • Self-hosted CI runners
  • Local automation scripts
    It would allow full automation of xcodes install --select without manual intervention.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Sources/XcodesKit/XcodeSelect.swift at the linked lines 135–141 and trace the password flow used by the --select command. Check how xcodes install --select behaves in a non-interactive CI environment. Done means the proposed environment variable can provide the password instead of an interactive prompt when set.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, swift
Domain
cli, operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.