Thank you for considering contributing to ops0! We welcome contributions from the community and are excited to work with you to make ops0 the best AI-powered DevOps CLI tool.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/ops0-cli.git cd ops0-cli - Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes and test them
- Submit a pull request
- Use the issue tracker to report bugs
- Check if the issue already exists before creating a new one
- Include steps to reproduce, expected behavior, and actual behavior
- Add your environment details (OS, Go version, tool versions)
- Open an issue with the
enhancementlabel - Describe the feature and why it would be useful
- Include examples of how the feature would work
- Consider implementing it yourself if you're able!
We welcome contributions in these areas:
Add support for additional DevOps tools:
- Cloud providers (GCP, Azure, DigitalOcean)
- CI/CD tools (Jenkins, GitLab CI, GitHub Actions)
- Monitoring tools (Prometheus, Grafana)
- Container orchestration (Docker Swarm, Nomad)
- Improve regex patterns in
parseIntent() - Add more command variations
- Handle edge cases and typos
- Improve Claude prompts for better accuracy
- Add support for other AI providers (OpenAI, etc.)
- Enhance context gathering
- Better error handling for AI responses
- Better error messages
- Improved help text
- Progress indicators for long-running commands
- Configuration file support
- Go 1.19 or later
- Git
- (Optional) Claude API key for AI features
# Clone the repository
git clone https://github.com/ops0-ai/ops0-cli.git
cd ops0-cli
# Build the project
go build -o ops0 main.go
# Run tests
go test ./...
# Test the CLI
./ops0 -m "test command"# Make changes to main.go
vim main.go
# Build and test
go build -o ops0 main.go
./ops0 -m "your test command"
# Test AI mode (if you have API key)
export ANTHROPIC_API_KEY=your_key
./ops0 -m "test ai command" -ai
# Run any existing tests
go test -v- Follow standard Go formatting (
go fmt) - Use meaningful variable and function names
- Add comments for exported functions
- Keep functions focused and small
To add support for a new tool, you need to:
- Add regex patterns in
parseIntent():
// YourTool patterns
if matched, _ := regexp.MatchString(`your.*pattern`, input); matched {
return &CommandSuggestion{
Tool: "yourtool",
Command: "yourtool command",
Description: "This will do something with yourtool.",
Intent: "your intent description",
Confidence: 0.8,
AIGenerated: false,
}
}- Add installation command in
getInstallCommand():
case "yourtool":
return "brew install yourtool" // macOS
// Add other OS support- Update system context in
gatherSystemContext():
tools := []string{"terraform", "kubectl", "docker", "yourtool"}- Add version detection in
getToolVersion()if needed
- Update the system prompt in
getAISuggestion()to include your tool - Add tool-specific troubleshooting patterns
- Test with various natural language inputs
# Test basic functionality
./ops0 -m "help with my new tool"
# Test edge cases
./ops0 -m "edge case input"
# Test AI mode
./ops0 -m "complex scenario" -ai
# Test troubleshooting
./ops0 -m "my new tool is broken" -troubleshoot- Test your changes with real DevOps scenarios
- Try various natural language inputs
- Test both with and without AI mode
- Verify tool installation works
- Test on different operating systems if possible
We welcome automated tests! Consider adding:
- Unit tests for
parseIntent()function - Integration tests for AI responses
- End-to-end tests for complete workflows
func TestParseIntent(t *testing.T) {
suggestion := parseIntent("test input")
if suggestion == nil {
t.Error("Expected suggestion, got nil")
}
// Add more assertions
}- Add comments to explain complex logic
- Document new functions and types
- Update existing comments if you change behavior
- Update README.md if you add new features
- Add examples for new tools or capabilities
- Update help text in
showHelp()function
- Code follows Go conventions
- Changes are tested manually
- Documentation is updated
- Commit messages are clear and descriptive
When creating a PR, please include:
What this PR does:
- Brief description of changes
Testing:
- How you tested the changes
- Example commands that work
Documentation:
- What documentation was updated
Breaking Changes:
- Any breaking changes (hopefully none!)
feat: add kubectl support for namespace operations
fix: handle edge case in terraform pattern matching
docs: update README with new tool examples
refactor: simplify parseIntent function structure
We're especially looking for contributions in:
- Kubernetes enhancements - Better kubectl support, Helm, operators
- Cloud provider CLIs - GCP, Azure, multi-cloud scenarios
- Error handling - Better error messages, recovery suggestions
- Cross-platform support - Windows, Linux installation improvements
- CI/CD integrations - GitHub Actions, GitLab CI, Jenkins
- Monitoring tools - Prometheus, Grafana, alerting
- Configuration management - Config file support, user preferences
- Performance - Faster response times, caching
- Multiple AI providers - OpenAI, local models
- Plugin system - External tool integrations
- Web interface - Browser-based command builder
- Team features - Shared configurations, collaboration
- Open an issue for questions
- Join discussions in existing issues
- Check the documentation first
- Be respectful and inclusive
- Provide constructive feedback
- Help others learn and contribute
- Focus on the best outcome for the project
Contributors will be:
- Listed in the README
- Mentioned in release notes
- Invited to provide input on project direction
We use semantic versioning (semver):
v1.0.0- Major release with breaking changesv1.1.0- Minor release with new featuresv1.1.1- Patch release with bug fixes
Each release includes:
- New features added
- Bug fixes
- Breaking changes (if any)
- Contributors recognized
- General questions: Open an issue with the
questionlabel - Feature discussion: Start a discussion on GitHub
- Bug reports: Use the bug report template
- Security issues: Contact maintainers directly
Thank you for contributing to ops0! Together we can make DevOps more accessible and intuitive for everyone. π