Skip to content

Commit dbe9f6c

Browse files
committedJun 10, 2024
Added more details to the readme
1 parent dd257ff commit dbe9f6c

File tree

2 files changed

+65
-7
lines changed

2 files changed

+65
-7
lines changed
 

‎README.md

+64-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,74 @@
1-
# xcode-version-manager
1+
# Xcode Version Manager (xcvm)
2+
3+
Manage multiple installations of Xcode with a simple command line tool. All commands have completions for bash, fish, and zsh shells.
24

3-
A command line tool to manage multiple installations of Xcode.
45

56
## Installation
67

7-
```
8+
### Homebrew
9+
```shell
810
brew install craigsiemens/tap/xcode-version-manager
911
```
1012

11-
## Details
13+
### Manually
14+
Clone the repo then build the binary.
15+
```shell
16+
make build
17+
```
18+
The binary will be available at `.build/release/xcvm`.
19+
20+
Shell completions can be generated as well.
21+
```shell
22+
make completions
23+
```
24+
They will be available in `.build/completions` for you to copy to the specific location required by your shell.
25+
26+
27+
## Usage
28+
29+
### Download
30+
31+
Pass a specific version or `latest` to download Xcode. It will open the download url in your browser to use your existing Apple ID authentication.
32+
33+
```shell
34+
xcvm download latest
35+
# or
36+
xcvm download 15.4
37+
```
38+
39+
40+
### Install
41+
42+
Pass the path to the downloaded xip file or in the progress download file for your browser (`*.download` or `*.crdownload`). The Xcode app will be renamed based on the version to allow multiple versions to be installed at the same time.
43+
44+
```shell
45+
xcvm install ~/Downloads/Xcode-15.xip
46+
# or
47+
xcvm install ~/Downloads/Xcode-15.xip.download
48+
```
49+
50+
### Use
51+
52+
Pass the version number of Xcode to use for the command line developer tools.
53+
54+
```shell
55+
xcvm use 15.4
56+
```
57+
58+
Since this command calls `xcode-select`, which requires super user permissions, you may need to call it with `sudo` or by passing the `--sudo-askpass` flag. See `xcvm use --help` for more details.
59+
60+
### Uninstall
61+
62+
Pass a version number to uninstall a version of Xcode.
63+
64+
```shell
65+
xcvm uninstall 15.0
66+
```
67+
68+
This is faster than moving Xcode the Trash since it doesn't spend time counting the files to show a progress bar when emptying the Trash.
69+
70+
71+
## `xcvm help`
1272
```
1373
OVERVIEW: Manage multiple installed versions of Xcode.
1474

‎makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ BINARY=$(shell swift build $(SWIFT_BUILD_FLAGS) --show-bin-path)/$(NAME)
44
COMPLETIONS_DIR=.build/completions
55
MAIN_BRANCH=main
66

7-
BINARIES_FOLDER=/usr/local/bin
8-
97
.PHONY: all clean build completions readme push-version
108

119
all: build
@@ -23,7 +21,7 @@ completions: build
2321
"$(BINARY)" --generate-completion-script fish > "$(COMPLETIONS_DIR)/fish"
2422

2523
readme: build
26-
perl -i -0pe "s/## Details\n\`\`\`(.|\n)*?\`\`\`/## Details\n\`\`\`\n$$("$(BINARY)" help)\n\`\`\`/g" README.md
24+
perl -i -0pe "s/## \`xcvm help\`\n\`\`\`(.|\n)*?\`\`\`/## \`xcvm help\`\n\`\`\`\n$$("$(BINARY)" help)\n\`\`\`/g" README.md
2725

2826
push-version:
2927
ifneq ($(strip $(shell git status --untracked-files=no --porcelain 2>/dev/null)),)

0 commit comments

Comments
 (0)