Thank you for your interest in contributing to the Glean CLI! This document provides guidelines and instructions for contributing.
- Go 1.24 or higher
- mise (tool and task runner)
- Git
- Fork and clone the repository:
git clone https://github.com/YOUR-USERNAME/glean-cli.git
cd glean-cli- Install development dependencies:
mise run setup- Build the project:
mise run build- Create a new branch for your changes:
git checkout -b feature/your-feature-name-
Make your changes, following our coding standards and practices.
-
Run tests:
# Run tests with verbose output
mise run test
# Run tests with colorized summary
mise run test:summary
# Run all checks (lint + test + build)
mise run test:all- Run linters:
# Run linter
mise run lint
# Run linter with auto-fix
mise run lint:fix- Install locally to test your changes:
mise run install- Commit your changes using conventional commit messages:
git commit -m "feat: add new feature"
git commit -m "fix: resolve issue with X"Run mise tasks to see all available tasks. Common tasks include:
mise run setup: Install required development dependenciesmise run build: Build the CLImise run test:all: Run all checks (used in CI)mise run lint: Run lintersmise run lint:fix: Run linters with auto-fixmise run install: Install the CLI locallymise run clean: Clean build artifacts
- Update documentation (README.md, code comments) if you're changing functionality.
- Add tests for any new features.
- Ensure all tests pass and linters are clean.
- Push your changes and create a pull request.
- Fill out the pull request template with all required information.
- Follow standard Go conventions and idioms
- Use meaningful variable and function names
- Add comments for public APIs and complex logic
- Keep functions focused and concise
- Write tests for new functionality
- Write unit tests for new features
- Use table-driven tests where appropriate
- Mock external dependencies
- Aim for high test coverage of critical paths
- Test both success and error cases
- Update README.md for user-facing changes
- Add godoc comments for exported functions and types
- Include examples in documentation where helpful
- Keep documentation up to date with code changes
- Update version numbers in relevant files
- Create a new release tag
- Build and publish new artifacts
- Open an issue for bugs or feature requests
- Ask questions in pull requests
- Be respectful and constructive in discussions
By contributing to Glean CLI, you agree that your contributions will be licensed under the MIT License.