Skip to main content

Installation

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

info

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 or by dropping a message to the developers in our discord server here.

Linux

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.

  • libdl.so.2
  • libstdc++.so.6
  • libm.so.6
  • libgcc_s.so.1
  • libpthread.so.0
  • libc.so.6

Manually

Builds for Linux is released on GitHub: https://github.com/MatrixAI/Polykey-CLI/releases.

Download the executable named ...-polykey-cli-V.V.V-linux-x64, and rename it to polykey.

Make it executable:

$ chmod u+x ./polykey

Add it to your $PATH.

For ZSH:

  1. cd into directory where polykey exec is stored.
  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.
  3. For most users, this would be ~/Downloads
warning

Make sure your path to the polykey executable is correct.

$ echo 'export PATH=~/Downloads/polykey:$PATH' >> ~/.zshrc && source ~/.zshrc

You only need to run this command once. After running this command, you can now invoke polykey by typing polykey into the terminal.


For Bash:

  1. cd into directory where polykey exec is stored.
  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.
  3. For most users, this would be ~/Downloads
warning

Make sure your path to the polykey executable is correct.

$ echo 'export PATH=~/Downloads/polykey:$PATH' >> ~/.bashrc && source ~/.bashrc

You only need to run this command once. After running this command, you can now invoke polykey by typing polykey into the terminal.


NixOS

We have not yet published a Nix package for Polykey. When we do, you will be able to just install polykey-cli from Nixpkgs.

However, it is easy enough to install it from source.

Clone the repository:

$ git clone https://github.com/MatrixAI/Polykey-CLI.git

Enter the nix-shell:

$ nix-shell

Build the application and install it into the user profile:

$ nix-env -f ./release.nix --install --attr application --argstr npmDepsHash "$(prefetch-npm-deps ./package-lock.json)"

Other

We will be working on other distribution methods.