Installing Kanuni CLI
The Kanuni CLI can be installed on macOS, Linux, and Windows. Choose your preferred installation method below.
System Requirements
- Operating System: macOS 10.15+, Linux (Ubuntu 18.04+, CentOS 7+), Windows 10+
- Memory: Minimum 512MB RAM
- Storage: 100MB free disk space
- Network: Internet connection for API calls
Installation Methods
Option 1: Install from Binary (Recommended)
The fastest way to install Kanuni is to download the pre-compiled binary for your platform.
macOS
# Download the latest release
curl -L https://github.com/v-lawyer/kanuni-cli/releases/latest/download/kanuni-darwin-amd64 -o kanuni
# Make it executable
chmod +x kanuni
# Move to PATH
sudo mv kanuni /usr/local/bin/
# Verify installation
kanuni --version
For Apple Silicon (M1/M2/M3):
# Download the ARM64 version
curl -L https://github.com/v-lawyer/kanuni-cli/releases/latest/download/kanuni-darwin-arm64 -o kanuni
# Make it executable
chmod +x kanuni
# Move to PATH
sudo mv kanuni /usr/local/bin/
# Verify installation
kanuni --version
Linux
# Download the latest release
curl -L https://github.com/v-lawyer/kanuni-cli/releases/latest/download/kanuni-linux-amd64 -o kanuni
# Make it executable
chmod +x kanuni
# Move to PATH
sudo mv kanuni /usr/local/bin/
# Verify installation
kanuni --version
Windows
- Download the latest release from GitHub Releases
- Extract
kanuni.exe
from the ZIP file - Add the directory containing
kanuni.exe
to your PATH environment variable - Open a new Command Prompt or PowerShell and verify:
kanuni --version
Option 2: Install via Homebrew (macOS/Linux)
If you have Homebrew installed:
# Add the V-Lawyer tap
brew tap v-lawyer/kanuni
# Install Kanuni
brew install kanuni
# Verify installation
kanuni --version
Option 3: Install via Cargo (Rust)
If you have Rust installed:
# Install from crates.io
cargo install kanuni
# Verify installation
kanuni --version
Option 4: Build from Source
For developers who want to build from source:
# Clone the repository
git clone https://github.com/v-lawyer/kanuni-cli.git
cd kanuni-cli
# Build the project
cargo build --release
# The binary will be in target/release/kanuni
./target/release/kanuni --version
# Optionally, install to PATH
cargo install --path .
Post-Installation Setup
1. Shell Completions (Optional)
Generate shell completions for your shell to enable tab completion:
Bash
kanuni completions bash > ~/.kanuni-completions.bash
echo "source ~/.kanuni-completions.bash" >> ~/.bashrc
source ~/.bashrc
Zsh
kanuni completions zsh > ~/.kanuni-completions.zsh
echo "source ~/.kanuni-completions.zsh" >> ~/.zshrc
source ~/.zshrc
Fish
kanuni completions fish > ~/.config/fish/completions/kanuni.fish
PowerShell
kanuni completions powershell | Out-String | Invoke-Expression
2. Configuration
Kanuni stores its configuration in:
- macOS/Linux:
~/.config/kanuni/config.toml
- Windows:
%APPDATA%\kanuni\config.toml
You can initialize the configuration with:
kanuni config show
3. Authentication
After installation, you'll need to authenticate with V-Lawyer:
kanuni auth login
See the Authentication Guide for details.
Updating Kanuni
Using Homebrew
brew upgrade kanuni
Using Cargo
cargo install kanuni --force
Manual Update
Follow the same steps as installation, but replace the existing binary.
Uninstallation
Using Homebrew
brew uninstall kanuni
Using Cargo
cargo uninstall kanuni
Manual Uninstallation
-
Remove the binary:
- macOS/Linux:
sudo rm /usr/local/bin/kanuni
- Windows: Delete
kanuni.exe
from its location
- macOS/Linux:
-
Remove configuration and data (optional):
- macOS/Linux:
rm -rf ~/.config/kanuni
- Windows: Delete
%APPDATA%\kanuni
- macOS/Linux:
Troubleshooting
Command Not Found
If you get "command not found" after installation:
-
Ensure the binary is in your PATH:
echo $PATH
-
Add the directory to your PATH if needed:
export PATH="$PATH:/usr/local/bin"
Permission Denied
If you get "permission denied" errors:
chmod +x /usr/local/bin/kanuni
SSL Certificate Issues
If you encounter SSL certificate errors:
# macOS
brew install ca-certificates
# Linux
sudo apt-get install ca-certificates # Debian/Ubuntu
sudo yum install ca-certificates # CentOS/RHEL
Next Steps
Now that you have Kanuni installed, you can:
Getting Help
If you encounter any issues:
- Check the GitHub Issues
- Join our Discord community
- Email support: support@v-lawyer.ai