Skip to content

Docs: Clarify Linux PATH setup for manual Polykey installation #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 15, 2025

Conversation

xrissoula
Copy link
Contributor

@xrissoula xrissoula commented May 12, 2025

Description

his PR updates the Linux manual installation section to clarify how to correctly and persistently add the Polykey CLI binary to the user's $PATH. It addresses a common setup error where the CLI was not recognized due to misconfigured export syntax or non-permanent changes.

Issues Fixed

Tasks

  • 1. Replace broken export PATH=... commands with echo '...' >> ~/.bashrc
  • Add temporary vs permanent PATH explanation
  • 2. Add which polykey verification step
  • 3. Clarify directory substitution instructions
  • 4. Preserve Docusaurus formatting and CLI usage context

Final checklist

  • Domain specific tests
  • Full tests
  • Updated inline-comment documentation
  • Lint fixed
  • Squash and rebased
  • Sanity check the final build

@xrissoula xrissoula requested a review from aryanjassal May 12, 2025 19:30
@xrissoula xrissoula self-assigned this May 12, 2025
@xrissoula
Copy link
Contributor Author

@aryanjassal Hey, can you review my changes and let me know what you think?

Comment on lines 60 to 78
3. Add the executable to your PATH

To run `polykey` from anywhere, you need to add the directory containing it to
your `PATH`. You can either:

- Move `polykey` into an existing directory already in your `PATH` (e.g.,
`/usr/local/bin`), **or**
- Add the current directory to your `PATH`, either temporarily or permanently:

**Temporary (until terminal closes):**

````sh
export PATH="$PWD:$PATH"

4. Confirm the installation:

```sh
polykey --version
```
````
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding polykey into $PATH depends on the operating system.

On Linux, people usually use package managers. If they are doing this manually, then they should put polykey into ~/.local/bin.

MacOS also the same ~/.local/bin.

On Windows, put it in %USERPROFILE%\AppData\Local\Microsoft\WindowsApps.

Note that if you asked this question to chatgpt it would have explained this:

As of 2025, for MacOS, what is considered the most common/official/best practice when downloading an executable from the internet and putting it into a location where it can be accessed with $PATH? Ideally user-profile specific.

Putting in a particular location also requires creating that directory using mkdir -p.

In windows, that directory already exists and is already on the PATH.

On Linux/MacOS, the PATH has to be manually updated by updating their preferred shell configuration. This is usually ~/.zshrc in MacOS, but on Linux, many possibilities.

I think you generally need to elaborate on this.

@@ -83,16 +93,18 @@ a terminal to restart it.
- For ZSH:

```shell
export PATH=~/Downloads:$PATH >> ~/.zshrc && source ~/.zshrc
export PATH="$HOME/Downloads:$PATH"' >> ~/.zshrc && source ~/.zshrc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a syntax violation here. You cannot use "'.

Double quote is necessary for interpolating variables. Single quote cannot be used. Remove the single quote here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait a minute I think I got confused here cause there's no echo command here.

See the bash script below. You're missing the echo.

```shell
export PATH=~/Downloads:$PATH >> ~/.bashrc && source ~/.bashrc && source
echo 'export PATH="$HOME/Downloads:$PATH"' >> ~/.bashrc && source ~/.bashrc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The single quote here is correct due to the echo.

Beware about this, make sure to write these docs critically.

Also I wish you to try these commands when you write these docs, don't write docs blindly, ALWAYS SANITY CHECK.

@xrissoula xrissoula marked this pull request as draft May 14, 2025 01:13
@xrissoula xrissoula marked this pull request as ready for review May 14, 2025 06:23
@aryanjassal aryanjassal merged commit 0757e27 into staging May 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Explain how to setup PATH during installation of Polykey
3 participants