Feature Request: Allow providing macOS password via environment variable for CI support
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:
✨ 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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