There is no packaged installer yet, so you have to build kohaku-cli from source.
# Clone and build
git clone https://github.com/kassandraoftroy/kohaku-cli.git
cd kohaku-cli
npm install
npm run build
(requires Node.js 22+)
npm install includes the Railgun, Tornado, and Privacy Pools proving circuits through kohaku-artifacts. You do not need to run a separate artifact download command.
Note: for linux users you may get error on
npm run buildif so just follow the instructions from the error (“trynpm iagain after removing both package-lock.json and node_modules directory”)
At this point you could simply use npm run dev:prod -- as the prefix to commands (e.g. npm run dev:prod -- --version) but you can only invoke the kohaku-cli from inside the root folder of the repo.
To use the kohaku command and to invoke the CLI from anywhere on your machine, proceed to the next step.
# Put kohaku on your PATH
From the kohaku-cli root directory, after building, just copy or symlink bin/kohaku.mjs somewhere on your PATH as kohaku.
Linux/MacOS
sudo ln -sf "$(pwd)/bin/kohaku.mjs" /usr/local/bin/kohaku
Then check:
kohaku --version
should output 0.1.5 or later (v0.1.5+ for this guide)
Writing kohaku file to any directory on your PATH works. E.g. You could also write kohaku binary to ~/.local/bin with:
ln -sf "$(pwd)/bin/kohaku.mjs" ~/.local/bin/kohaku
And just make sure you have/add this line to your ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"
# Update
To update the CLI, sync with the latest main branch of the repository, then run npm install and npm run build. This installs any updated packages and rebuilds the CLI. Check the result with kohaku --version.
If your wallet predates v0.1.0, read Upgrading to 0.1.0 before your first private sync.