Skip to content

Install the CLI

Install the CLI on each computer where your tools will request credentials. Choose one method below and use the same method for updates.

Platform Requirements
Linux x86-64 or ARM64, Linux 5.8 or later
macOS Apple Silicon and macOS 15 or later

On Windows, install inside WSL2 using the Linux instructions. Native Windows and Intel Macs are not supported. See Requirements and compatibility for network and command compatibility.

The script downloads the latest prebuilt release for your platform, checks its published SHA-256 checksum, and installs agentknock in ~/.local/bin. It needs curl, tar, and either sha256sum or shasum alongside the usual shell utilities.

Terminal window
curl -fsSL https://agentknock.dev/install.sh | bash

Run the same command to update. If the installer asks you to add its directory to PATH, this makes it available in the current Bash or Zsh session:

Terminal window
export PATH="$HOME/.local/bin:$PATH"

Add that line to your shell’s startup configuration to keep it available in new terminals. For release archives and manual verification, see the CLI repository’s release instructions.

With mise installed and activated in your shell, install the GitHub release:

Terminal window
mise use --global github:agentknock/agentknock-cli

To update it:

Terminal window
mise upgrade github:agentknock/agentknock-cli

With Node.js ^22.15.0 or >=24.0.0 and npm installed, add the agentknock command globally:

Terminal window
npm install --global agentknock

To update it:

Terminal window
npm update --global agentknock

To try the CLI’s help without a global installation, use npx agentknock --help.

With Nix’s nix-command and flakes features enabled, add Agentknock to your profile:

Terminal window
nix profile add github:agentknock/agentknock-cli

To update it:

Terminal window
nix profile upgrade agentknock-cli

To run it without adding it to a profile, use nix run github:agentknock/agentknock-cli -- --help. This method builds from the repository’s default branch; it can include changes newer than the latest published release.

With Rust 1.89 or later and Cargo installed, build the published crate:

Terminal window
cargo install --locked agentknock

The build also needs a C/C++ toolchain for its cryptography dependency; see the requirements for Linux or macOS. Cargo normally installs the executable in ~/.cargo/bin, which must be on PATH. Run the same installation command to update.

Check that your shell can find Agentknock:

Terminal window
agentknock --version

The command prints agentknock and its installed version. It does not contact the phone. You can also check the available commands:

Terminal window
agentknock --help

If the command is missing or shows an unexpected version, run command -v agentknock to check which installation your shell is using, then check that method’s PATH setup.

Continue with Getting started to connect the CLI to your phone and run your first approved command.