Skip to content

Commit c6c9853

Browse files
CryptoTotalWartegefaulkes
authored andcommitted
docs: Update installation instructions and add support links
- Add links to the Polykey CLI GitHub Issues page for bug reporting. - Add links to the Matrix AI Discord server for further assistance. - Implement tabs throughout the entire page for better organization. - Note potential issue with sub-navigation pane not working with tabs.
1 parent 3ebccf1 commit c6c9853

File tree

1 file changed

+52
-53
lines changed

1 file changed

+52
-53
lines changed

docs/tutorials/polykey-cli/installation.md

Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
11
import Tabs from '@theme/Tabs';
22
import TabItem from '@theme/TabItem';
33

4-
<Tabs>
5-
<TabItem value="apple" label="Apple" default>
6-
This is an apple 🍎
7-
</TabItem>
8-
<TabItem value="orange" label="Orange">
9-
This is an orange 🍊
10-
</TabItem>
11-
<TabItem value="banana" label="Banana">
12-
This is a banana 🍌
13-
</TabItem>
14-
</Tabs>
15-
164
# Installation
175

186
Installing the CLI can be done in different ways depending on your operating environment.
197

20-
:::warning
8+
:::info
219

22-
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 issues. `where & How?`
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).
2311

2412
:::
2513

14+
<Tabs>
15+
<TabItem value="linux" label="Linux" default>
16+
2617
## Linux
2718

2819
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.
@@ -114,7 +105,8 @@ nix-env -f ./release.nix --install --attr application --argstr npmDepsHash "$(pr
114105

115106
We will be working on other distribution methods.
116107

117-
---
108+
</TabItem>
109+
<TabItem value="macos" label="MacOs">
118110

119111
## MacOS
120112

@@ -156,8 +148,10 @@ MacOS requires additional steps for the binary to be allowed to execute,
156148
this is due to the fact that as of 20-12-23, the binaries we release are unsigned,
157149
and MacOS permits running of unsigned binaries, however, to progress past this, there are a couple options:
158150

159-
#### Method #1 - quickest method
160-
151+
<Tabs>
152+
<TabItem value="method1" label="Method #1 - Admin CLI ">
153+
154+
#### Method #1 - quickest method
161155
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.
162156

163157
```sh
@@ -166,6 +160,13 @@ sudo xattr -r -d com.apple.quarantine ~/Downloads/polykey
166160

167161
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`.
168162

163+
## <!-- I need to add a link to skip ahead -->
164+
165+
---
166+
167+
</TabItem>
168+
<TabItem value="method2" label="Method #2 - Apple Setting GUI">
169+
169170
#### Method #2 - Using the Apple Systems Settings GUI
170171

171172
First type the following command to try running the Polykey CLI but will instead trigger a pop-up.
@@ -215,10 +216,16 @@ You can also verify the version of polykey that was installed with:
215216

216217
---
217218

219+
</TabItem>
220+
</Tabs>
221+
218222
### Add Polykey to your `$PATH`.
219223

220224
To enable running the Polykey CLI from any directory in the terminal on macOS, you'll need to update your shell configuration file.
221225

226+
<Tabs>
227+
<TabItem value="zsh" label="ZSH (default shell on recent macOS versions)">
228+
222229
#### For ZSH (default shell on recent macOS versions):
223230

224231
1. Navigate (cd) into the directory where the "polykey" executable is stored.
@@ -235,19 +242,8 @@ Make sure your path to the "polykey" executable is correct.
235242
echo 'export PATH=~/Downloads:$PATH' >> ~/.zshrc && source ~/.zshrc
236243
```
237244

238-
:::tip
239-
240-
You can check if the PATH environment variable for Polykey has been updated correctly by running:
241-
242-
```sh
243-
polykey --version
244-
```
245-
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.
247-
248-
:::
249-
250-
---
245+
</TabItem>
246+
<TabItem value="bash" label="Bash">
251247

252248
#### For Bash:
253249

@@ -264,41 +260,34 @@ Make sure your path to the "polykey" executable is correct. Replace `downloads`
264260
echo 'export PATH=~/downloads:$PATH' >> ~/.bashrc && source ~/.bashrc
265261
```
266262

267-
You can now run `polykey` from anywhere in your terminal.
263+
</TabItem>
264+
</Tabs>
268265

269-
---
266+
:::tip
270267

271-
## Windows
268+
You can check if the PATH environment variable for Polykey has been updated correctly by running:
272269

273-
:::danger
270+
```sh
271+
polykey --version
272+
```
274273

275-
Polykey doesn't work on Windows at all as of **20-12-23**, regardless of binaries or building it yourself.
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.
276275

277276
:::
278277

279-
Builds for Windows are released on GitHub: https://github.com/MatrixAI/Polykey-CLI/releases.
280-
281-
Download the executable named `...-polykey-cli-V.V.V-win32-x64`, and rename it to `polykey.exe`.
282-
283-
#### Sudo Method with your terminal
284-
285-
#### Add to PATH
286-
287-
1. Run the following when you are in the same directory as `polykey.exe`.
288-
289-
```shell
290-
setx PATH "%PATH%;%CD%" /M
291-
```
278+
</TabItem>
279+
<TabItem value="windows" label="Windows">
292280

293-
:::tip
281+
:::warning
294282

295-
Make sure you're in the correct directory where "polykey.exe" is placed.
283+
Polykey for windows should be working but we have yet to create documentation on the installation process for this.
296284

297285
:::
298286

299-
2. Now you can run polykey system-wide by using `polykey`.
300-
301-
## Docker
287+
</TabItem>
288+
<TabItem value="docker" label="Docker">
289+
290+
## Docker
302291

303292
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.
304293

@@ -378,6 +367,9 @@ recoveryCode net elephant gentle eight pulp oyster panther sing own autumn silly
378367
379368
```
380369
370+
</TabItem>
371+
<TabItem value="npm" label="npm">
372+
381373
## Node Package Manager
382374
383375
The CLI is published as [`npm` package](https://www.npmjs.com/package/polykey-cli).
@@ -392,6 +384,9 @@ This will install the Polykey-CLI into `$(npm config get prefix)`.
392384
393385
If the `npm` bin path is added to the `$PATH` environment variable, then you will be able to execute `pk` or `polykey`.
394386
387+
</TabItem>
388+
<TabItem value="source" label="Source">
389+
395390
## Source
396391
397392
The official source repository is on GitHub. There is an additional mirror on GitLab.
@@ -407,3 +402,7 @@ Use `npm install` to setup the project.
407402
If you have `nix-shell` available, enter into `nix-shell` and it will automatically setup the development environment.
408403
409404
:::
405+
406+
</TabItem>
407+
408+
</Tabs>

0 commit comments

Comments
 (0)