Thank you for your interest in contributing! This document provides guidelines for contributing to this project.
Be respectful, constructive, and inclusive in all interactions.
- Check if the bug has already been reported in Issues
- If not, create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Your environment (OS, OpenCode version, systemd version)
- Relevant logs or error messages
- Open an issue describing the feature
- Explain why it would be useful
- Provide examples of how it would work
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/opencode-systemd.git - Create a branch:
git checkout -b feature/your-feature-name - Make your changes:
- Follow existing code style
- Add comments for complex logic
- Update README.md if needed
- Test your changes:
- Test on a clean system if possible
- Test both install and uninstall
- Verify all commands work
- Commit with clear messages:
feat: add new featurefix: resolve bug in install scriptdocs: update READMErefactor: improve code structure
- Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request:
- Link to any related issues
- Describe what changed and why
- Reference any testing done
# Clone your fork
git clone https://github.com/YOUR_USERNAME/opencode-systemd.git
cd opencode-systemd
# Make scripts executable
chmod +x install.sh uninstall.sh wizard.sh
# Test locally
./wizard.sh status
./install.sh --help- Use
#!/usr/bin/env bashshebang - Use
set -euo pipefailfor safety - Quote all variables:
"$VAR" - Use lowercase for local variables
- Use UPPERCASE for constants/configuration
- Add comments for non-obvious logic
- Keep functions focused and small
- Use present tense: "Add feature" not "Added feature"
- Use imperative mood: "Fix bug" not "Fixes bug"
- Limit first line to 72 characters
- Reference issues when relevant: "Fix #123"
Before submitting a PR, verify:
- Install works on fresh system
- Install with
--yesflag works - Custom options (--time, --host, --port) work
- Uninstall works
- Wizard all commands work
- Status shows correct info
- Logs command works
- Upgrade command works
- Service starts correctly
- Timer triggers correctly
- No shellcheck warnings (if applicable)
- Open an issue for questions
- Start a discussion in GitHub Discussions
Contributors will be acknowledged in the README and release notes.
Thank you for contributing! 🎉