You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/polykey-cli/installation.md
+43-17Lines changed: 43 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,18 @@
1
+
import Tabs from '@theme/Tabs';
2
+
import TabItem from '@theme/TabItem';
3
+
4
+
<Tabs>
5
+
<TabItemvalue="apple"label="Apple"default>
6
+
This is an apple 🍎
7
+
</TabItem>
8
+
<TabItemvalue="orange"label="Orange">
9
+
This is an orange 🍊
10
+
</TabItem>
11
+
<TabItemvalue="banana"label="Banana">
12
+
This is a banana 🍌
13
+
</TabItem>
14
+
</Tabs>
15
+
1
16
# Installation
2
17
3
18
Installing the CLI can be done in different ways depending on your operating environment.
@@ -122,8 +137,8 @@ However, building Polykey yourself on MacOS resolves in a working binary. Follow
122
137
123
138
:::tip
124
139
125
-
- Replace `V.V.V.` with the actual version number of the file you downloaded.
126
140
- Navigate into the directory where the file is saved to execute commands.
141
+
- Replace `V.V.V.` with the actual version number of the file you downloaded.
127
142
128
143
:::
129
144
@@ -139,7 +154,19 @@ chmod +x polykey
139
154
140
155
MacOS requires additional steps for the binary to be allowed to execute,
141
156
this is due to the fact that as of 20-12-23, the binaries we release are unsigned,
142
-
and MacOS permits running of unsigned binaries, however, to progress past this, follow these steps:
157
+
and MacOS permits running of unsigned binaries, however, to progress past this, there are a couple options:
158
+
159
+
#### Method #1 - quickest method
160
+
161
+
The xattr command will remove the quarantine attribute from the polykey executable, allowing you to run it without triggering macOS security warnings. Remember to ensure that the file path matches the location of your polykey file.
If you have completed this sucesfully, you may ignore Method #2 and move to the next section on how to add polykey to your `$PATH`.
168
+
169
+
#### Method #2 - Using the Apple Systems Settings GUI
143
170
144
171
First type the following command to try running the Polykey CLI but will instead trigger a pop-up.
145
172
@@ -188,38 +215,37 @@ You can also verify the version of polykey that was installed with:
188
215
189
216
---
190
217
191
-
### Add it to your `$PATH`.
218
+
### Add Polykey to your `$PATH`.
192
219
193
-
To add the Polykey CLI executable to your $PATH on macOS, which allows you to run the polykey command from any directory in the terminal, you need to update the shell configuration file.
220
+
To enable running the Polykey CLI from any directory in the terminal on macOS, you'll need to update your shell configuration file.
194
221
195
-
:::tip
222
+
#### For ZSH (default shell on recent macOS versions):
196
223
197
-
To check the shell you're currently using (ZSH vs Bash), in terminal type `echo $SHELL`
198
-
:::
199
-
200
-
#### For ZSH (default shell on recent versions of macOS):
201
-
202
-
1.`cd` into the directory where the "polykey" executable is stored.
224
+
1. Navigate (cd) into the directory where the "polykey" executable is stored.
203
225
204
-
2. Edit the Zsh config to add "polykey" to your $path. To streamline the process, run the following command, making sure to change the path to "polykey" if the executable is not in the downloads folder. For most users, this would be `~/downloads` on Debian-based systems.
226
+
2. Edit the Zsh configuration file to add "polykey" to your $PATH. Use the following command, ensuring to replace ~/Downloads with the correct path to the "polykey" executable if it's not in the downloads folder. For most users, this path would be ~/Downloads on Debian-based systems.
205
227
206
228
:::tip
207
229
208
-
Make sure your path to the "polykey" executable is correct. Replace `downloads` with the path to the working directory. Use the `pwd` command to print the working directory.
230
+
Make sure your path to the "polykey" executable is correct.
You can check if the PATH environment variable for Polykey has been updated correctly with `echo $PATH`
240
+
You can check if the PATH environment variable for Polykey has been updated correctly by running:
219
241
220
-
:::
242
+
```sh
243
+
polykey --version
244
+
```
221
245
222
-
You can now run `polykey` from anywhere in your terminal.
246
+
If this command returns the current version, then you have successfully added Polykey to your PATH, and you can now run polykey from anywhere in your terminal.
0 commit comments