-
Notifications
You must be signed in to change notification settings - Fork 464
/
install.md.tmpl
232 lines (152 loc) · 5.37 KB
/
install.md.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
{{- $version := gitHubLatestRelease "twpayne/chezmoi" -}}
# Install
The latest version of chezmoi is {{ $version }}.
## One-line package install
Install chezmoi with your package manager with a single command:
=== "Linux"
=== "snap"
```sh
snap install chezmoi --classic
```
=== "Linuxbrew"
```sh
brew install chezmoi
```
=== "asdf"
```sh
asdf plugin add chezmoi && asdf install chezmoi {{ $version }}
```
=== "Alpine"
```sh
apk add chezmoi
```
=== "Arch"
```sh
pacman -S chezmoi
```
=== "Nix / NixOS"
```sh
nix-env -i chezmoi
```
=== "Termux"
```sh
pkg install chezmoi
```
=== "Void"
```sh
xbps-install -S chezmoi
```
=== "macOS"
=== "Homebrew"
```sh
brew install chezmoi
```
=== "MacPorts"
```sh
port install chezmoi
```
=== "Nix"
```sh
nix-env -i chezmoi
```
=== "asdf"
```sh
asdf plugin add chezmoi && asdf install chezmoi {{ $version }}
```
=== "Windows"
=== "Chocolatey"
```
choco install chezmoi
```
=== "Scoop"
```
scoop install chezmoi
```
=== "FreeBSD"
```sh
pkg install chezmoi
```
=== "OpenIndiana"
```sh
pkg install application/chezmoi
```
For more packages, see [chezmoi on
repology.org](https://repology.org/project/chezmoi/versions).
## One-line binary install
Install the correct binary for your operating system and architecture in `./bin`
with a single command:
=== "curl"
```sh
sh -c "$(curl -fsLS https://chezmoi.io/get)"
```
=== "wget"
```sh
sh -c "$(wget -qO- https://chezmoi.io/get)"
```
=== "PowerShell"
```powershell
(irm -useb https://chezmoi.io/get.ps1) | powershell -c -
```
!!! hint
If you already have a dotfiles repo using chezmoi on GitHub at
`https://github.com/$GITHUB_USERNAME/dotfiles` then you can install
chezmoi and your dotfiles with the single command:
```sh
sh -c "$(curl -fsLS https://chezmoi.io/get)" -- init --apply $GITHUB_USERNAME
```
!!! hint
To install the chezmoi binary in a different directory, use the `-b` option,
for example:
```sh
sh -c "$(curl -fsLS https://chezmoi.io/get)" -- -b $HOME/.local/bin
```
## Download a pre-built Linux package
Download a package for your distribution and architecture.
=== "deb"
{{ range $arch := list "amd64" "arm64" "armel" "i386" "mips64" "mips64le" "ppc64" "ppc64le" "riscv64" "s390x" }}
[`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_linux_{{ $arch }}.deb)
{{- end }}
=== "rpm"
{{ range $arch := list "aarch64" "armhfp" "i686" "mips64" "mips64le" "ppc64" "ppc64le" "s390x" "riscv64" "x86_64" }}
[`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi-{{ $version }}-{{ $arch }}.rpm)
{{- end }}
=== "apk"
{{ range $arch := list "386" "amd64" "arm" "arm64" "mips64" "mips64le" "ppc64" "ppc64le" "riscv64" "s390x" }}
[`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_linux_{{ $arch }}.apk)
{{- end }}
## Download a pre-built binary
Download an archive for your operating system and architecture containing a
pre-built binary and shell completions.
=== "Linux"
{{ range $arch := list "amd64" "arm" "arm64" "i386" "loong64" "mips64" "mips64le" "ppc64" "ppc64le" "riscv64" "s390x" }}
[`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_linux_{{ $arch }}.tar.gz)
{{- end }}
[`amd64` (glibc)](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_linux-glibc_amd64.tar.gz)
[`amd64` (musl)](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_linux-musl_amd64.tar.gz)
=== "macOS"
{{ range $arch := list "amd64" "arm64" }}
[`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_darwin_{{ $arch }}.tar.gz)
{{- end }}
=== "Windows"
{{ range $arch := list "amd64" "arm" "arm64" "i386" }}
[`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_windows_{{ $arch }}.zip)
{{- end }}
=== "FreeBSD"
{{ range $arch := list "amd64" "arm" "arm64" "i386" }}
[`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_freebsd_{{ $arch }}.tar.gz)
{{- end }}
=== "OpenBSD"
{{ range $arch := list "amd64" "arm" "arm64" "i386" }}
[`{{ $arch }}`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_openbsd_{{ $arch }}.tar.gz)
{{- end }}
=== "Illumos"
[`amd64`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_illumos_amd64.tar.gz)
=== "Solaris"
[`amd64`](https://github.com/twpayne/chezmoi/releases/download/v{{ $version }}/chezmoi_{{ $version }}_solaris_amd64.tar.gz)
## Install from source
Download, build, and install chezmoi for your system with Go 1.18 or later:
```console
$ git clone https://github.com/twpayne/chezmoi.git
$ cd chezmoi
$ make install-from-git-working-copy
```