A make-like build tool using Go. Write plain Go functions, Stave automatically uses them as runnable targets.
Stave is a fork of Mage by Nate Finch, with additional features and improvements.
go install github.com/yaklabco/stave@latestOr build from source:
git clone https://github.com/yaklabco/stave.git
cd stave
go run bootstrap.goCreate a stavefile.go in your project:
//go:build stave
package main
import "fmt"
// Build compiles the project
func Build() error {
fmt.Println("Building...")
return nil
}
// Test runs the test suite
func Test() {
fmt.Println("Testing...")
}Then run:
stave build # Run the Build target
stave test # Run the Test target
stave -l # List all targets
stave -h build # Show help for Build target- Write build tasks in Go - no new syntax to learn
- Dependency management with
st.Deps() - Parallel and serial dependency execution
- Namespaced targets for organization
- Cross-platform (Linux, macOS, Windows)
- No external dependencies beyond Go
stave -h # Show help
stave -l # List targets
stave -v <target> # Verbose mode
stave -t 5m <target> # Set timeoutStave is built on top of Stave with the following goals:
- Modernized Go patterns (Go 1.21+)
- Additional shell helpers
- Watch mode for file changes
- Dry-run support
- Enhanced CLI experience
This project is a fork of Mage, originally created by Nate Finch. Licensed under the Apache License 2.0.
Apache License 2.0 - see LICENSE for details.
