Contribution Guidelines

Thank you for considering contributing to Gonzo! It's people like you that make Gonzo such a great tool. This guide covers how to contribute effectively.

Code of Conduct

This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code:

  • Be respectful: Treat everyone with respect and courtesy

  • Be inclusive: Welcome and support people of all backgrounds

  • Be collaborative: Work together to improve the project

  • Be professional: Keep discussions on topic and constructive

How Can I Contribute?

Reporting Bugs

Before creating bug reports, please check existing issuesarrow-up-right as you might find out that you don't need to create one.

When creating a bug report, include:

  • Clear title: Describe the issue concisely

  • Reproduction steps: Exact steps to reproduce the problem

  • Expected behavior: What you expected to happen

  • Actual behavior: What actually happened

  • Environment details:

    • Operating System (macOS, Linux, Windows)

    • Go version (go version)

    • Gonzo version (gonzo --version)

    • Terminal emulator

  • Logs and screenshots: Include relevant output

  • Sample logs: Sanitized log files if relevant

Bug Report Template:

Suggesting Enhancements

Enhancement suggestions are tracked as GitHub issuesarrow-up-right.

When creating an enhancement suggestion, include:

  • Clear title: Describe the enhancement concisely

  • Detailed description: Explain what you want to add

  • Use cases: Why would this be useful?

  • Current behavior: What happens now?

  • Proposed behavior: What should happen?

  • Examples: Show how it would work

  • Alternatives: Have you considered other solutions?

Enhancement Template:

Pull Requests

Before submitting a pull request:

  1. Fork the repository

  2. Create your branch from main

  3. Make your changes

  4. Add tests if you've added code

  5. Update documentation if you've changed APIs

  6. Ensure tests pass

  7. Format and lint your code

  8. Commit your changes

  9. Push to your fork

  10. Open a Pull Request

Pull Request Checklist:

Development Guidelines

Commit Messages

Follow these guidelines for commit messages:

Format:

Type:

  • feat: New feature

  • fix: Bug fix

  • docs: Documentation changes

  • style: Code style changes (formatting, etc.)

  • refactor: Code refactoring

  • test: Adding or updating tests

  • chore: Maintenance tasks

Rules:

  • Use present tense ("Add feature" not "Added feature")

  • Use imperative mood ("Move cursor to..." not "Moves cursor to...")

  • Limit first line to 72 characters or less

  • Reference issues and pull requests after first line

  • Explain what and why, not how

Examples:

Code Style

Go Code Conventions:

  • Follow standard Go style: Use gofmt and goimports

  • Meaningful names: Clear, descriptive variable and function names

  • Small functions: Keep functions focused and concise

  • Comment exports: All exported functions, types, and constants

  • Handle errors: Always handle errors explicitly

  • No naked returns: Always specify return values

Example - Good:

Example - Bad:

Testing Guidelines

Write tests for:

  • All new functionality

  • Bug fixes (test should fail before fix)

  • Edge cases and error conditions

  • Public APIs

Test Structure:

Test Different Formats:

  • JSON logs

  • OTLP format

  • Plain text logs

  • Logfmt

  • Custom formats

TUI Guidelines

When working on the terminal UI:

  • Consistent shortcuts: Don't introduce conflicting key bindings

  • Color usage: Use colors meaningfully, not decoratively

  • Responsive: UI should feel snappy

  • Terminal sizes: Test on different sizes (80x24 minimum)

  • Mouse + keyboard: Support both input methods

  • Accessibility: Ensure sufficient color contrast

Documentation Guidelines

Update documentation when you:

  • Add new features

  • Change existing behavior

  • Add new CLI flags or options

  • Modify configuration format

Documentation to update:

  • README.md - Overview, installation, quick start

  • USAGE_GUIDE.md - Detailed usage instructions

  • GitBook docs - Comprehensive documentation

  • Code comments - Inline documentation

  • Help text - CLI help messages

Project Structure Reference

Understanding the codebase structure:

Official Color Palette

When creating UI components or skins, use these official colors:

  • Light Blue: #0F9EFC

  • Black: #000000

  • Green: #49E209

  • White: #FFFFFF

  • Dark Blue: #081C39

  • Gray: #BCBEC0

Development Workflow

Before Committing

Run these commands before every commit:

Or run all at once:

Creating a Pull Request

  1. Update your branch with latest main

  2. Ensure all checks pass

  3. Push to your fork

  4. Create PR on GitHub

    • Go to your fork on GitHub

    • Click "Compare & pull request"

    • Fill out the PR template

    • Link related issues

    • Request review from maintainers

  5. Address review feedback

    • Make requested changes

    • Push updates to same branch

    • Respond to comments

  6. Merge

    • Maintainer will merge when approved

    • Delete your feature branch after merge

Release Process

Releases are handled by maintainers:

  1. Update version numbers

  2. Update CHANGELOG.md

  3. Create git tag

  4. Push tag to trigger release build

  5. GitHub Actions creates the release

  6. Binaries are automatically built and attached

Questions?

Thank You!

Thank you for contributing to Gonzo! Every contribution, no matter how small, makes a difference. 🎉

Related Documentation:

  • Development Setup - Setting up your environment

  • Community - Engaging with the community

  • Architecture Overview - Understanding the codebase

circle-info

First time contributor? Look for issues labeled "good first issue"arrow-up-right to get started!

Last updated