Thank you for your interest in contributing to the Cerebrium CLI! This document provides guidelines and instructions for contributing to this project.
Before opening a bug report:
- Check existing issues to avoid duplicates
- Verify you're using the latest version:
cerebrium version
When reporting a bug, include:
- Steps to reproduce
- Expected vs. actual behavior
- Your environment (OS, Go version, CLI version)
- Relevant logs (use
--verboseflag)
Feature requests are welcome! Please:
- Check existing issues first
- Clearly describe the use case
- Explain how it would benefit Cerebrium users
Please do:
- Add tests for new functionality
- Update documentation as needed
- Follow the architecture patterns described below
- Leave the repo in a better state than you found it
Please don't:
- Submit PRs for issues without clear acceptance criteria
- Expand scope beyond the issue description
- Submit a PR without an associated Issue
- Break existing tests or golden files, unless contextually appropriate
- Go 1.25.2+ (check
go.modfor exact version) - Make (for build commands)
- Git
- Optional: golangci-lint for local linting
This project follows specific architectural patterns documented in CLAUDE.md.
Follow the patterns in CLAUDE.md, and defer to Effective Go where no obvious convention exists, especially for naming.
# Format code
go fmt ./...
# Or use the Makefile
make fmtAll code must pass golangci-lint checks. Configuration is in .golangci.yml.
Add tests for any new features or bug fixes. Ideally, each PR increases the test coverage.
- Table tests preferred where possible
- testing/harness.go provides a Harness for testing Bubbletea models. Please follow the associated README
git checkout -b feature/my-feature
# or
git checkout -b fix/my-bugfix- Write clear, focused commits
- Add tests for new functionality
- Ensure all tests pass:
go test ./... - Run linter:
golangci-lint run
Use clear, conventional commit messages:
feat: add support for custom regions
fix: handle nil pointer in deploy command
docs: update installation instructions
test: add golden tests for login flow
git push origin feature/my-feature
gh pr create --webOr use GitHub's web interface.
Your PR should:
- Reference the issue it addresses (
Fixes #123) - Include a clear description of changes
- Pass all CI checks (tests, lint)
- Update documentation if needed
- Include tests for new functionality
In interactive mode, logs go to stderr to avoid corrupting the TUI:
# Run your command, and reroute stderr to a file of your choosing.
./bin/cerebrium deploy --verbose 2>logfile.log
# In another terminal, tail the logs
tail -f logfile.log
# If stdout and stderr write to the same stream (default) with --verbose mode on, we default to simple mode
./bin/cerebrium deploy --verboseslog is configured to write to stderr, so any slog.Debug|Info|Warn|Error is written there.
# Simulate non-TTY environment
./bin/cerebrium deploy --no-colorPlease be respectful and constructive in all interactions.
By contributing, you agree that your contributions will be licensed under the same license as the project (see LICENSE).
Thank you for contributing to Cerebrium CLI!