A lightweight, composable web framework for Go.
Mizu [水] - means water💧 in Japanese - helps you build clear and reliable web applications using modern Go. It keeps things simple, close to the standard library, and gives you the control you expect as a Go developer.
Mizu is designed to make building web servers in Go straightforward and enjoyable. It provides just enough structure to handle routing, middleware, templates, and streaming without hiding how net/http works underneath.
Everything in Mizu is built to feel natural to Go developers. You can start with a few lines of code, and as your project grows, the same patterns still apply. There are no custom DSLs or hidden global states—just plain Go that compiles fast and reads cleanly.
Install Mizu and create a simple web app:
go get github.com/go-mizu/mizu@latestCreate main.go:
package main
import "github.com/go-mizu/mizu"
func main() {
app := mizu.New()
app.Get("/", func(c *mizu.Ctx) error {
return c.Text(200, "Hello, Mizu!")
})
app.Listen(":3000")
}Run it:
go run main.goOpen http://localhost:3000 in your browser.
The Mizu CLI provides project scaffolding and development tools.
Using Go install:
go install github.com/go-mizu/mizu/cmd/mizu@latestThis downloads and installs the CLI from the published module.
From source (for development):
git clone https://github.com/go-mizu/mizu.git
cd mizu
make workspace # Creates go.work for local development
make installThis builds the CLI using your local changes and installs to $HOME/bin. Ensure this directory is in your PATH.
Verify installation:
mizu versionThe CLI provides commands for creating projects, running development servers, working with service contracts, and exploring middlewares.
Create a new project:
# List available templates
mizu new --list
# Create a project from a template
mizu new ./myapp --template minimal
# Create a frontend project with a specific framework
mizu new ./myapp --template frontend:react
mizu new ./myapp --template frontend:vue
# Preview what will be created (dry run)
mizu new ./myapp --template api --dry-runAvailable templates include:
minimal- Smallest runnable Mizu projectapi- JSON API service with recommended layoutweb- Full-stack web app with views and componentscontract- Code-first API contract with REST, JSON-RPC, and OpenAPIlive- Real-time interactive app with live viewssync- Offline-first app with sync and reactive statefrontend:*- Frontend frameworks (react, vue, svelte, angular, next, nuxt, htmx, alpine, preact, sveltekit)mobile:*- Mobile apps (ios, android, flutter, dotnet, reactnative)
Run in development mode:
cd myapp
mizu dev
# Pass arguments to your application
mizu dev -- --port 3000The dev command auto-detects your main package (checking cmd/ or the current directory) and runs it. Use --cmd to specify a custom path if needed.
Work with service contracts:
# List all methods from a contract
mizu contract ls
# Show method details
mizu contract show todo.Create
# Call a method
mizu contract call todo.Create '{"title":"Buy milk"}'
# Export OpenAPI spec
mizu contract spec > openapi.json
# Generate code from a contract definition
mizu contract gen contract.goExplore middlewares:
# List all available middlewares
mizu middleware ls
# Filter by category
mizu middleware ls -c security
# Show middleware details
mizu middleware show helmetGlobal flags:
| Flag | Description |
|---|---|
--json |
Emit machine-readable JSON output |
--no-color |
Disable colored output |
-q, --quiet |
Reduce output to errors only |
-v, --verbose |
Increase verbosity (repeatable) |
-h, --help |
Show help |
Mizu is an open project, and everyone is welcome. If you enjoy Go and want to help build a clean, modern framework, you are encouraged to contribute.
You can:
- Report issues or suggest improvements
- Improve examples and documentation
- Write middleware or helper packages
- Share your ideas and feedback in GitHub discussions
Every contribution helps make Mizu better. Thoughtful code, good design, and clear documentation are all equally valuable.
MIT License © 2025 Mizu Contributors
Mizu keeps web development in Go clear, explicit, and enjoyable from the first line of code to production.
