On this page
volunteer_activism
How to contribute
A quick guide on how to contribute to cligen
Thank you for your interest in contributing to cligen! We welcome all contributions, from bug reports and documentation updates to new features and scaffolds.
Getting Started
Prerequisites
To build and test cligen locally, you’ll need:
- Go: version 1.25 or higher.
- Make: for running build and test commands.
- golangci-lint: for linting (optional but recommended).
Fork and Clone
- Fork the repository on GitHub: twinsnes/cligen.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/cligen.git cd cligen
Development Workflow
Creating a Branch
Always create a new branch for your changes:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description
Making Changes
cligen is structured as follows:
cmd/: CLI command definitions.internal/: Core logic for generation, prompting, and configuration.templates/: The actual scaffolds used to generate new projects.
If you are modifying templates, refer to the Templates Overview for more details on the structure.
Running Tests and Linting
Before submitting your changes, ensure everything is working correctly and follows the project’s style.
- Linting: Run the linter to check for style issues.
make lint - Running Tests: Execute the test suite.
make test - Building: Build the binary locally to test the CLI manually.
make build ./dist/cligen --help
Submitting a Pull Request
- Commit your changes using clear and descriptive commit messages. We encourage Conventional Commits.
- Push your branch to your fork on GitHub.
- Open a Pull Request against the
mainbranch of the original repository. - Provide a clear description of your changes and link to any related issues.
Code of Conduct
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.