- Go, particularly
interface. - GraphQL - Query language for the Zeabur API.
- go-graphql-client - GraphQL client for Go.
- Cobra - CLI framework.
- Viper - Configuration framework. We use it to unify environment variables, flags, and configuration files.
Familiarity with the following tools will be beneficial:
- Ginkgo - Behavior Driven Development (BDD) test framework.
- Run from Source Code (Recommended)
Run the command you want, e.g., go run cmd/main.go auth login --debug.
- Build and Run
Use make build to build the binary.
Run the binary with ./zeabur auth login --debug.
Run Tests:
- All tests:
make test. - Specific package test:
cd xxx && go test ./...orcd xxx && ginkgo .. - Specific test:
cd xxx && ginkgo -focus xxx(where xxx is theDescribename).
Add Tests (using internal/cmd/auth/login as an example):
cd internal/cmd/auth/login.- Run
ginkgo bootstrapto generate the suite filelogin_suite_test.go. - Run
ginkgo generate loginto create the test filelogin_test.go.
Publishing is fully automated. Push a version tag and both GitHub Release and npm package will be published by CI:
git tag v0.x.x
git push origin v0.x.xThe release workflow (.github/workflows/release.yml) will:
- Build binaries for all platforms via GoReleaser
- Create a GitHub Release with the binaries
- Publish the npm package
zeaburwith the matching version