Skip to content

Contributing to Kubiya Community Tools

Thank you for your interest in contributing to the Kubiya Community Tools repository! This guide will help you get started with contributing tools and workflows that can be shared with the Kubiya community.

Repository Overview

The Kubiya Community Tools repository is located at github.com/kubiyabot/community-tools. This repository contains a collection of ready-to-use tools and workflows for common enterprise needs.

What to Contribute

You can contribute:

  1. Tools: Reusable Docker-based tools that integrate with common services and platforms
  2. Workflows: Pre-configured workflows that solve specific use cases
  3. Documentation: Improvements to existing tool and workflow documentation
  4. Bug Fixes: Fixes for issues in existing tools or workflows

Contribution Process

1. Fork the Repository

Start by forking the community tools repository:

  1. Go to github.com/kubiyabot/community-tools
  2. Click the "Fork" button in the top right corner
  3. Clone your fork to your local machine
Bash
git clone https://github.com/YOUR-USERNAME/community-tools.git
cd community-tools

2. Create a Branch

Create a branch for your contribution:

Bash
git checkout -b tool/your-tool-name

Use a descriptive branch name that reflects the type of contribution: - tool/aws-s3-operations for a new tool - workflow/github-pr-workflow for a new workflow - fix/kubernetes-tool-bug for a bug fix

3. Develop Your Contribution

Tool Structure

When adding a new tool, follow this structure:

Text Only
community-tools/
└── category/
    └── your-tool-name/
        ├── __init__.py
        ├── main.py           # Main tool implementation
        ├── requirements.txt  # Dependencies
        ├── README.md         # Documentation
        └── examples/         # Usage examples
            └── example.py

Example categories include: - aws - AWS services - azure - Azure services - gcp - Google Cloud Platform services - kubernetes - Kubernetes management - devops - DevOps tools - monitoring - Monitoring and observability - security - Security tools - data - Data processing and analytics

Tool Implementation

Here's a template for creating a new tool:

Python
# main.py
from kubiya_sdk import kubiya

@kubiya.tool(
    name="your-tool-name",
    description="Description of your tool",
    image="appropriate-docker-image:tag",
    requirements=["dependency1", "dependency2"]
)
def your_tool_function(param1: str, param2: int = 10) -> dict:
    """
    Detailed description of what your tool does

    Args:
        param1: Description of parameter 1
        param2: Description of parameter 2

    Returns:
        Dict containing the results
    """
    # Your implementation here
    return {"result": "Your result"}

README Documentation

Each tool should include a README.md with:

  1. Overview: What the tool does
  2. Prerequisites: Any requirements or setup needed
  3. Usage: How to use the tool, with examples
  4. Parameters: Description of all parameters
  5. Returns: What the tool returns
  6. Examples: Code examples showing the tool in action

4. Test Your Contribution

Before submitting your contribution:

  1. Test your tool or workflow thoroughly
  2. Ensure it works with the latest version of Kubiya SDK
  3. Run any included examples to verify they work as expected
  4. Check that your code adheres to the project's coding standards

5. Submit Your Contribution

When you're ready to submit your contribution:

  1. Commit your changes with a descriptive message:

    Bash
    git add .
    git commit -m "Add tool for AWS S3 operations"
    

  2. Push your branch to your fork:

    Bash
    git push origin tool/your-tool-name
    

  3. Create a pull request:

  4. Go to your fork on GitHub
  5. Click "Pull Request"
  6. Select your branch
  7. Provide a descriptive title and details about your contribution
  8. Submit the pull request

Contribution Guidelines

To ensure your contribution is accepted:

  1. Follow the Structure: Adhere to the repository's structure and naming conventions
  2. Documentation: Include comprehensive documentation
  3. Examples: Provide usage examples
  4. Clean Code: Write clear, maintainable code with comments
  5. Error Handling: Include proper error handling in your tools
  6. Security: Never hardcode sensitive information like API keys
  7. Dependencies: Limit dependencies to what's necessary
  8. License: All contributions must be compatible with the repository's license

Getting Help

If you have questions or need help:

  1. Open an issue on the repository
  2. Join the Kubiya community on Discord
  3. Contact the maintainers directly at support@kubiya.ai

Thank you for contributing to Kubiya Community Tools!