Skip to content

Commit bb5a78c

Browse files
committed
chore: cleaned up linux instructions
1 parent e482f40 commit bb5a78c

File tree

1 file changed

+51
-38
lines changed

1 file changed

+51
-38
lines changed

docs/Getting-Started/polykey-cli/installation.md

Lines changed: 51 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ directly via the terminal using a prebuilt binary.
5353

5454
2. Make it executable:
5555

56-
```sh
57-
chmod u+x ./polykey
58-
```
56+
```sh
57+
chmod u+x ./polykey
58+
```
5959

6060
3. Add the executable to your PATH
6161

@@ -64,45 +64,37 @@ your `PATH`. You can either:
6464

6565
- Move `polykey` into an existing directory already in your `PATH` (e.g.,
6666
`/usr/local/bin`), **or**
67-
- Add the current directory to your `PATH`, either temporarily or permanently:
68-
69-
**Temporary (until terminal closes):**
70-
71-
```shell
72-
export PATH="$PWD:$PATH"
73-
```
67+
- Add the polykey directory to your `PATH`, either temporarily or permanently:
7468

75-
4. Confirm the installation:
69+
**Temporarily (until terminal closes):**
7670

7771
```shell
78-
polykey --version
72+
export PATH="$HOME/Downloads:$PATH"
7973
```
8074

81-
5. If it returns the version, you’re ready to use the CLI.
82-
83-
:::important Important
84-
85-
Once you start a long‑lived command like `polykey agent start`, that process
86-
monopolizes the current terminal window. To issue any further Polykey commands
87-
(for example, `polykey vaults create`) you must open a **new terminal window**.
88-
89-
If the machine reboots or the agent exits, simply rerun `polykey agent start` in
90-
a terminal to restart it.
75+
**Permanently:**
9176

92-
:::
93-
94-
- For ZSH:
77+
<Tabs>
78+
<TabItem value="zsh" label="For zsh">
79+
To permanently add `polykey` to `PATH` on zsh, run the following command.
9580

9681
```shell
9782
echo 'export PATH="$HOME/Downloads:$PATH"' >> ~/.zshrc && source ~/.zshrc
9883
```
9984

100-
- For Bash:
85+
</TabItem>
86+
<TabItem value="bash" label="For bash">
87+
To permanently add `polykey` to `PATH` on bash, run the following command.
10188

10289
```shell
10390
echo 'export PATH="$HOME/Downloads:$PATH"' >> ~/.bashrc && source ~/.bashrc
10491
```
10592

93+
</TabItem>
94+
</Tabs>
95+
96+
---
97+
10698
:::tip Setting PATH across operating systems
10799

108100
Where you place the `polykey` binary — and how you add it to your `PATH`
@@ -129,25 +121,36 @@ To verify it’s working, run:
129121
```shell
130122
which polykey
131123
polykey --version
132-
133124
```
134125

135126
:::
136127

137128
4. Confirm the installation with:
138129

139130
```shell
140-
polykey --version
131+
polykey --version
141132
```
142133

143134
If it returns the version, you’re ready to use the CLI.
144135

136+
:::important Important
137+
138+
Once you start a long‑lived command like `polykey agent start`, that process
139+
monopolizes the current terminal window. To issue any further Polykey commands
140+
(for example, `polykey vaults create`) you must open a **new terminal window**.
141+
142+
If the machine reboots or the agent exits, simply rerun `polykey agent start` in
143+
a terminal to restart it.
144+
145+
:::
146+
145147
:::tip Tip
146148

147149
If you see an error like:
148150

149-
WARN:polykey.PolykeyAgent:Failed Creating PolykeyAgent — another agent may
150-
already be running
151+
```
152+
WARN:polykey.PolykeyAgent:Failed Creating PolykeyAgent — another agent may already be running
153+
```
151154

152155
This means the Polykey agent is already running. To manage this, you can:
153156

@@ -169,7 +172,7 @@ other than this, then it is still active.
169172
Stop the running agent:
170173

171174
```shell
172-
polykey agent
175+
polykey agent stop
173176
```
174177

175178
You must stop the current agent or use a different terminal before starting a
@@ -187,19 +190,19 @@ However, it is easy enough to install it from source.
187190
Clone the repository:
188191

189192
```sh
190-
$ git clone https://github.com/MatrixAI/Polykey-CLI.git
193+
git clone https://github.com/MatrixAI/Polykey-CLI.git
191194
```
192195

193196
Enter the `nix-shell`:
194197

195198
```sh
196-
$ nix-shell
199+
nix-shell
197200
```
198201

199202
Build the application and install it into the user profile:
200203

201204
```sh
202-
$ nix-env -f ./release.nix --install --attr application --argstr npmDepsHash "$(prefetch-npm-deps ./package-lock.json)"
205+
nix-env -f ./release.nix --install --attr application --argstr npmDepsHash "$(prefetch-npm-deps ./package-lock.json)"
203206
```
204207

205208
### Other
@@ -362,25 +365,35 @@ a terminal to restart it.
362365

363366
If you see an error like:
364367

365-
WARN:polykey.PolykeyAgent:Failed Creating PolykeyAgent — another agent may
366-
already be running
368+
```
369+
WARN:polykey.PolykeyAgent:Failed Creating PolykeyAgent — another agent may already be running
370+
```
367371

368372
This means the Polykey agent is already running. To manage this, you can:
369373

370-
- **Check the agent status**:
374+
**Check the agent status**:
371375

372376
```shell
373377
polykey agent status
374378
```
375379

380+
If the agent returns something like this:
381+
382+
```shell
383+
status DEAD
384+
```
385+
386+
Then the agent is inactive and needs to be restarted. If it returns something
387+
other than this, then it is still active.
388+
376389
Stop the running agent:
377390

378391
```shell
379392
polykey agent stop
380393
```
381394

382395
You must stop the current agent or use a different terminal before starting a
383-
new one.
396+
new one. The currently running agent must be stopped before it can be re-run.
384397

385398
:::
386399

0 commit comments

Comments
 (0)