@@ -4,159 +4,197 @@ title: Installation
44sidebar_label : Installation
55---
66
7+ ## Homebrew
78
8- ### Binary
9+ ``` bash
10+ brew tap lets-cli/tap
11+ brew install lets-cli/tap/lets
12+ ```
13+
14+ ## Arch
915
10- import Tabs from ' @theme/Tabs' ;
11- import TabItem from ' @theme/TabItem' ;
16+ Install the latest binary release from [ AUR lets-bin] ( https://aur.archlinux.org/packages/lets-bin/ ) .
1217
13- <Tabs
14- defaultValue = " shell"
15- values = { [
16- { label: ' Shell' , value: ' shell' , },
17- { label: ' Binary' , value: ' binary' , },
18- ]}
19- >
20- <TabItem value = " shell" >
18+ If you use ` yay ` as your AUR helper:
2119
2220``` bash
23- curl --proto ' =https ' --tlsv1.2 -sSf https:// lets-cli.org/install.sh | sh -s -- -b ~ / bin
21+ yay -S lets-bin
2422```
2523
26- This will install ** latest ** ` lets ` binary to ` ~/bin ` directory .
24+ You can also install the bleeding edge version from [ AUR lets-git ] ( https://aur.archlinux.org/packages/lets-git/ ) .
2725
28- To be able to run ` lets ` from any place in system add ` $HOME/bin ` to your ` PATH `
26+ ``` bash
27+ yay -S lets-git
28+ ```
2929
30- Open one of these files
30+ ## Shell Script
3131
3232``` bash
33- vim ~ /.profile # or vim ~/.bashrc or ~/.zshrc
33+ curl -fsSL https://lets-cli.org/install.sh | bash
3434```
3535
36- Add the following line at the end of file, save file and restart the shell.
36+ This installs the ** latest** ` lets ` binary to ` $HOME/.lets/bin/lets ` .
37+
38+ The installer will make ` lets ` available in your ` PATH ` by creating a symlink in the first existing preferred
39+ directory from this list:
40+
41+ * ` $HOME/.local/bin `
42+ * ` $HOME/bin `
43+ * ` $HOME/.bin `
44+
45+ If none of these directories are in ` PATH ` , the installer creates ` $HOME/.local/bin ` , links ` lets ` there, and adds
46+ ` $HOME/.local/bin ` to your shell profile.
47+
48+ For CI and other non-interactive installs, set ` LETS_INSTALL_NO_PROMPT=1 ` to skip shell profile prompts. When PATH
49+ setup is needed, the installer will use the same non-interactive behavior and update the detected shell profile.
3750
3851``` bash
39- export PATH= $PATH : $HOME /bin
52+ curl -fsSL https://lets-cli.org/install.sh | LETS_INSTALL_NO_PROMPT=1 bash
4053```
4154
42- You can change install location to any directory you want, probably to directory that is in your $PATH
43-
4455To install a specific version of ` lets ` (for example ` v0.0.21 ` ):
4556
4657``` bash
47- curl --proto ' = https' --tlsv1.2 -sSf https ://lets-cli.org/install.sh | sh -s -- v0.0.21
58+ curl -fsSL https://lets-cli.org/install.sh | bash -s -- v0.0.21
4859```
4960
50- To use ` lets ` globally in system you may want to install ` lets ` to ` /usr/local/bin `
61+ You can also use ` LETS_VERSION ` . If both ` LETS_VERSION ` and a positional version are provided, ` LETS_VERSION ` wins.
62+
63+ ``` bash
64+ curl -fsSL https://lets-cli.org/install.sh | LETS_VERSION=v0.0.21 bash
65+ ```
5166
52- > May require ` sudo `
67+ To install into a custom lets home directory, set ` LETS_HOME ` . The binary will be installed to ` $LETS_HOME/bin/lets ` .
5368
5469``` bash
55- curl --proto ' = https' --tlsv1.2 -sSf https ://lets-cli.org/install.sh | sh -s -- -b /usr/local/bin
70+ curl -fsSL https://lets-cli.org/install.sh | LETS_HOME= $HOME /tools/lets bash
5671```
5772
58- </TabItem >
59- <TabItem value = ' binary' >
73+ ## Binary (Manual)
6074
6175Download the version you need for your platform from [ Lets Releases] ( https://github.com/lets-cli/lets/releases ) .
6276
6377Once downloaded, the binary can be run from anywhere.
6478
65- Ideally, you should install it somewhere in your PATH for easy use. ` /usr/ local/bin` is the most probable location .
79+ Ideally, install it somewhere in your user ` PATH ` , such as ` $HOME/. local/bin` .
6680
67- </TabItem >
68- </Tabs >
81+ ## GitHub Action
6982
83+ Use [ lets-cli/lets-action] ( https://github.com/lets-cli/lets-action ) in a GitHub Actions workflow:
7084
71- ### Package managers
85+ ``` yaml
86+ - name : Install Lets
87+ uses : lets-cli/lets-action@v1.1
88+ with :
89+ version : latest
90+ ` ` `
91+
92+ ## Update
7293
73- <Tabs
74- defaultValue = " snap"
75- values = { [
76- { label: ' Snap' , value: ' snap' , },
77- { label: ' Homebrew' , value: ' homebrew' , },
78- { label: ' Arch' , value: ' arch' , },
79- ]}
80- >
81- <TabItem value = " arch" >
94+ ### Self Upgrade
8295
83- You can get binary release from https://aur.archlinux.org/packages/ lets-bin/
96+ Starting from version ` 0.0.30`, lets has a built-in self-upgrade command.
8497
85- If you are using ` yay ` as AUR helper:
98+ It updates the binary located at `which lets`.
8699
87100` ` ` bash
88- yay -S lets-bin
101+ lets self upgrade
89102` ` `
90103
91- Also you can get bleeding edge version from https://aur.archlinux.org/packages/lets-git/
104+ Self upgrade is intended for installer-managed and manual user-owned installs. If `lets` was installed by Homebrew,
105+ Arch, or another package manager, use that package manager instead.
106+
107+ If your `lets` version is below `0.0.30`, use the shell script and specify the latest version.
108+
109+ # ## Homebrew
92110
93111` ` ` bash
94- yay -S lets-git
112+ brew upgrade lets-cli/tap/lets
113+ ` ` `
114+
115+ # ## Arch
116+
117+ AUR packages provide the latest version.
118+
119+ ` ` ` bash
120+ yay -Syu lets-bin
95121` ` `
96122
97- </TabItem >
98- <TabItem value = " snap" >
123+ For the bleeding edge package :
124+
125+ ` ` ` bash
126+ yay -Syu lets-git
127+ ` ` `
99128
100- TODO
129+ # ## Shell Script
101130
102- </TabItem >
103- <TabItem value = " homebrew" >
131+ Run the install script again to update `lets` to the latest version.
104132
105133` ` ` bash
106- brew tap lets-cli/tap
134+ curl -fsSL https:// lets-cli.org/install.sh | bash
107135` ` `
108136
137+ To update to a specific version :
138+
109139` ` ` bash
110- brew install lets-cli/tap/lets
140+ curl -fsSL https:// lets-cli.org/install.sh | LETS_VERSION=v0.0.21 bash
111141` ` `
112142
113- </TabItem >
114- </Tabs >
143+ # ## Binary
115144
116- ## Update
145+ Download the latest version from [Lets Releases](https://github.com/lets-cli/lets/releases) and replace your existing
146+ ` lets` binary.
117147
118- <Tabs
119- defaultValue = " self"
120- values = { [
121- { label: ' Self upgrade' , value: ' self' , },
122- { label: ' Shell script' , value: ' shell' , },
123- { label: ' Binary' , value: ' binary' , },
124- { label: ' Arch' , value: ' arch' , },
125- ]}
126- >
127- <TabItem value = " self" >
148+ # # Uninstall Lets
128149
129- Starting from version ` 0.0.30 ` lets has a built-in self-upgrade command.
150+ # ## Self Upgrade
130151
131- It updates binary located at ` which lets `
152+ Self upgrade is not a separate install source. If your current binary came from Homebrew or Arch, use the package
153+ manager uninstall instructions below. Otherwise, use the Shell Script or Binary instructions.
132154
155+ # ## Homebrew
133156
134157` ` ` bash
135- lets self upgrade
158+ brew uninstall lets-cli/tap/lets
136159` ` `
137160
138- If your ` lets ` version is below ` 0.0.30 ` - use shell script and specify the latest version.
161+ Optionally remove the tap after uninstalling :
139162
140- </TabItem >
141- <TabItem value = " shell" >
163+ ` ` ` bash
164+ brew untap lets-cli/tap
165+ ` ` `
142166
143- To update ` lets ` you can use shell script
167+ # ## Arch
144168
169+ ` ` ` bash
170+ yay -R lets-bin
145171` ` `
146- curl --proto '=https' --tlsv1.2 -sSf https://lets-cli.org/install.sh | sh -s -- -b $(dirname $(which lets))
172+
173+ For the bleeding edge package :
174+
175+ ` ` ` bash
176+ yay -R lets-git
147177` ` `
148178
149- Running script will update ` lets ` to ** latest ** version.
179+ # ## Shell Script
150180
151- </TabItem >
152- <TabItem value = " binary" >
181+ Remove the install script binary and common PATH symlinks :
153182
154- You can download latest version from [ Lets Releases] ( https://github.com/lets-cli/lets/releases ) .
183+ ` ` ` bash
184+ rm -f "$HOME/.local/bin/lets" "$HOME/bin/lets" "$HOME/.bin/lets"
185+ rm -rf "$HOME/.lets"
186+ ` ` `
155187
156- </TabItem >
157- <TabItem value = " arch" >
188+ If you installed with a custom `LETS_HOME`, remove that directory instead of `$HOME/.lets`.
158189
159- AUR repository always provides ** latest ** version .
190+ If the installer added `$HOME/.local/bin` to your shell profile, remove the `# lets` block from that profile .
160191
161- </TabItem >
162- </Tabs >
192+ # ## Binary
193+
194+ Remove the binary from the location where you installed it.
195+
196+ For example, if it is the active `lets` on your `PATH` and is not managed by Homebrew or Arch :
197+
198+ ` ` ` bash
199+ rm -f "$(command -v lets)"
200+ ` ` `
0 commit comments