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/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ For this reason, we think of secrets as "capabilities".
55
55
56
56
All secrets put into vaults. Each vault is a persistent fully-encrypted virtual filesystem with automatic version history. Vaults can be shared with other Polykey agents.
57
57
58
-
Polykey's secrets management concept provides users with secure commuication and secure computation.
58
+
Polykey's secrets management concept provides users with secure communication and secure computation.
Installing the CLI can be done in different ways depending on your operating environment.
4
7
5
-
:::warning
8
+
:::info
6
9
7
-
Polykey-CLI has only been tested on Linux. We are working on supporting other platforms. There's minor teething problems when it comes supporting other platforms. Help us by reporting issues.
10
+
Polykey-CLI has only been tested on Linux and macOS. We are working on supporting other platforms. There's minor teething problems when it comes supporting other platforms. Help us by reporting any issues with the CLI tool in our Github Repo [here](https://github.com/MatrixAI/Polykey-CLI/issues/new/choose) or by dropping a message to the developers in our discord server [here](https://discord.gg/dC32r35TeE).
8
11
9
12
:::
10
13
14
+
<Tabs>
15
+
<TabItemvalue="linux"label="Linux"default>
16
+
11
17
## Linux
12
18
13
19
Polykey-CLI code is compiled, bundled and wrapped into a single file executable. You just have to download the executable, give it executable permissions and run it. The executable is not statically linked. It requires a subset of the system libraries that Node.js requires.
14
20
15
-
*`libdl.so.2`
16
-
*`libstdc++.so.6`
17
-
*`libm.so.6`
18
-
*`libgcc_s.so.1`
19
-
*`libpthread.so.0`
20
-
*`libc.so.6`
21
+
-`libdl.so.2`
22
+
-`libstdc++.so.6`
23
+
-`libm.so.6`
24
+
-`libgcc_s.so.1`
25
+
-`libpthread.so.0`
26
+
-`libc.so.6`
21
27
22
28
### Manually
23
29
@@ -31,11 +37,45 @@ Make it executable:
31
37
chmod u+x ./polykey
32
38
```
33
39
34
-
Add it to your `$PATH`.
40
+
### Add it to your `$PATH`.
41
+
42
+
#### For ZSH:
43
+
44
+
1.`cd` into directory where polykey exec is stored.
45
+
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 polykey executable is not in the downloads folder.
46
+
3. For most users, this would be `~/downloads` on Debian based systems.
47
+
48
+
:::warning
49
+
50
+
Make sure your path to the polykey executable is correct.
In your terminal you can also alias `alias pk='polykey'` for more convenient commands.
60
+
---
61
+
62
+
#### For Bash:
63
+
64
+
1. If you're using Bash, run the following command to add polykey to your path. Ensure to change the path if the executable is not in the downloads folder. For most users, this would be `~/downloads` on Debian-based systems.
65
+
66
+
:::warning
67
+
68
+
Make sure your path to the polykey executable is correct.
Polykey-CLI code is compiled, bundled and wrapped into a single file executable. However modern MacOS has made it significantly difficult to run arbitrary executables on their operating system. Additionally MacOS can be in both Intel or ARM64 CPU architectures. As of now, Polykey distributes Mach-O executables for both architectures. However the user will need to allow the executable to run on their system.
113
+
:::info
71
114
72
-
The following links may help:
115
+
ARM-64 builds are not currently supported on MacOS as of **26-03-24.**
116
+
However, building Polykey yourself on MacOS resolves in a working binary. Follow this guide below to manually build and install Polykey on macOS.
We have plans to distribute automatically signed binaries in the future which will make it easier to just download and run. However CLI programs will never distributed through the Mac App store. Mac users may prefer Polykey-Desktop which will be distributed through the Mac App Store.
120
+
### Manually
79
121
80
-
Builds for MacOS is released on GitHub: https://github.com/MatrixAI/Polykey-CLI/releases.
122
+
1. Download the Polykey CLI for macOS from the [GitHub releases page](https://github.com/MatrixAI/Polykey-CLI/releases). Look for the file named `polykey-cli-V.V.V-darwin-universal`, where `V.V.V` is the version number. For Mac, you want to download the file with the `darwin-universal` file extension.
81
123
82
-
Download the executable named `...-polykey-cli-V.V.V-macos-x64`, and rename it to `polykey`.
124
+
2. Rename the downloaded file to `polykey` for easier access. In your terminal, make sure to navigate to the directory where the file is located (usually the Downloads directory) and run the following command:
83
125
84
-
You can now run it with `polykey`.
126
+
```sh
127
+
mv polykey-cli-V.V.V-darwin-universal polykey
128
+
```
85
129
86
-
In your terminal you can also alias `alias pk='polykey'` for more convenient commands.
130
+
:::tip
87
131
88
-
## Windows
132
+
- Navigate into the directory where the file is saved to execute commands.
133
+
- Replace `V.V.V.` with the actual version number of the file you downloaded.
89
134
90
-
Polykey-CLI code is compiled, bundled and wrapped into a single file executable.
135
+
:::
91
136
92
-
Builds for Linux is released on GitHub: https://github.com/MatrixAI/Polykey-CLI/releases.
137
+
3. Make the Executable Runnable: Before you can run the PolykeyCLI, you need to make it executable. Use the `chmod +x` command to add executable permissions to the file. Replace `polykey` with the actual name of your file if it's different:
93
138
94
-
Download the executable named `...-polykey-cli-V.V.V-linux-x64`, and rename it to `polykey`.
139
+
```sh
140
+
chmod +x polykey
141
+
```
95
142
96
-
You can now run it with `polykey`.
143
+
---
144
+
145
+
### MacOS Security Bypass
146
+
147
+
MacOS requires additional steps for the binary to be allowed to execute,
148
+
this is due to the fact that as of 20-12-23, the binaries we release are unsigned,
149
+
and MacOS permits running of unsigned binaries, however, to progress past this, there are a couple options:
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`.
162
+
163
+
## <!-- I need to add a link to skip ahead -->
164
+
165
+
---
166
+
167
+
</TabItem>
168
+
<TabItemvalue="method2"label="Method #2 - Apple Setting GUI">
169
+
170
+
#### Method #2 - Using the Apple Systems Settings GUI
171
+
172
+
First type the following command to try running the Polykey CLI but will instead trigger a pop-up.
173
+
174
+
```sh
175
+
./polykey --version
176
+
```
177
+
178
+
1. MacOS will then prompt you with the following:
179
+
180
+
:::important
181
+
Do not close this prompt. If you do, the 'Allow Anyway' option will not appear in the next step.
182
+
:::
183
+
184
+

