Contributing
Contributing
Thank you for your interest in contributing to slackbuzz-cli! This page covers development setup, project structure, and contribution guidelines.
Development setup
# Clone the repositorygit clone https://github.com/triptechtravel/slackbuzz-cli.gitcd slackbuzz-cli
# Buildgo build -o slackbuzz ./cmd/slackbuzz
# Run testsgo test ./...
# Run vetgo vet ./...
# Install locallygo install ./cmd/slackbuzz
# Regenerate CLI reference docs (Starlight markdown)make docsRequires Go 1.25 or later.
Project structure
cmd/slackbuzz/ Entry pointcmd/gen-docs/ Auto-generates CLI reference markdown (make docs)internal/ Internal packages (not importable) api/ HTTP client, rate limiting, error handling app/ Bootstrap and root command wiring auth/ Keyring storage, token validation build/ Version info (injected via ldflags) config/ YAML config loading iostreams/ TTY detection, color support, stream abstraction tableprinter/ TTY-aware table rendering prompter/ Interactive prompts (survey-based) browser/ Cross-platform browser opening text/ Emoji rendering, Slack text formatting, deeplinkspkg/ cmdutil/ Dependency injection, JSON flags, auth middleware cmd/ Command implementations activity/ Inbox: mentions, DMs, threads (alias: inbox) app/ Slack app creation with manifest auth/ login, logout, status channel/ list, info completion/ Shell completions digest/ Cross-tool morning briefing dm/ DM conversation listing later/ Saved/bookmarked items message/ list, send, search notify/ Block Kit notifications react/ Emoji reactions status/ Slack status set/clear thread/ Thread replies and links threads/ Thread listing user/ list, info version/ VersionRunning tests
# Run all testsgo test ./...
# Verbose outputgo test -v ./...
# Specific packagego test ./pkg/cmd/activity/...
# Specific testgo test -run TestEnrichLinks ./pkg/cmd/activity/Code style
- Follow standard Go formatting (
gofmt) - Wrap errors with context:
fmt.Errorf("failed to fetch messages: %w", err) - Use table-driven tests where appropriate
- Prefer the standard library unless a dependency adds clear value
Submitting changes
- Fork the repository and create your branch from
main - Make your changes and add tests for new functionality
- Run
go test ./...andgo vet ./... - Submit a pull request with a clear description
Release process
Releases use GoReleaser via GitHub Actions:
- Tag the release:
git tag v0.1.0 - Push the tag:
git push origin v0.1.0 - GitHub Actions builds binaries for all platforms
- Updates the Homebrew formula in
triptechtravel/homebrew-tap
License
By contributing, you agree that your contributions will be licensed under the MIT License.