Prerequisites
Before installing the Mizu CLI, you need Go installed on your computer.What is Go?
Go (also called Golang) is the programming language that Mizu is built with. The Mizu CLI is a Go program, so you need Go to install and run it.Check if Go is Installed
Open your terminal and run:Install Go
- macOS
- Linux
- Windows
Option 1: Homebrew (Recommended)Option 2: Download from golang.org
- Go to https://go.dev/dl/
- Download the macOS installer (.pkg file)
- Run the installer
Go Version Requirements: The Mizu CLI requires Go 1.22 or later. If you have an older version, please upgrade.
Install the Mizu CLI
Now you’re ready to install the Mizu CLI. The easiest way is usinggo install:
- Downloads the Mizu CLI source code
- Compiles it on your computer
- Installs the
mizubinary to your Go bin directory
Where is the Binary Installed?
Themizu binary is installed to $GOPATH/bin. You can find this location by running:
- macOS/Linux:
/Users/yourname/goor/home/yourname/go - Windows:
C:\Users\yourname\go
bin folder inside that directory.
Add Go Bin to Your PATH
For themizu command to work from anywhere, the Go bin directory must be in your PATH.
- macOS/Linux (Bash)
- macOS/Linux (Zsh)
- Windows
Add this line to your Then reload your shell:
~/.bashrc or ~/.bash_profile:Verify Installation
After installation, verify the CLI is working:Install from Source
If you want to build from source (for development or to get the latest unreleased changes):Build with Version Information
For production builds, you can embed version information:Updating the CLI
To update to the latest version:Shell Completion
You can set up tab completion for command names. This lets you press Tab to autocomplete commands.- Bash
- Zsh
Add to your
~/.bashrc:Troubleshooting
”command not found: mizu”
This means your terminal can’t find themizu binary. The most common cause is that Go’s bin directory isn’t in your PATH.
Fix:
-
Check where Go installs binaries:
-
Check if the binary exists:
- If the binary exists but the command doesn’t work, add Go bin to your PATH (see above).
-
After updating PATH, restart your terminal or run:
“go: command not found”
Go is not installed or not in your PATH. Follow the Go installation instructions above.”permission denied”
If you get permission errors: Option 1: Use sudo (not recommended for go install)Build Errors
If you get compilation errors when installing:-
Make sure you have Go 1.22 or later:
-
Clear Go’s module cache and try again:
Verify Go Environment
If you’re having trouble, check your Go environment:GOPATH: Where Go stores packages and binariesGOROOT: Where Go itself is installedGOBIN: Where binaries are installed (defaults to$GOPATH/bin)