185
+
186
+
2. While keeping the prompt open, head over to `Settings -> Privacy & Security` and scroll down till you see '"polykey" was blocked from use because it is not from an identified developer.'
187
+
188
+

189
+
190
+
3. Click on `Allow Anyway` and authenticate.
191
+
192
+
4. Try opening polykey with
193
+
194
+
```shell
195
+
sudo ./polykey
196
+
```
197
+
198
+
:::tip
199
+
When prompted in the terminal, type your administrator password and hit enter.
200
+
:::
201
+
202
+
5. Following this, you will get another similar prompt
203
+
204
+

205
+
206
+
#### Click on Open and now Polykey-CLI should be running in your terminal window.
207
+
208
+
:::tip
209
+
You can also verify the version of polykey that was installed with:
210
+
211
+
```sh
212
+
./polykey --version
213
+
```
214
+
215
+
:::
216
+
217
+
---
97
218
98
-
In your terminal you can also alias `alias pk='polykey'` for more convenient commands.
219
+
</TabItem>
220
+
</Tabs>
99
221
100
-
## Docker
222
+
### Add Polykey to your `$PATH`.
223
+
224
+
To enable running the Polykey CLI from any directory in the terminal on macOS, you'll need to update your shell configuration file.
225
+
226
+
<Tabs>
227
+
<TabItem value="zsh" label="ZSH (default shell on recent macOS versions)">
228
+
229
+
#### For ZSH (default shell on recent macOS versions):
230
+
231
+
1. Navigate (cd) into the directory where the "polykey" executable is stored.
232
+
233
+
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.
234
+
235
+
:::tip
236
+
237
+
Make sure your path to the "polykey" executable is correct.
1.`cd` into the directory where the "polykey" executable is stored.
251
+
2. Edit the Bash 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.
252
+
253
+
:::tip
254
+
255
+
Make sure your path to the "polykey" executable is correct. Replace `downloads` with the path to the working directory
You can check if the PATH environment variable for Polykey has been updated correctly by running:
269
+
270
+
```sh
271
+
polykey --version
272
+
```
273
+
274
+
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.
275
+
276
+
:::
277
+
278
+
</TabItem>
279
+
<TabItemvalue="windows"label="Windows">
280
+
281
+
:::warning
282
+
283
+
Polykey for windows should be working but we have yet to create documentation on the installation process for this.
284
+
285
+
:::
286
+
287
+
</TabItem>
288
+
<TabItemvalue="docker"label="Docker">
289
+
290
+
## Docker
101
291
102
292
The Docker image can be used so that Polykey can be deployed into the cloud. It is also possible to use the CLI via the docker container, but it isn't as convenient. The intention is to run the Polykey agent in the cloud.
You can install nix for MacOS and then follow the general docker instructions above.
311
+
Nix for mac can be installed by running
312
+
313
+
```sh
314
+
sh <(curl -L https://nixos.org/nix/install)
315
+
```
316
+
317
+
:::
318
+
319
+
1. Download the latest build of Polykey-CLI for docker from https://polykey.com/download.
320
+
321
+
2. Download Docker for MacOS depending on your instruction-set (arm vs x86) from https://docs.docker.com/desktop/install/mac-install/
322
+
323
+
3. Rename the Polykey dist from `x-docker-image-polykey-cli-x.x.x-alpha.x.tar.gz` to `docker-polykey.tar.gz`
324
+
325
+
4. Load the image in docker using the following:
326
+
327
+
```shell
328
+
docker load --input docker-polykey.tar.gz
329
+
```
330
+
331
+
5. Go to your docker application and configure the Polykey image
332
+
333
+

334
+
335
+
6. Run `mkdir /tmp/polykey` to create a directory for the polykey nodepath
336
+
337
+
7. Set the volume host path to `/tmp/polykey` and the container path to `/tmp/polykey/`
338
+
339
+
8. Run `docker images` to grab the Image ID of your installed image.
340
+
341
+
```shell
342
+
> docker images
343
+
REPOSITORY TAG IMAGE ID CREATED SIZE
344
+
polykey-cli-0.1.2-alpha.2 gygbx1qgpnhbvbcbaby3sfm19bamg7sx 0e1addd9855a 12 days ago 370MB
345
+
```
346
+
347
+
9. Now you can run Polykey as an agent with the following shell command
348
+
349
+
```shell
350
+
docker run -it 0e1addd9855a agent start --background -np /tmp/polykey
351
+
```
352
+
353
+
Making sure to replace `0e1addd9855a` with your corresponding image ID.
354
+
355
+
```shell
356
+
docker run -it 0e1addd9855a agent start --background -np /tmp/polykey
357
+
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
0 commit comments