System Requirements
OS : macOS, Linux, or Windows (WSL2 recommended)
Architecture : amd64 or arm64
Memory : 256MB minimum, 1GB recommended
Disk : 50MB for binary, plus workspace storage
Installation Methods
One-Line Install (Recommended)
The fastest way to install klaw:
curl -fsSL https://klaw.sh/install.sh | sh
This script:
Detects your OS and architecture
Downloads the appropriate binary
Installs to /usr/local/bin/klaw
Verifies the checksum
You may need to use sudo if /usr/local/bin requires elevated permissions.
Manual Download
Download the appropriate binary for your platform:
macOS (Apple Silicon)
macOS (Intel)
Linux (x64)
Linux (ARM64)
Windows
curl -L https://github.com/klawsh/klaw.sh/releases/latest/download/klaw-darwin-arm64.tar.gz | tar xz
sudo mv klaw /usr/local/bin/
curl -L https://github.com/klawsh/klaw.sh/releases/latest/download/klaw-darwin-amd64.tar.gz | tar xz
sudo mv klaw /usr/local/bin/
curl -L https://github.com/klawsh/klaw.sh/releases/latest/download/klaw-linux-amd64.tar.gz | tar xz
sudo mv klaw /usr/local/bin/
curl -L https://github.com/klawsh/klaw.sh/releases/latest/download/klaw-linux-arm64.tar.gz | tar xz
sudo mv klaw /usr/local/bin/
# Download from GitHub releases
Invoke-WebRequest - Uri "https://github.com/klawsh/klaw.sh/releases/latest/download/klaw-windows-amd64.zip" - OutFile "klaw.zip"
Expand-Archive - Path "klaw.zip" - DestinationPath "C:\Program Files\klaw"
# Add to PATH
$ env: PATH += ";C:\Program Files\klaw"
Windows native support is experimental. WSL2 is recommended for production use.
Build from Source
Requires Go 1.24 or later:
# Clone the repository
git clone https://github.com/klawsh/klaw.sh.git
cd klaw
# Build the binary
make build
# Install to PATH
sudo mv bin/klaw /usr/local/bin/
# Or install directly to GOPATH/bin
make install
Verify Installation
Check that klaw is installed correctly:
Expected output:
klaw version 1.0.0
go version: go1.24.2
platform: darwin/arm64
Initial Configuration
After installation, klaw needs at least one LLM provider configured:
Option 1: Environment Variables
# Add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
# each::labs Router (300+ models)
export EACHLABS_API_KEY = your-key
# Or Anthropic directly
export ANTHROPIC_API_KEY = sk-ant- ...
# Or OpenRouter
export OPENROUTER_API_KEY = sk-or- ...
Option 2: Configuration File
Create ~/.klaw/config.toml:
[ defaults ]
model = "claude-sonnet-4-20250514"
[ provider . anthropic ]
api_key = "sk-ant-..."
Use environment variable references in config files for security: [ provider . anthropic ]
api_key = "${ANTHROPIC_API_KEY}"
Shell Completions
Enable tab completion for your shell:
# Add to ~/.bashrc
eval "$( klaw completion bash)"
# Add to ~/.zshrc
eval "$( klaw completion zsh)"
klaw completion fish | source
klaw completion powershell | Out-String | Invoke-Expression
Uninstallation
sudo rm /usr/local/bin/klaw
rm -rf ~/.klaw # Remove configuration and data
Troubleshooting
If you get a permission error when installing: sudo curl -fsSL https://klaw.sh/install.sh | sudo sh
Or install to a user directory: mkdir -p ~/bin
curl -fsSL https://klaw.sh/install.sh | sh -s -- --prefix ~/bin
export PATH = " $HOME /bin: $PATH "
Ensure the installation directory is in your PATH: echo $PATH
# Should include /usr/local/bin
# If not, add it:
export PATH = "/usr/local/bin: $PATH "
If macOS prevents running klaw: # Allow the binary
xattr -d com.apple.quarantine /usr/local/bin/klaw
Or go to System Preferences → Security & Privacy → Allow.
When building from source, ensure you have Go 1.24+: go version
# Should show go1.24.x or later
Next Steps