Installation
Installing the CLI can be done in different ways depending on your operating environment.
Polykey Core Overview
The Polykey CLI and core primarily use TypeScript for service logic, domain business operations, and persistence layers. While the main codebase is in TypeScript, some supporting libraries incorporate native C++ or Rust for platform‐specific functionality. This approach combines cross‐platform convenience with native performance optimizations. 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
- MacOS
- Windows
- Docker
- npm
- Source
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
Using the Polykey CLI via the terminal
If you prefer not to use a package manager or Docker, you can install Polykey directly via the terminal using a prebuilt binary.
- 
Download the executable from the GitHub releases page and rename it to polykey.
- 
Make it executable: 
chmod u+x ./polykey
- 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 polykeyinto an existing directory already in yourPATH(e.g.,/usr/local/bin), or
- Add the polykey directory to your PATH, either temporarily or permanently:
Temporarily (until terminal closes):
export PATH="$HOME/Downloads:$PATH"
Permanently:
- For zsh
- For bash
To permanently add polykey to PATH on zsh, run the following command.
echo 'export PATH="$HOME/Downloads:$PATH"' >> ~/.zshrc && source ~/.zshrc
To permanently add polykey to PATH on bash, run the following command.
echo 'export PATH="$HOME/Downloads:$PATH"' >> ~/.bashrc && source ~/.bashrc
Where you place the polykey binary — and how you add it to your PATH —
depends on your OS:
- 
Linux: Preferred location is ~/.local/bin(you may need to create it usingmkdir -p ~/.local/bin). Make sure this directory is included in your$PATH— often via~/.bashrc,~/.bash_profile, or~/.profile.
- 
macOS: Same as Linux — use ~/.local/binor~/bin. Update your$PATHin~/.zshrc(ZSH is default on macOS since Catalina) or~/.bash_profileif using Bash.
- 
Windows: Place polykey.exeinto:
%USERPROFILE%\AppData\Local\Microsoft\WindowsApps
This location is typically already included in the system PATH.
To verify it’s working, run:
which polykey
polykey --version
- Confirm the installation with:
polykey --version
If it returns the version, you’re ready to use the CLI.
Once you start a long‑lived command like polykey agent start, that process
monopolizes the current terminal window. To issue any further Polykey commands
(for example, polykey vaults create) you must open a new terminal window.
If the machine reboots or the agent exits, simply rerun polykey agent start in
a terminal to restart it.
If you see an error like:
WARN:polykey.PolykeyAgent:Failed Creating PolykeyAgent — another agent may already be running
This means the Polykey agent is already running. To manage this, you can:
Check the agent status:
polykey agent status
If the agent returns something like this:
status DEAD
Then the agent is inactive and needs to be restarted. If it returns something other than this, then it is still active.
Stop the running agent:
polykey agent stop
You must stop the current agent or use a different terminal before starting a new one. The currently running agent must be stopped before it can be re-run.