Installation Methods
Install Han for Claude Code, OpenCode, or standalone use via curl, Homebrew, or plugin install.
Han works with Claude Code, OpenCode, and as a standalone CLI. Choose the method that fits your workflow.
Quick Install (Recommended)
The fastest way to get started is using the curl script:
curl -fsSL https://han.guru/install.sh | bash
This script:
- Downloads the latest Han binary for your platform
- Installs it to
~/.claude/bin/han - Adds the binary to your PATH
- Works on macOS, Linux, and Windows (WSL)
Homebrew
If you prefer using Homebrew on macOS or Linux:
brew install thebushidocollective/tap/han
Homebrew installation provides:
- Automatic updates via
brew upgrade - Integration with your existing package management workflow
- Easy uninstallation via
brew uninstall han
Claude Code Plugin
If you're using Claude Code, you can install Han directly within the application:
/plugin install bushido@han
This method:
- Automatically installs the Han binary to
~/.claude/bin/hanon first session start - Ensures hooks work immediately without manual setup
- Integrates seamlessly with Claude Code's plugin system
- Requires no manual PATH configuration
Claude CLI
For users of the Claude CLI:
claude plugin install bushido@han
This integrates Han with the Claude CLI ecosystem and provides the same benefits as the Claude Code installation method.
OpenCode
Han works with OpenCode through a bridge plugin that translates OpenCode's event system into Han hook executions.
- Install Han using any method above
- Install Han plugins:
han plugin install --auto - Add the bridge to your
opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-plugin-han"]
}
Your Han validation hooks (biome, eslint, typescript, etc.) now run in OpenCode. See the full OpenCode guide for details.
Next Steps
After installing Han, you'll want to:
- Install plugins to add functionality
- Configure your installation scope preferences
- Set up configuration files for your project
Verifying Installation
After installation, verify Han is working:
han --version
You should see the current version number. If you encounter any issues, ensure ~/.claude/bin is in your PATH.